$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Pavol Droba (droba_at_[hidden])
Date: 2008-04-08 09:43:47
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:
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_at_[hidden]
> http://listarchives.boost.org/mailman/listinfo.cgi/boost-users