|
Boost : |
Subject: Re: [boost] [Config] Support for switching between std:: andboost:: equivalents.
From: Peter Dimov (lists_at_[hidden])
Date: 2015-06-07 10:36:51
Edward Diener wrote:
> Most of the talk about the problems of my macro system presupposes that
> programmers using Boost will mistakenly try to use a C++11 version of a
> library during a C++03 mode build and vice versa, and therefore the system
> must be flawed.
This was some of the talk but I'm not sure about "most". A substantial part
of the talk was about programmers wanting to use boost::regex even when the
compiler happens to be in C++11 mode. In other words, talk that challenges
your assumption that
> If the end-user of my library is compiling in C++11 mode is it more likely
> that his use of regex will be std::regex or boost::regex ? IMO it is the
> former.
There are several good reasons to prefer boost::regex. First, the one I
pointed out, you want to maintain a single code base that compiles under
C++03 and C++11. Second, you want to use boost::regex's extensions that
std::regex doesn't have. Third, you want predictable performance that is
independent of the standard library in use.
On the other side of the coin, we have the desire to avoid use of Boost when
use of standard facilities would suffice, which is real and legitimate.
However, in my experience at least, this desire is only strong when you can
avoid use of Boost _altogether_, which is not the case under discussion.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk