Boost logo

Boost Users :

Subject: [Boost-users] BOOST_RESULT_OF_USE_DECLTYPE and Boost.Optional ?
From: John M. Dlugosz (mpbecey7gu_at_[hidden])
Date: 2012-05-27 14:32:42


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net