
On 7/20/2011 7:21 AM, Nathan Ridge wrote:
But this seems to be in contradiction with the docs, which say [1] (emphasis mine):
The **global** |operator<<| has been overloaded for generic output streams such that Sequence http://www.boost.org/doc/libs/1_47_0/libs/fusion/doc/html/fusion/sequence.ht...(s) are output by recursively calling |operator<<| for each element.
Perhaps the authors were relying on ADL to find operator<<, but overlooking the fact that not all sequences would be in the boost::fusion namespace?
Thanks. That's certainly not correct. Adapted sequences in other namespaces can't avail of that. I just fixed the docs to avoid further confusion.
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. Regards, -- Joel de Guzman http://www.boostpro.com http://boost-spirit.com