Boost logo

Boost :

Subject: Re: [boost] [c++1] BOOST_NOEXCEPT macros?
From: Robert Kawulak (robert.kawulak_at_[hidden])
Date: 2011-10-10 23:59:23


> From: Beman Dawes
> > 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
> 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?

Best regards,
Robert


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