1 // The FCD doesn't allow typedefs and static_assert in constexpr functions, 2 // but it should. 3 // { dg-do compile { target c++11 } } 4 // { dg-options "-pedantic" } 5 6 template <class T> f(T t)7constexpr T f(T t) 8 { 9 typedef T T2; // { dg-warning "constexpr" "" { xfail *-*-* } } 10 static_assert (T2(0) == T(0), ""); // { dg-warning "constexpr" "" { xfail *-*-* } } 11 return t; 12 } 13 main()14int main() 15 { 16 constexpr int i = f(42); 17 } 18