Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/rv-conv3.C

raw
1 // PR c++/90546
2 // { dg-do link { target c++11 } }
3
4 struct Foo { };
5 void test(const Foo&) {}
6 Foo f;
7 struct Bar {
8 template <class T> operator T&&();
9 };
10 template<> Bar::operator const Foo&&() {
11 return static_cast<Foo&&>(f);
12 }
13 int main() {
14 test(Bar{});
15 }