1 // { dg-do compile { target c++11 } }
3 template<typename T, typename U>
6 static const bool value = false;
12 static const bool value = true;
15 #define CHECK_DECLTYPE(DECLTYPE,RESULT) \
16 static_assert(is_same< DECLTYPE , RESULT >::value, #RESULT)
18 template<typename F> F create_a();
20 template<typename F, typename T1>
21 decltype(create_a<F&>()(create_a<const T1&>())) forward(F f, const T1& a1)
28 const T& operator()(const T& x) { return x; }
36 CHECK_DECLTYPE(decltype(forward(id, i)), const int&);
37 CHECK_DECLTYPE(decltype(forward(id, f)), const float&);