2015-05-04 Andrew Sutton <andrew.n.sutton@gmail.com>
[official-gcc.git] / gcc / testsuite / g++.dg / concepts / pr65854.C
blobd347ca52d74e37248407aca65cc7ad81c44b34f6
1 // { dg-options "-std=c++1z" }
3 // Handle alias templates in type requirements.
5 template<typename T1, typename T2>
6 struct BTT { };
8 template<typename T>
9 struct BTT<T,T> { using type = int; };
11 template<typename T1, typename T2>
12 using Alias1 = typename BTT<T1, T2>::type;
14 template<typename T1, typename T2>
15 concept bool C() 
17   return requires() { typename Alias1<T1, T2>; };
20 template<typename T1, typename T2>
21   requires C<T1, T2>()
22 int f();
24 auto i = f<char, int>(); // { dg-error "cannot call function" }