__constant auto err = [&]() {}; //expected-note{{candidate function not viable: 'this' object is in address space '__constant', but method expects object in address space '__generic'}}
auto priv3 = []() __global {}; //expected-note{{candidate function not viable: 'this' object is in address space '__private', but method expects object in address space '__global'}}
#if defined(_WIN32) && !defined(_WIN64)
//expected-note@35{{conversion candidate of type 'void (*)() __attribute__((thiscall))'}}
#else
//expected-note@35{{conversion candidate of type 'void (*)()'}}
__constant auto const1 = []() __private{}; //expected-note{{candidate function not viable: 'this' object is in address space '__constant', but method expects object in address space '__private'}}
#if defined(_WIN32) && !defined(_WIN64)
//expected-note@43{{conversion candidate of type 'void (*)() __attribute__((thiscall))'}}
#else
//expected-note@43{{conversion candidate of type 'void (*)()'}}
__constant auto const2 = []() __generic{}; //expected-note{{candidate function not viable: 'this' object is in address space '__constant', but method expects object in address space '__generic'}}
#if defined(_WIN32) && !defined(_WIN64)
//expected-note@50{{conversion candidate of type 'void (*)() __attribute__((thiscall))'}}
#else
//expected-note@50{{conversion candidate of type 'void (*)()'}}
[&] () __global {} (); //expected-error{{no matching function for call to object of type '(lambda at}} expected-note{{candidate function not viable: 'this' object is in default address space, but method expects object in address space '__global'}}
[&] () __private {} (); //expected-error{{no matching function for call to object of type '(lambda at}} expected-note{{candidate function not viable: 'this' object is in default address space, but method expects object in address space '__private'}}
[&] __private {} (); // expected-error{{no matching function for call to object of type '(lambda at}} expected-note{{candidate function not viable: 'this' object is in default address space, but method expects object in address space '__private'}}
#if __cplusplus <= 202002L
// expected-warning@-2{{lambda without a parameter clause is a C++2b extension}}