-
-
Notifications
You must be signed in to change notification settings - Fork 262
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
This is a copy from 467 from @JJCUBER, to track the issues individually.
Andreas
I just wanted to add that I've noticed a few other oddities when it comes to lambdas, including this (for C++20):
template<class F = decltype([]() { return true; })>
bool test(F f = {})
{
return f();
}
int main()
{
test();
}generates
template<class F = decltype([]() { return true; })>
bool test(F f = {})
{
return f();
}
/* First instantiated from: insights.cpp:9 */
#ifdef INSIGHTS_USE_TEMPLATE
template<>
bool test<__lambda_1_29>(__lambda_1_29 f)
{
return f.operator()();
}
#endif
int main()
{
test(__lambda_1_29{});
return 0;
}(It uses a class that was never declared/defined.)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working