Boost logo

Boost Users :

Subject: Re: [Boost-users] Cannot use Boost.Croutines with range based for
From: Mueller-Roemer, Johannes Sebastian (Johannes.Sebastian.Mueller-Roemer_at_[hidden])
Date: 2014-08-28 09:36:06

Older compilers should already use ADL, so the solution I posted should be fine for them as well. Replacing the illegal std::begin and end in asymmetric_coroutine.hpp by

namespace boost
        namespace coroutines
           using boost::begin;
           using boost::end;

Works just fine on GCC 4.8.1 (don't have a working clang 3.4 to test)

Johannes S. Mueller-Roemer, MSc
Wiss. Mitarbeiter - Interactive Engineering Technologies (IET)
Fraunhofer-Institut für Graphische Datenverarbeitung IGD
Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
Tel +49 6151 155-606  |  Fax +49 6151 155-139
johannes.mueller-roemer_at_[hidden]  |
-----Original Message-----
From: Boost-users [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Nat Goodspeed
Sent: Thursday, August 28, 2014 15:19
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Cannot use Boost.Croutines with range based for
On Thu, Aug 28, 2014 at 2:32 AM, Michel Morin <mimomorin_at_[hidden]> wrote:
> As per DR1442 (for C++11), the rule of range-based-for has been changed.
> ( )
> The new rule does not add namespace `std` as an associated namespace.
> So `begin` and `end` should be defined as either
>   - member functions, or
>   - as free functions in the enclosing namespaces (e.g. `boost::coroutines`).
> Recent gcc and clang implemented the new rule.
Please correct me if I'm wrong -- but if Oliver makes such a change unconditionally, won't Boost.Coroutine's range-based-for support break on older compilers?
How do other Boost libraries accommodate this change? Are there already canonical Boost workaround macros?
Boost-users mailing list

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at