2 // { dg-do compile { target c++11 } }
10 -> decltype( int{ declval<T>() } );
17 #define STATIC_ASSERT( ... ) static_assert( __VA_ARGS__, #__VA_ARGS__ )
19 template< class T, class U >
21 static constexpr bool value = false;
25 struct is_same<T, T> {
26 static constexpr bool value = true;
30 STATIC_ASSERT( is_same< decltype( f<int>(0) ), int >::value ); // OK; f<int>(0) calls #1.
31 STATIC_ASSERT( is_same< decltype( f<int*>(0) ), void >::value ); // static assertion fails; f<int*>(0) should call #2, because int{ (int*)0 } is ill-formed, but calls #1.