Subject: Re: [boost] [range] #11202: boost.sort header conflicts with boost.range header
From: Edward Diener (eldiener_at_[hidden])
Date: 2018-08-29 10:00:29
On 8/29/2018 5:24 AM, Peter Dimov via Boost wrote:
>> FWIW, boostdep says that boost/range/algorithm.hpp is not used
>> anywhere in Boost.
> Oh that's just the umbrella header. Well, boost/range/algorithm/sort.hpp
> is used here:
> Inclusion report for <boost/range/algorithm/sort.hpp> (in module range):
> Â Â from graph:
> Â Â Â Â Â Â <boost/detail/algorithm.hpp>
> Â Â Â Â Â Â <boost/graph/vf2_sub_graph_iso.hpp>
The right thing would be for the sort library to change its boost::sort
namespace name to something else, like boost::sortlib, so as not to
conflict with range's boost::sort algorithm. In general there should be
no boost:: namespace names with the same name as a std:: algorithm as
this will conflict with range's mimicking the standard algorithms with a
range instead of iterators. I realize that Boost.Sort changing its
namespace to boost::sortlib, for instance, is a breaking change but I
think it is the right thing to be done as it would simply require users
of Boost.Sort to change the namespace name in their code in for
subsequent Boost releases.
> -----Original Message----- From: Edward Diener via Boost
> Sent: Wednesday, August 29, 2018 05:38
> To: boost_at_[hidden]
> Cc: Edward Diener
> Subject: Re: [boost] [range] #11202: boost.sort header conflicts with
> boost.range header
> On 8/28/2018 10:16 PM, James E. King III via Boost wrote:
>> On Sat, Aug 25, 2018 at 10:31 PM Steven Ross via Boost <
>> boost_at_[hidden]> wrote:
>>> https://svn.boost.org/trac10/ticket/11202 has been sitting for years.
>>> The "using range::sort" causing the namespace pollution needs to be
>>> deleted, and then everything depending on that inside boost needs to
>>> be fixed.Â This will break people dependent on the namespace
>>> pollution, but that's the only way to clean it up.Â Is anyone willing
>>> to take on this cleanup?
>>> Is there a good way to identify cross-library dependency breakages in
>>> situations like this so they can be fixed?
>> Thanks for bringing attention to this.
>> If you do not get any satisfactory answer from maintainers of the
>> then let us know, so the CMT can reach out and if needed assume
>> responsibility for
>> maintaining any abandoned work
> Boost.Range does the same thing with all its algorithms, lifting their
> names into the boost namespace. I gather this was done to mimic the
> std:: algorithms dealing with iterators and with the idea that no other
> library would use the name of standard algorithms within the boost
> namespace for any purpose. I am sorry that this was not caught when
> Boost.Sort was initially reviewed, especially as I was the review manager.
>> - Jim
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk