Boost logo

Boost Users :

Subject: Re: [Boost-users] [Range.Ex / String.Algo] Ambiguous call to overload function "find"
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-07-06 05:14:58


S.C. Leung skrev:
> That's too strange. Maybe the test environments between us are different
> so I want to send you the range_ex.zip I use.
> By the way, the "find_first" really call the "find" by making a "Finder
> object" and that's where the resolution failed. I'm also not sure
> if the compiler options have side effects so I post my options as below:
>
> /Od /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W3
> /nologo /c /ZI /TP /errorReport:prompt
>
> Lastly, have you replaced std::string with const std::string? That will
> cause the "find" within "find_first" resoluted as the "find" in
> range/algorithm/find.hpp in my test environment.

I think the problem might be related to ADL. All boost libraries should
guard against this. For example, in the string library, forwarding calls
should be to

  boost::algorithm::foo

and also in the range library, forwarding calls should use

  boost::ranges::foo

-Thorsten


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