Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/pr33930.C

raw
1 // { dg-do compile { target c++11 } }
2 typedef const int* type;
3
4 float& foo( const type& ggg );
5 int& foo( type&& ggg );
6
7 void bar( int* someptr )
8 {
9 int& x = foo( someptr ); // { dg-error "cannot bind non-const lvalue reference" }
10 }