You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-compatibility
|
|
|
|
struct S {
|
|
mutable int &a; // expected-warning {{'mutable' on a reference type is a Microsoft extension}}
|
|
S(int &b) : a(b) {}
|
|
};
|
|
|
|
int main() {
|
|
int a = 0;
|
|
const S s(a);
|
|
s.a = 10;
|
|
return s.a + a;
|
|
}
|