8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice15.C
Nathan Sidwell c0a499af71 [PR c++/83406] deducing lambda type
https://gcc.gnu.org/ml/gcc-patches/2017-12/msg01432.html
	PR c++/83406
	* parser.c (cp_parser_lambda_body): Remove obsolete
	single-return-statement handling.

	PR c++/83406
	* g++.dg/cpp0x/lambda/lambda-ice15.C: Adjust error.
	* g++.dg/cpp1y/pr83406.C: New.

From-SVN: r255950
2017-12-21 19:16:01 +00:00

16 lines
253 B
C

// PR c++/67846
// { dg-do compile { target c++11 } }
class A
{
void foo ()
{
[=] { return foo; }; // { dg-error "cannot convert" }
}
void bar () const;
void bar ()
{
[=] { return bar; }; // { dg-error "unable to deduce" }
}
};