$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] boost::lexical_cast: where to declare operator<<
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-09-07 10:49:17
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