BOOST_HAS_NRVO not being set for VC++ 8.0

According to http://msdn.microsoft.com/visualc/default.aspx?pull=/library/en-us/dnvs05/ht..., VC++ 8.0 now support NRVO. Config info isn't reporting BOOST_HAS_NRVO as being set. Should this be changed? --Beman

Beman, I tried adding the following to the end of visualc.hpp and then recompiled the serialization and regex libraries without problem: //http://msdn.microsoft.com/visualc/default.aspx?pull=/library/en-us/dnvs05/ht... #if (_MSC_VER >= 1400) // 1400 == VC++ 8.0 # define BOOST_HAS_NRVO #endif At least there is no harm in defining it. Regards, George. "Beman Dawes" <bdawes@acm.org> a écrit dans le message de news: dng3eo$u53$1@sea.gmane.org...

Yes config_info is just a report, config_test is the consolidated test program for Boost.Config. 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. 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. Thoughts? John.

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.
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
participants (5)
-
Beman Dawes
-
Daniel Frey
-
David Abrahams
-
George M. Garner Jr.
-
John Maddock