
On Mon, Oct 10, 2011 at 11:59 PM, Robert Kawulak <robert.kawulak@gmail.com> wrote:
Then maybe at one go add BOOST_OVERRIDE and BOOST_FINAL? (note that MSVC supports them since VS 2005 but uses sealed rather than final, making
From: Beman Dawes the
macros even more desirable for better portability).
Care to submit patches?
OK, but one thing is unclear to me. Along with BOOST_OVERRIDE and BOOST_FINAL, the corresponding BOOST_NO_<feature> macro(s) should be provided. There are several possibilities: - provide BOOST_NO_VIRT_SPECIFIERS, - provide BOOST_NO_OVERRIDE_FINAL (or BOOST_NO_OVERRIDE_FINAL_VIRT_SPECIFIERS), - provide BOOST_NO_OVERRIDE and BOOST_NO_FINAL (or BOOST_NO_OVERRIDE_VIRT_SPECIFIER and BOOST_NO_FINAL_VIRT_SPECIFIER).
BOOST_NO_VIRT_SPECIFIERS has the problem that if a future C++ revision adds more specifiers (i.e., explicit/new) then the meaning will become ambiguous. BOOST_NO_OVERRIDE_FINAL is better in this respect, but it has another problem that applies to BOOST_NO_VIRT_SPECIFIERS as well: currently there are compilers (MSVC >= 8.0) supporting override but not final (they use sealed keyword instead). On the other hand, BOOST_NO_OVERRIDE and BOOST_NO_FINAL may be a bit too fine-grained. What do you and the others think?
There is another issue I should have mentioned earlier: Do these features actually impact any Boost code? We don't want to waste people's time working on config support that isn't going to be used. To answer your question, BOOST_NO_OVERRIDE and BOOST_NO_FINAL may be fine grained, but they make life easier if some compiler implements one but not the other. --Beman