repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Daily bump.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-mutable6.C
blob
2c946e388ab4b0ccca05764bc6ad15e85f7d6a5e
1
// PR c++/110463
2
// { dg-do compile { target c++11 } }
3
4
struct U {
5
mutable int x = 1;
6
};
7
8
struct V {
9
mutable int y = 1+1;
10
};
11
12
int main() {
13
constexpr U u = {};
14
constexpr int x = u.x; // { dg-error "mutable" }
15
16
constexpr V v = {};
17
constexpr int y = v.y; // { dg-error "mutable" }
18
}