tree-optimization/116481 - avoid building function_type[]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / var-templ72.C
blob7426bad4a6ccb14f0a0667cea6cd193ce4a25b9f
1 // PR c++/108550
2 // { dg-do compile { target c++14 } }
4 template<class T>
5 struct is_pointer
7   static constexpr bool value = false;
8 };
10 template<class T, T T1>
11 struct integral_constant
13   static constexpr T value = T1;
16 template<typename T>
17 using PTR_P = is_pointer<T>;
19 template <class Tp>
20 constexpr auto is_pointer_v = PTR_P<Tp>::value;
22 template <class Tp, int = 0>
23 integral_constant<bool, is_pointer_v<Tp>> Wrap1();
25 int main() {
26   static_assert(!decltype(Wrap1<int>())::value, "");