[config] Feature request: BOOST_OVERRIDE
Hi, I think it will be a nice feature to add BOOST_OVERRIDE to Boost.Config in a manner similar to BOOST_CONSTEXPR. It's a nice keyword and it would be nice if people could make use of it when it's available. -- Borislav
11.07.2013 21:22, Borislav Stanimirov:
I think it will be a nice feature to add BOOST_OVERRIDE to Boost.Config in a manner similar to BOOST_CONSTEXPR. It's a nice keyword and it would be nice if people could make use of it when it's available.
+1, it would be nice for projects which are built with different compilers (pre/post C++11). -- Evgeny Panasyuk
2013/7/11 Evgeny Panasyuk
11.07.2013 21:22, Borislav Stanimirov:
I think it will be a nice feature to add BOOST_OVERRIDE to Boost.Config
in a manner similar to BOOST_CONSTEXPR. It's a nice keyword and it would be nice if people could make use of it when it's available.
+1, it would be nice for projects which are built with different compilers (pre/post C++11).
I'd like to have a BOOST_FINAL macro too. Compiler may apply additional optimizations if it knows that class or method is final (for example it can inline method calls and do not use vtable for that method). -- Best regards, Antony Polukhin
I think it will be a nice feature to add BOOST_OVERRIDE to Boost.Config
in a manner similar to BOOST_CONSTEXPR. It's a nice keyword and it would be nice if people could make use of it when it's available.
+1, it would be nice for projects which are built with different compilers (pre/post C++11).
I'd like to have a BOOST_FINAL macro too. Compiler may apply additional optimizations if it knows that class or method is final (for example it can inline method calls and do not use vtable for that method).
Would someone like to create some patches for these - we need two new macros: BOOST_NO_CXX11_OVERRIDE BOOST_NO_CXX11_FINAL plus tests and docs, 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/guide... Thanks! John.
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/guide... 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
participants (5)
-
Antony Polukhin
-
Borislav Stanimirov
-
Evgeny Panasyuk
-
John Maddock
-
Sergey Cheban