llvm-project/clang/test/SemaCXX/overload-0x.cpp
Richard Smith 9ca5c42582 Update all tests other than Driver/std.cpp to use -std=c++11 rather than
-std=c++0x. Patch by Ahmed Charles!

llvm-svn: 141900
2011-10-13 22:29:44 +00:00

12 lines
669 B
C++

// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
namespace test0 {
struct A { // expected-note {{candidate function (the implicit copy assignment operator) not viable: 'this' argument has type 'const test0::A', but method is not marked const}} expected-note {{candidate function (the implicit move assignment operator) not viable: 'this' argument has type 'const test0::A', but method is not marked const}}
A &operator=(void*); // expected-note {{candidate function not viable: 'this' argument has type 'const test0::A', but method is not marked const}}
};
void test(const A &a) {
a = "help"; // expected-error {{no viable overloaded '='}}
}
}