error message: "conversion from '<lambda()>' to non-scalar type 'event' requested"
why i can't use the assignment instead the constructor? or the lambda functions are different?
event test; //fix your default constructor, there is ambiguity
test = [](){cout<<"hello world";}; //calling the assignment operator
event test{ [](){cout<<"hello world";} }; //calling the constructor, note the braces
event test={ [](){cout<<"hello world";} }; //also calling the constructor, note the braces
i forget that important thing about the braces on class instance inicialization and the assignment.
i'm sorry, but why is 'ambiguity'? it's because i use a default parameter on constructor?