-
-
Notifications
You must be signed in to change notification settings - Fork 262
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
It's not a bug, but an extra ; empty line when using lambda expressions without any usage inside a scope:
#include <iostream>
int main() {
[]() {};
return EXIT_SUCCESS;
}Will generate:
#include <iostream>
int main()
{
class __lambda_4_3
{
public:
inline /*constexpr */ void operator()() const
{
}
using retType_4_3 = void (*)();
inline /*constexpr */ operator retType_4_3 () const noexcept
{
return __invoke;
};
private:
static inline void __invoke()
{
}
public:
// /*constexpr */ __lambda_4_3() = default;
} __lambda_4_3{};
; // <------------------------------- This one is not necessary
return 0;
}When there is a usage for the lambda, this line if for the usage. For example, for [](){} (); we'll get there:
__lambda_4_3.operator()();Or for an assignment:
__lambda_4_12 a = __lambda_4_12{};Just a minor attention :)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working