Boost logo

Boost Users :

Subject: Re: [Boost-users] [fusion] adapted std::pair and ostream
From: Joel de Guzman (joel_at_[hidden])
Date: 2011-07-20 01:27:57


On 7/20/2011 7:49 AM, Nathan Ridge wrote:
>
>>> Why not just overload operators << and >> in the global namespace,
>>> as the docs say, rather than overloading them in the boost::fusion
>>> namespace?
>>
>> I didn't want to pollute the global namespace. At one point, I only
>> had native fusion sequences. However, in light of recent events,
>> where more foreign sequences have been adapted, and some of those
>> with namespaces that cannot be touched (e.g. std), this is indeed
>> seems necessary. I'll take that into consideration.
>
> Well, since the operator is guarded by an
>
> enable_if<fusion::traits::is_sequence<T>>,
>
> I would say it doesn't pollute the global namespace any more than
> we desire it to.

Agreed. The situation is different now than it was 8-10 years ago.
What you see is historical. Heh, we might not even had enable_if
before, and definitely no user crafted and adapted views and sequences.
What you see is almost a port from boost.tuple, including the copyrights
from the authors! :-) Time flies!

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://boost-spirit.com

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