Files
gcc-reflection/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic.C
Jason Merrill df7ae00856 c++: testsuite tweak
My r16-2065 added error lines to this test but left it as dg-do run,
resulting in UNRESOLVED lines from the testsuite.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp1y/lambda-generic-variadic.C: Change to 'compile'.
2025-07-08 08:48:40 -04:00

15 lines
469 B
C

// Basic generic lambda test
// { dg-do compile { target c++14 } }
template <typename T, typename U> struct pair {};
template <typename... T> struct tuple {};
int main()
{
auto a = [] (auto, pair<auto,auto> v) { return sizeof (v); }; // { dg-error "auto" }
auto b = [] (auto, pair<pair<auto,auto>,auto>... v) { return sizeof... (v); }; // { dg-error "auto" }
a(1, pair<int, float>());
b(2, pair<pair<short,char>, double>(), pair<pair<float,long>, int>());
}