comparison gcc/testsuite/g++.dg/cpp1z/inline-var7.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 // PR c++/87512
2 // { dg-do compile { target c++17 } }
3
4 template <int, typename T = int> using enable_if_t = int;
5 template<typename T> struct is_pointer { enum { value = 0 }; };
6
7 template <typename T>
8 inline constexpr auto IsPtr = is_pointer<T>::value;
9
10 class Foo;
11 class Bar;
12
13 template <typename T1, typename T2>
14 void foo(T1, T2);
15
16 template <typename T>
17 enable_if_t<IsPtr<T>> foo(T, Foo);
18
19 template <>
20 void foo<Bar>(Bar, Bar);