|
Boost Users : |
Subject: Re: [Boost-users] [Range.Ex / String.Algo] Ambiguous call to overload function "find"
From: S.C. Leung (shaochiliang_at_[hidden])
Date: 2009-07-03 12:53:59
Hi!
I have downloaded Range.Ex uploaded at 26.04.2009 09:09. It seems the
difficulties are still there.
Thank you for your work!
S.C. Leung
2009/7/3 Neil Groves <neil_at_[hidden]>
> Hello!
>
> On Fri, Jul 3, 2009 at 2:38 AM, ÁºÉÜ³Ø <shaochiliang_at_[hidden]> wrote:
>
>> I use vc 9.0 to compile the following code with boost 1.39.0 and range_ex.
>> #include<string>
>> #include<boost/algorithm/string.hpp>
>> #include<boost/range/algorithm.hpp>
>>
>> int main() {
>> std::string s = "hello";
>> boost::find_first(s, "lo");
>> return 0;
>> }
>>
>> The compiler will complain ambiguous call to overload function "find". I
>> found there's also a "find" in boost/range/algorithm.hpp. Even worse when I
>> change the type of "s" to const std::string, the compiler will resolute
>> "find" call as the one in boost/range/algorithm.hpp
>> and reports an error "const_iterator is not a member of
>> std::_String_const_iterator". Now I just indicated the "find" call in
>> boost::find_first explicitly. Is there a better way to solve it?
>>
>
> I'm not sure why there should be any conflict. I will test this problem out
> over the weekend. Would you please clarify which RangeEx you are using. Are
> you using the latest version from the vault in the algorithm directory? I
> appreciate that these difficulties would not occur, if I had managed to get
> this code into the trunk of subversion.
>
>
>>
>> Thanks!
>> S.C. Leung
>>
>
> Please accept my apologies for the problem. I shall report back to you by
> Monday 6 July 2009.
>
> Regards,
> Neil Groves
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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