
11 Dec
2005
11 Dec
'05
11:03 a.m.
John Maddock wrote:
Turning BOOST_HAS_NVRO on for VC8 causes the test program to fail, unless optimisations are turned on, in which case it is indeed supported.
Should that be a warning instead of fail? It's an optimisation missing, not a "broken" config that leads to errors.
So I suggest we add:
#if (_MSC_VER >= 1400) && !defined(_DEBUG) # define BOOST_HAS_NRVO #endif
to visualc.hpp, note that _DEBUG isn't really the right macro to use here, but it's as close an approximation as we can get.
Why care? Just set BOOST_HAS_NRVO for _MSC_VER >= 1400. The code is correct and works with and without NRVO. If the user doesn't want/need optimisation, why should we bother? Regards, Daniel