basically how to make following code compile?
I know it failed because compiler was trying to evaluate something like ([](int &i){})(0) but how to s
([](int &i){})(0)
You may use following traits:
template struct return_type : return_type {}; // For generic types, directly use the result of the signature of its 'operator()' template struct return_type { using type = ReturnType; };