summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-mutable1.C
blob: a14d611cee8224f4a914eb558ae869f1c87e2a5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// { dg-options -std=c++0x }

struct A
{
  int i;
  mutable int j;
};

constexpr A a = { 0, 1 };
constexpr A b = a;		// { dg-error "mutable" }
constexpr int i = a.i;
constexpr int j = a.j;		// { dg-error "mutable" }