public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Tamar Christina <tnfchris@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/arm-struct-reorg-wip)] libstdc++: Fix std::string error in Debug Mode Date: Fri, 17 Jul 2020 13:14:44 +0000 (GMT) [thread overview] Message-ID: <20200717131444.4A84E398E416@sourceware.org> (raw) https://gcc.gnu.org/g:f32a3662cda0492c7d18f32e9a8eac1054e69d62 commit f32a3662cda0492c7d18f32e9a8eac1054e69d62 Author: Jonathan Wakely <jwakely@redhat.com> 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 <jwakely@redhat.com> + * 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));
reply other threads:[~2020-07-17 13:14 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200717131444.4A84E398E416@sourceware.org \ --to=tnfchris@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).