]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/cpp0x/constexpr-mutable3.C
Daily bump.
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-mutable3.C
1 // PR c++/92505
2 // { dg-do compile { target c++11 } }
3
4 struct A { mutable int m; };
5
6 constexpr int f(A a) { return a.m; }
7 // { dg-error "mutable" "" { target c++11_only } .-1 }
8
9 static_assert(f({42}) == 42, "");
10 // { dg-error "non-constant" "" { target c++11_only } .-1 }