Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/var-templ72.C

raw
1 // PR c++/108550
2 // { dg-do compile { target c++14 } }
3
4 template<class T>
5 struct is_pointer
6 {
7 static constexpr bool value = false;
8 };
9
10 template<class T, T T1>
11 struct integral_constant
12 {
13 static constexpr T value = T1;
14 };
15
16 template<typename T>
17 using PTR_P = is_pointer<T>;
18
19 template <class Tp>
20 constexpr auto is_pointer_v = PTR_P<Tp>::value;
21
22 template <class Tp, int = 0>
23 integral_constant<bool, is_pointer_v<Tp>> Wrap1();
24
25 int main() {
26 static_assert(!decltype(Wrap1<int>())::value, "");
27 }