|
Boost : |
Subject: Re: [boost] [Algorithm] contains(v, 1)
From: Olaf van der Spek (ml_at_[hidden])
Date: 2018-06-03 08:07:59
On Sat, Jun 2, 2018 at 9:29 PM, Robert Ramey via Boost
<boost_at_[hidden]> wrote:
> I don't dispute the above. But in cases like this, these advantages don't
> out weigh the costs:
>
> - just looking for the component in the library is not free.
boost::algorithm::contains already exists, but it only supports two
ranges, not a range and a value.
I assumed it did support the latter but then my code didn't compile..
> - another dependency
I was already using boost::algorithm
Even if I wasn't, are we afraid of dependencies?
Note you can always copy/paste the code if you really don't want the dependency.
> - verifying that the library component is actually the same as the one one
> needs. This requires study of the documentation (if there is any).
> - adding one more component to the standard, means that the whole standard
> libary is larger. So searching cost of through it, avoiding conflicts, etc.
> increases even for users which don't use this component.
The request was for Boost, not for std. ;)
Gr,
Olaf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk