Backported to VS2013 using a metaprogrammed emulation of unrestricted unions. Works surprisingly well considering.

Does it works with a functor instead of a lambda?