Boost logo

Boost Users :

Subject: Re: [Boost-users] [uuid] to string problem
From: Emil Dotchevski (emil_at_[hidden])
Date: 2010-05-12 15:01:34


On Wed, May 12, 2010 at 11:29 AM, John Dlugosz
<JDlugosz_at_[hidden]> wrote:
> to_string<std::wstring>(x);
> specifies the return type (which can default to std::string) and is defined in the same namespace as C.
>
> If you called it lexical_cast instead, are you saying that would not play nicely with the existing lexical_cast definitions?

Providing a function template parameter explicitly will disable ADL.

To call lexical_cast<foo>(), you need to either qualify the call with
the namespace name (so... is the foo overload of lexical_cast in the
boost namespace or in foo's namespace?) or use using to bring a bunch
of lexical_cast overloads in scope. Either way, it sucks.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net