]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/g++.dg/cpp0x/sfinae52.C
Regenerate riscv.opt.urls and i386.opt.urls
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp0x / sfinae52.C
CommitLineData
8add4868
PC
1// PR c++/62072
2// { dg-do compile { target c++11 } }
3
4template<typename T> struct tuple_size {};
5template<typename T> struct tuple_size<T const> : tuple_size<T> {};
6
7template<typename T, typename = void>
8struct query {
9 static constexpr bool value = false;
10};
11template<typename T>
12struct query<T, typename tuple_size<T>::type> {
13 static constexpr bool value = true;
14};
15
16// fine
17static_assert( !query<int>::value, "" );
18static_assert( !query<int const>::value, "" );
19
20// error: invalid use of incomplete type 'struct tuple_size<void()>'
21static_assert( !query<void()>::value, "" );