]>
Commit | Line | Data |
---|---|---|
8add4868 PC |
1 | // PR c++/62072 |
2 | // { dg-do compile { target c++11 } } | |
3 | ||
4 | template<typename T> struct tuple_size {}; | |
5 | template<typename T> struct tuple_size<T const> : tuple_size<T> {}; | |
6 | ||
7 | template<typename T, typename = void> | |
8 | struct query { | |
9 | static constexpr bool value = false; | |
10 | }; | |
11 | template<typename T> | |
12 | struct query<T, typename tuple_size<T>::type> { | |
13 | static constexpr bool value = true; | |
14 | }; | |
15 | ||
16 | // fine | |
17 | static_assert( !query<int>::value, "" ); | |
18 | static_assert( !query<int const>::value, "" ); | |
19 | ||
20 | // error: invalid use of incomplete type 'struct tuple_size<void()>' | |
21 | static_assert( !query<void()>::value, "" ); |