Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / alias-decl-78.C
bloba52c0622e46df01c99afce8239eacc611c2faa3c
1 // PR c++/115897
2 // { dg-do compile { target c++11 } }
4 template<class T, class U>
5 struct is_same { static constexpr bool value = __is_same(T, U); };
7 #if __cpp_variable_templates
8 template<class T, class U>
9 constexpr bool is_same_v = __is_same(T, U);
10 #endif
12 template<class T>
13 using A [[gnu::vector_size(16)]] = T;
15 template<class T>
16 void f() {
17   using B = A<T>;
18   static_assert(!is_same<T, B>::value, "");
19 #if __cpp_variable_templates
20   static_assert(!is_same_v<T, B>, "");
21 #endif
24 template<class T>
25 void g() {
26   using C = A<T*>;
27   static_assert(!is_same<T*, C>::value, "");
28 #if __cpp_variable_templates
29   static_assert(!is_same_v<T*, C>, "");
30 #endif
33 template void f<float>();
34 template void g<float>();