
7 Sep
2011
7 Sep
'11
2:49 p.m.
AMDG On 09/07/2011 02:03 AM, Nagaev Boris wrote:
I'm implementing boost::lexical_cast for class A. When operator<< is declared in the same namespace, as class A, it works:
<snip>
But if operator<< is declared in root namespace, it will not compile:
That's how name lookup works in templates. operator<< has to be in a namespace associated with A. In Christ, Steven Watanabe