Boost logo

Boost :

Subject: Re: [boost] [config] Feature request: BOOST_OVERRIDE
From: Sergey Cheban (s.cheban_at_[hidden])
Date: 2013-07-12 14:04:28


12.07.2013 20:26, John Maddock пишет:

> and then the BOOST_FINAL/BOOST_OVERRIDE macros become
> trivial. The process for adding new macros is documented here:
> http://www.boost.org/doc/libs/1_54_0/libs/config/doc/html/boost_config/guidelines_for_boost_authors.html#boost_config.guidelines_for_boost_authors.adding_new_defect_macros
Please note that Visual Studio knows "final" since vc11 and knows
"sealed" since at least vc7. So, it's reasonable to write something like

#if _MSC_VER < 1700 // 1700 == VC++ 11.0
# define BOOST_NO_CXX11_FINAL
# define BOOST_FINAL sealed
#endif

somewhere in the config/compiler/visualc.hpp and something like

#ifdef BOOST_NO_CXX11_FINAL
# ifndef BOOST_FINAL
# define BOOST_FINAL
# endif
#else
# define BOOST_FINAL final
#endif

in the config/suffix.hpp. See
http://msdn.microsoft.com/en-us/library/vstudio/0w2w91tf%28v=vs.110%29.aspx
for details.

-- 
Best regards,
Sergey Cheban

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk