gcc/testsuite/g++.dg/cpp0x/constexpr-nonlit.C
raw| 1 | // FIXME this is currently invalid, but seems like it should be OK |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | struct A { A() { } }; |
| 5 | |
| 6 | template<class T> |
| 7 | constexpr bool ignore(T&&) { return true; } |
| 8 | |
| 9 | static_assert(ignore(10), "Error"); // OK |
| 10 | |
| 11 | A s; |
| 12 | |
| 13 | static_assert(ignore(s), "Error"); // Currently an error |