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

Subject: Re: [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-12-21 01:16:53


#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: reopened
 Milestone: To Be Determined | Component: fusion
   Version: Boost 1.42.0 | Severity: Problem
Resolution: | Keywords: ADL range begin end
-------------------------------+--------------------------------------------

Comment (by anonymous):

 I believe the only solution we have is to use an ADL barrier. E.g.

 #include <boost/array.hpp>
 #include <boost/fusion/container/vector.hpp>
 #include <boost/fusion/sequence/intrinsic/end.hpp>
 #include <boost/fusion/adapted/array.hpp>
 #include <boost/range.hpp>

 namespace boost { namespace fusion {

     namespace adl_barrier
     {
         struct xx {};
     }
     using ::boost::fusion::adl_barrier::xx;
 }}

 int main()
 {
     boost::array<boost::fusion::xx, 42> foo;
     begin(foo);
 }

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