1// PR c++/50835
2
3struct A {};
4
5struct B
6{
7  explicit B(A &);
8  operator A&() const;
9};
10
11void should_be_lvalue(A&);
12
13template <typename>
14void f()
15{
16    A v;
17    should_be_lvalue(true ? B(v) : v);
18}
19