AMDG John C. Femiani wrote:
What aspect wouldn't work as I expected? Do you mean that overloads of repr that aren't in namespace boost could occlude ::boost::repr? In that case its a lot like ::boost::begin I think.
You do realize that boost::begin is implemented using range_begin which should be defined in the user's namespace, right? http://www.boost.org/doc/libs/1_35_0/libs/range/doc/boost_range.html#method2
The point of repr was to avoid putting an overload operator<< into namespace std.
The problem: namespace boost { template<class T> void print(const T& t) { std::cout << boost::repr(t); } } namespace boost { void repr(const std::vector<int>&); // Not found by print. } It fails for exactly the same reason that overloading operator<< does. In Christ, Steven Watanabe