;) Sorry for my question... Somehow I missed it and even worse: wrote my own binary predicate :(
Hi,
is_iequal is an element-comparisom predicate. In other words, it is used to compare characters.
It is used as a plug-in to other generic algorithms.
If you'd like to compare strings, use boost::iequals algorithm. Or have a look here for
more options:
http://www.boost.org/doc/libs/1_34_1/doc/html/string_algo/reference.html#header.boost.algorithm.string.predicate.hpp
Best regards,
Pavol.
> ------------------------------------------------------------------------
Ovanes Markarian wrote:
> Hello *,
>
> I have a question regarding string comparisons. Are the comparisons
> below suppose to work in VC 7.1 boost 1.34.0?
>
> Case 1:
> bool is_test_string(std::string const& str)
> {
> std::string const& compare_with=std::string("test_string");
>
> boost::algorithm::is_iequal comparator;
>
> return comparator(str, compare_with);
> }
>
>
> Case 2:
> bool is_test_string(std::string const& str)
> {
> char const* compare_with = "test_string";
>
> boost::algorithm::is_iequal comparator;
>
> return comparator(str, compare_with);
> }
>
>
> Case 3:
> bool is_test_string(std::string const& str)
> {
> boost::algorithm::is_iequal comparator;
>
> return comparator(str, "test_string");
> }
>
> In all 3 cases I receive compiler erros.
>
> Many thanks,
> Ovanes
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users@lists.boost.org
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users