On Sun, 09 Oct 2011 06:53:22 -0700, André
Hi, I'm trying to stream a Boost::Variant with << to std::cout but when I include an UnicodeString member from the ICU Unicode library the compiler doesn't recognices my overloaded operator<< for the UnicodeString.
Here is a test program:
<snip>
I'm using gcc 4.4.5 on Ubuntu 11.04 and boost 1.42. Does someone know why the overloaded operator isn't used or how I can get the test program to work?
Keeping in mind that UnicodeString is defined in namespace
icu_<some-version-number>, what you've pointed out is not limited to
UnicodeString. The following simplified example apparently shows ADL
failing for Boost.Variant when the streaming operator for Foo is defined
in the global namespace instead of Foo's defining namespace. (gcc 4.0.1,
boost 1.4.5)
#include <iostream>
#include