Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/constexpr-nonlit.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 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 |