Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Thread annoyance
From: Markus Werle (numerical.simulation_at_[hidden])
Date: 2009-02-25 11:06:31


anony <janezz55 <at> gmail.com> writes:

>
> Just by including: "boost/thread.hpp", which includes "boost/bind.hpp"
> you pollute the namespace. If you also use Boost.Lambda, you must change
> _1 to boost::lambda::_1.
>
> Is this going to be fixed? Any workarounds?

This issue crops up since years and annoys everybody.
I still pray for the day when someone removes this from ::

I ended up using explicit namespace prefixes everywhere.

Workaround:

namespace bl = boost::lambda;
// use bl::_1 in code

Markus


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net