Opened 12 years ago
Closed 12 years ago
#5361 closed Bugs (invalid)
Is boost::is_iequal supposed to work only with chars?
Reported by: | Owned by: | Pavol Droba | |
---|---|---|---|
Milestone: | To Be Determined | Component: | string_algo |
Version: | Boost 1.45.0 | Severity: | Problem |
Keywords: | Cc: |
Description
While trying to use it to compare 2 std::strings I couldn't get it to work - I got std::bad_casts. Looking at the source code revealed that it used std::toupper which just uppercases a single char. Is it supposed to work like this or what?
Note:
See TracTickets
for help on using tickets.
Hello,
As the documentation states, is_iequal is "element" or "character" comparison predicate. As so it is used as a plugin to more complext algorithms that are using it for atomic operations on elements of a string.
If you'd like to compare strings, you can use lexicographical_compare algorithm.
Regards, Pavol.