OSDN Git Service

PR c++/52685
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / lvalue2.C
1 // PR c++/50835
2
3 struct A {};
4
5 struct B
6 {
7   explicit B(A &);
8   operator A&() const;
9 };
10
11 void should_be_lvalue(A&);
12
13 template <typename>
14 void f()
15 {
16     A v;
17     should_be_lvalue(true ? B(v) : v);
18 }