summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-mutable2.C
blob: c449c3aabc0d8185054910d382667fbf3dad3f79 (plain)
1
2
3
4
5
6
7
8
9
10
// PR c++/58102
// { dg-do compile { target c++11 } }

struct S {
  mutable int n;
  constexpr S() : n() {}
};

constexpr S s = {};
constexpr S s2 = s;		// { dg-error "mutable" }