Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp0x/diag2.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line source
// { dg-do compile { target c++11 } } struct A {}; // We shouldn't arbitarily choose which of these is better. void f (A&); void f (const A&&); // But do prefer the lvalue overload here. void g (A&); void g (A&&); int main() { const A a; f(a); // { dg-error "no match" } // { dg-error "qualifiers" "" { target *-*-* } .-1 } // { dg-error "lvalue" "" { target *-*-* } .-2 } g(a); // { dg-error "qualifiers" } }