public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: "François Dumont" <frs.dumont@gmail.com>
Cc: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][_GLIBCXX_DEBUG] Code cleanup/simplification
Date: Sun, 14 Nov 2021 17:12:53 +0000	[thread overview]
Message-ID: <CAH6eHdTOL7v=nuuuDjaivMbakpS+YJ10ufphQL_AU_5Qkv8ZZQ@mail.gmail.com> (raw)
In-Reply-To: <8c49ed0b-6c4f-7663-47a9-7c7f31b47c04@gmail.com>

On Sat, 13 Nov 2021 at 13:19, François Dumont via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
>      libstdc++: [_GLIBCXX_DEBUG] Remove _Safe_container<>::_M_safe()
>
>      Container code cleanup to get rid of _Safe_container<>::_M_safe()
> and just
>      _Safe:: calls which use normal inheritance. Also remove several
> usages of _M_base()
>      which can be most of the time ommitted and sometimes replace with
> explicit _Base::
>      calls.
>
>      libstdc++-v3/ChangeLog:
>
>              * include/debug/safe_container.h
> (_Safe_container<>::_M_safe): Remove.
>              * include/debug/deque
> (deque::operator=(initializer_list<>)): Replace
>              _M_base() call with _Base:: call.
>              (deque::operator[](size_type)): Likewise.
>              * include/debug/forward_list (forward_list(forward_list&&,
> const allocator_type&):
>              Remove _M_safe() and _M_base() calls.
>              (forward_list::operator=(initializer_list<>)): Remove
> _M_base() calls.
>              (forward_list::splice_after, forward_list::merge): Likewise.
>              * include/debug/list (list(list&&, const allocator_type&)):
>              Remove _M_safe() and _M_base() calls.
>              (list::operator=(initializer_list<>)): Remove _M_base() calls.
>              (list::splice, list::merge): Likewise.
>              * include/debug/map.h (map(map&&, const allocator_type&)):
>              Remove _M_safe() and _M_base() calls.
>              (map::operator=(initializer_list<>)): Remove _M_base() calls.
>              * include/debug/multimap.h (multimap(multimap&&, const
> allocator_type&)):
>              Remove _M_safe() and _M_base() calls.
>              (multimap::operator=(initializer_list<>)): Remove _M_base()
> calls.
>              * include/debug/set.h (set(set&&, const allocator_type&)):
>              Remove _M_safe() and _M_base() calls.
>              (set::operator=(initializer_list<>)): Remove _M_base() calls.
>              * include/debug/multiset.h (multiset(multiset&&, const
> allocator_type&)):
>              Remove _M_safe() and _M_base() calls.
>              (multiset::operator=(initializer_list<>)): Remove _M_base()
> calls.
>              * include/debug/string (basic_string(basic_string&&, const
> allocator_type&)):
>              Remove _M_safe() and _M_base() calls.
>              (basic_string::operator=(initializer_list<>)): Remove
> _M_base() call.
>              (basic_string::operator=(const _CharT*),
> basic_string::operator=(_CharT)): Likewise.
>              (basic_string::operator[](size_type),
> basic_string::operator+=(const basic_string&)): Likewise.
>              (basic_string::operator+=(const _Char*),
> basic_string::operator+=(_CharT)): Likewise.
>              * include/debug/unordered_map
> (unordered_map(unordered_map&&, const allocator_type&)):
>              Remove _M_safe() and _M_base() calls.
>              (unordered_map::operator=(initializer_list<>),
> unordered_map::merge): Remove _M_base() calls.
>              (unordered_multimap(unordered_multimap&&, const
> allocator_type&)):
>              Remove _M_safe() and _M_base() calls.
> (unordered_multimap::operator=(initializer_list<>),
> unordered_multimap::merge):
>              Remove _M_base() calls.
>              * include/debug/unordered_set
> (unordered_set(unordered_set&&, const allocator_type&)):
>              Remove _M_safe() and _M_base() calls.
>              (unordered_set::operator=(initializer_list<>),
> unordered_set::merge): Remove _M_base() calls.
>              (unordered_multiset(unordered_multiset&&, const
> allocator_type&)):
>              Remove _M_safe() and _M_base() calls.
> (unordered_multiset::operator=(initializer_list<>),
> unordered_multiset::merge):
>              Remove _M_base() calls.
>              * include/debug/vector (vector(vector&&, const
> allocator_type&):
>              Remove _M_safe() and _M_base() calls.
>              (vector::operator=(initializer_list<>)): Remove _M_base()
> calls.
>              (vector::operator[](size_type)): Likewise.
>
> Tested under Linux x86_64 _GLIBCXX_DEBUG mode -std=gnu++14 and -std=gnu++98.
>
> Ok to commit ?

Looks good, please commit, thanks.

      reply	other threads:[~2021-11-14 17:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13 13:17 François Dumont
2021-11-14 17:12 ` Jonathan Wakely [this message]

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='CAH6eHdTOL7v=nuuuDjaivMbakpS+YJ10ufphQL_AU_5Qkv8ZZQ@mail.gmail.com' \
    --to=jwakely.gcc@gmail.com \
    --cc=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@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: link
Be 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).