* c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures and __cpp_generic_lambdas for -std=c++2a. Define __cpp_designated_initializers, __cpp_constexpr_in_decltype and __cpp_consteval for -std=c++2a. Remove a FIXME comment about __cpp_concepts for -std=c++2a. * g++.dg/cpp1z/feat-cxx1z.C: Only compile with -std=c++17. * g++.dg/cpp2a/feat-cxx2a.C: Adjust for P1902R1 changes. * g++.dg/cpp2a/desig15.C: New test. * g++.dg/cpp2a/lambda-pack-init3.C: New test. * g++.dg/cpp2a/lambda-generic6.C: New test. * g++.dg/cpp2a/consteval15.C: New test. From-SVN: r278628
20 lines
244 B
C
20 lines
244 B
C
// { dg-do compile { target c++11 } }
|
|
|
|
void bar();
|
|
void bar(int);
|
|
|
|
template <typename... Args>
|
|
void foo(Args... args) {
|
|
#if __cpp_init_captures >= 201803
|
|
auto f = [...xs=args]{
|
|
bar(xs...);
|
|
};
|
|
#endif
|
|
}
|
|
|
|
int main()
|
|
{
|
|
foo();
|
|
foo(1);
|
|
}
|