c++: hash table ICE with variadic alias [PR105003]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-pedantic.C
blob21f4c83b39629cb0419e2e4fd417a1356ebc3a55
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" }
6 template <class T>
7 constexpr T f(T t)
9   typedef T T2;                      // { dg-warning "constexpr" "" { xfail *-*-* } }
10   static_assert (T2(0) == T(0), ""); // { dg-warning "constexpr" "" { xfail *-*-* } }
11   return t;
14 int main()
16   constexpr int i = f(42);