[Boost-bugs] [Boost C++ Libraries] #4028: fusion::begin and fusion::end lead to problems with ADL-based begin and end functions for ranges

Subject: [Boost-bugs] [Boost C++ Libraries] #4028: fusion::begin and fusion::end lead to problems with ADL-based begin and end functions for ranges
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-03-19 11:05:18


#4028: fusion::begin and fusion::end lead to problems with ADL-based begin and end
functions for ranges
---------------------------------+------------------------------------------
 Reporter: mgaunard | Owner: djowel
     Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: fusion
  Version: Boost 1.42.0 | Severity: Problem
 Keywords: ADL range begin end |
---------------------------------+------------------------------------------
 In C++0x, begin and end for ranges (that extract the beginning iterator
 and the past-the-end one, respectively) are to be found through ADL.
 This causes problems when fusion is an associated namespace (as for
 example in the case {{{ iterator_range< some_iterator< fusion::vector<> >
> }}}), since the begin and end of the fusion namespace will be considered
 by ADL, and that results in an error because a range is not a fusion
 sequence.

 I see two (three) solutions:[[BR]]
 - Mask fusion::begin and fusion::end with SFINAE so that they are only
 available if the argument is a fusion sequence. That means however that we
 can't have a fusion sequence that is at the same time a range, even though
 this could have some uses.[[BR]]
 - Rename fusion::begin and fusion::end to something else.[[BR]]
 (- Ask the standard people to reconsider)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4028>
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:02 UTC