* call.c (convert_like_real) <case ck_user>: Call mark_exp_read instead of mark_rvalue_use. * g++.dg/cpp0x/lambda/lambda-89158.C: New test. From-SVN: r268561
12 lines
167 B
C
12 lines
167 B
C
// PR c++/89158
|
|
// { dg-do compile { target c++11 } }
|
|
|
|
struct T { T(const int&); };
|
|
void Func(T);
|
|
|
|
void test()
|
|
{
|
|
constexpr int Val = 42;
|
|
[Val]() { Func(Val); };
|
|
}
|