]>
Commit | Line | Data |
---|---|---|
7107ea6f PP |
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; } | |
5ebe5bcf | 7 | // { dg-error "mutable" "" { target c++11_only } .-1 } |
7107ea6f PP |
8 | |
9 | static_assert(f({42}) == 42, ""); | |
5ebe5bcf | 10 | // { dg-error "non-constant" "" { target c++11_only } .-1 } |