|
Boost : |
Subject: Re: [boost] c++03 library survey
From: John Maddock (jz.maddock_at_[hidden])
Date: 2018-08-28 17:36:20
> - Which library/ies are you maintaining? (I assume this isn't some
> sort of private information - otherwise ignore the question)
Too many ;)
Math, Multiprecision, Regex, Type_traits, Config
> - Would you like to unconditionally use c++11 features if you would
> not have to worry about this breaking boost internal users?
Multiprecision: Builds with 03, but already makes fairly heavy C++11
use, and C++11 or later is really required for full functionality. C++03
support requires little maintenance other than some #ifdef's for rvalue
refs etc. Fairly heavy use of noexcept is also used, but IMO this is an
untestable abomination anyway. Generalised constexpr in C++14 is more
useful than C++11, along with really robust SFINAE and enable_if support
(in theory this is C++11-ish, but there are many early C++11 compilers
which choke on the code, along with more recent C++03 compilers which
handle things fine).
Math: historically needs nothing that isn't in C++03. Constexpr support
has been gradually added to parts of the library, but is easy to
macro-ise around. Recently, some new components have been added which
are more like C++14 as they really need generalised lambdas to work
well. The nicest feature to have would be constexpr-if, but that's C++17.
TypeTraits: All the old C++98 cruft is still there, I don't intend to
ever change it, and if someone files a bug against say VC7.1, the answer
will be "upgrade your compiler". There are C++11,14 and 17 isms
throughout added to support newer features in new compilers. Many traits
only work correctly post C++11. The whole thing could probably be
greatly simplified post C++11, but I don't see much gain from going
through and ripping out the old code. For folks that want to read the
source, I try to keep the "modern"/conforming implementation first in
the file, at least in new code.
Regex: was obviously designed when C++98 was still being formulated ;)Â
Rvalue refs are the only C++11 feature that's nice to have, other things
like C++17's string_view support will gradually get added in time no doubt.
>
> - Would you like to unconditionally use c++11 features if you would
> not have to worry about this breaking any users?
Not especially, though I dare say I would just to save a few #ifdef's in
new code.
>
> - Would you deprecate your library completely if there were no
> boost-internal users and your current dependencies required
> c++11 (e.g. because your library has been merged into the c++11
> standard library anyway)
No. While regex is in the std, I believe Boost.Regex continues to offer
useful enhancements.
Type_traits is an interesting one - if people stop using it, then
deprecation might be an option.
>
> - Are you yourself using any boost library (in an up-to-date version)
> in a c++03, non-boost project?
No.
>
> - Do you have any Idea if the latest versions of your library is
> used by any important/significant number of c++02 projects?
> [It is only important if *you* consider those projects important
> and or the number significant]
No. Generally I get more bug reports relating to very recent C++
versions that I haven't quite caught up with yet. Of course these are
mature libraries, so the C++03 side of things should be pretty stable.
HTH, John.
--- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk