27 May
2012
27 May
'12
6:32 p.m.
I turned on BOOST_RESULT_OF_USE_DECLTYPE and used boost::result_of because the std::tr1::result_of that comes with VS10 doesn't use declspec at all and thus doesn't work right with lambda functions. This passes my unit tests, but fails on a piece of code that has a function returning an instantiation of boost::optional. It seems confused as to whether the value held in the optional is as-specified or has a reference added to it. I wonder if this is a specific issue with optional that might be addressed/worked-around/patched, or perhaps there is a way to enable declspec-based testing just for the code that wanted it and not globally? —John