Function pointer != function object.
D'oh; I misread what you'd said.
If it's any consolation, MSVC 2010 apparently doesn't supply the function pointer conversion, so I need to amend my statement to include verbiage along the lines of "with standard conforming compilers...".
I'm probably going to get bashed - again - for stating my thoughts but... why not to just autobox them to an appropriate std::function at this point?
The type of a lambda function is a unique anonymous functor type for every lambda function. Two separate lambdas that have the exact same definition in the exact same scope will have two separate types. As such, trying to get at the exact type of a lambda function is an exercise in futility. Just store the std::function by value.
I'm probably going to get bashed - again - for stating my thoughts but... why not to just autobox them to an appropriate std::function at this point?
[quote name='SiCrane' timestamp='1336052848' post='4937096']
The type of a lambda function is a unique anonymous functor type for every lambda function. Two separate lambdas that have the exact same definition in the exact same scope will have two separate types. As such, trying to get at the exact type of a lambda function is an exercise in futility. Just store the std::function by value.