Re: [Boost-bugs] [Boost C++ Libraries] #5057: boost/algorithm/string/find.hpp name-clashes with boost/range/algorithm/find.hpp

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5057: boost/algorithm/string/find.hpp name-clashes with boost/range/algorithm/find.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-17 00:10:59


#5057: boost/algorithm/string/find.hpp name-clashes with
boost/range/algorithm/find.hpp
--------------------------------------+-------------------------------------
  Reporter: aschoedl@… | Owner: neilgroves
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: range
   Version: Boost 1.45.0 | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-------------------------------------

Comment (by neilgroves):

 I'm slightly confused by this report. boost::range::find is available as
 boost::find due to the using range::find in
 boost/range/algorithm/find.hpp.

 I have used the idiom of putting the algorithms in the range namespace and
 then bringing the functions into the boost namespace. This allows
 disambiguation when clashes occur with Boost.Algorithm.

 IIRC I modified Boost.Algorithm to use the boost::algorithm namespace and
 pull the functions into the boost namespace with a using clause.

 Is this solution not working for you in a use-case I haven't considered?
 Or are you suggesting that Boost.Algorithm should break backward
 compatibility to remove the collision when both headers are Boost.Range
 and Boost.Algorithm headers are included?

 I personally believe that there is merit in removing Boost.Algorithm find
 from the boost namespace for exactly the reason you outlined, namely that
 the semantic doesn't gel with the standard. However, I believe this would
 be unacceptably inconsistent without moving find_first, ifind_first,
 find_last, ifind_last, find_nth, ifind_nth, find_head, find_tail,
 find_token too.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5057#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC