« Return to Thread: [Range.Ex / String.Algo] Ambiguous call to overload function "find"

Re: [Range.Ex / String.Algo] Ambiguous call to overload function "find"

by 梁绍池 :: Rate this Message:

Reply to Author | View in Thread

Hello, Thorsten:

Have you test my case and had the same problem with me? Does it mean that the library should call the function explicitly?

Thanks!
S.C. Leung

2009/7/6 Thorsten Ottosen <thorsten.ottosen@...>
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 mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users


_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

 « Return to Thread: [Range.Ex / String.Algo] Ambiguous call to overload function "find"