diff --git a/headers/cpp/std/bastring.h b/headers/cpp/std/bastring.h index 4b7f7d6eba..ce57ea3414 100644 --- a/headers/cpp/std/bastring.h +++ b/headers/cpp/std/bastring.h @@ -419,6 +419,8 @@ public: { return compare(str, pos, n); } int compare (size_type pos, size_type n, const charT* s) const { return compare(s, pos, n); } + int compare (size_type pos, size_type n, const charT* s, size_type n2) const + { return compare(s, pos, std::min(n, n2)); } int compare (const charT* s, size_type pos = 0) const { return compare (s, pos, traits::length (s)); }