From 4e3137c085bae361922078f123dceb92da700640 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 12 Nov 2015 22:08:23 +0100 Subject: [PATCH] Add another missing string::compare method * Makes our gcc2 slightly more C++98 compliant... --- headers/cpp/std/bastring.h | 2 ++ 1 file changed, 2 insertions(+) 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)); }