From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2136) id 82AC8389040E; Wed, 17 Jun 2020 19:15:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 82AC8389040E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592421306; bh=C3dWaY3cgrbjOiChADN+EB2sPNAOpykha9oWS6jehFU=; h=From:To:Subject:Date:From; b=g2dup6AdytgvfH1TgheoLSQADSAQZNW7W46dz3+dQhBYfhSTTu21h6B0wfOq1mRX4 EYc5By/hXf6Ayta9UsUDyomB7d49mbq8QNWbFaJl1xzgrhraxADu35wybl8oJp/eoQ GN3j+MxYiwaLl8yUa5tpH+WWvGsk/OlhXOEbSE3w= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Aldy Hernandez To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc/devel/ranger] libstdc++: Fix std::string error in Debug Mode X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/devel/ranger X-Git-Oldrev: da5f369df6dc500183737e251eb19d91f899b92d X-Git-Newrev: f32a3662cda0492c7d18f32e9a8eac1054e69d62 Message-Id: <20200617191506.82AC8389040E@sourceware.org> Date: Wed, 17 Jun 2020 19:15:06 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2020 19:15:06 -0000 https://gcc.gnu.org/g:f32a3662cda0492c7d18f32e9a8eac1054e69d62 commit f32a3662cda0492c7d18f32e9a8eac1054e69d62 Author: Jonathan Wakely Date: Thu Feb 27 15:13:16 2020 +0000 libstdc++: Fix std::string error in Debug Mode This fixes a test failure with -std=gnu++98 -D_GLIBCXX_DEBUG: FAIL: 21_strings/basic_string/modifiers/insert/char/1.cc (test for excess errors) * include/debug/string (__gnu_debug::basic_string::insert): Fix for C++98 where the member function of the base class returns void. Diff: --- libstdc++-v3/ChangeLog | 3 +++ libstdc++-v3/include/debug/string | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 946459c3cb8..53fc59c6a0d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2020-02-27 Jonathan Wakely + * include/debug/string (__gnu_debug::basic_string::insert): Fix for + C++98 where the member function of the base class returns void. + * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add equality comparisons that support value-initialized iterators. diff --git a/libstdc++-v3/include/debug/string b/libstdc++-v3/include/debug/string index 6615b08ba6d..1431ebafeba 100644 --- a/libstdc++-v3/include/debug/string +++ b/libstdc++-v3/include/debug/string @@ -635,7 +635,7 @@ namespace __gnu_debug __glibcxx_check_insert_range(__p, __first, __last, __dist); typename _Base::iterator __res; -#if _GLIBCXX_USE_CXX11_ABI +#if _GLIBCXX_USE_CXX11_ABI && __cplusplus >= 201103 if (__dist.second >= __dp_sign) __res = _Base::insert(__p.base(), __gnu_debug::__unsafe(__first), __gnu_debug::__unsafe(__last));