From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 3B1A03858D39; Sun, 14 Nov 2021 17:13:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3B1A03858D39 Received: by mail-wr1-x42b.google.com with SMTP id d3so25808765wrh.8; Sun, 14 Nov 2021 09:13:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=eB+u7qPVWSMIkmZWJ+ElsdnUGdBb9NDKi15ex4oU3cQ=; b=Jo47hUIplKttOUEyF6Rm6o2PVeAcNnuN4YuYwJz19tuLbvTDV81oN32y3nEDtwAqov 5JaPz+uYa2rspJCRjsy8+CT0SBDTE2ozttRgew6whb77vaqi0KmLgbh1FVRpGkpMcrZZ LX+bk/FF7p8I551j1CW7mitkPg84V3YtySX56dInJHYm21DOn7ip/KcIPXBpVnFdzaHQ U1gNXHNkmAZwTgvaZgfVziJFuqPKf3SO4RR5iiDbW1s2BL2vIo1naiFeq+1pnY6HzPQ1 DmNHm/nvsVcnG4jcD8ROAIuLD6k1/Fg0xQ0zrYlH5VuPA5B5wOungbXDIYIYDxfOV7SF RINQ== X-Gm-Message-State: AOAM532qG1xeml5lbOJDAPa24DSIhditKZJIgkaycx3tXJ/FuE7ADhG9 q3TA5v7aTnuVge2f9/D9vX0sS01NLpgzZd0KvO4= X-Google-Smtp-Source: ABdhPJwtBVnsn91QhHuRpn1VJHtQyE+Xard90oJ7hIvNi8Owu3FY5PIqKRVXIRzWvXezyiM3FSLgftf2HZHTVI0hYnM= X-Received: by 2002:adf:f04d:: with SMTP id t13mr38224050wro.324.1636909984229; Sun, 14 Nov 2021 09:13:04 -0800 (PST) MIME-Version: 1.0 References: <8c49ed0b-6c4f-7663-47a9-7c7f31b47c04@gmail.com> In-Reply-To: <8c49ed0b-6c4f-7663-47a9-7c7f31b47c04@gmail.com> From: Jonathan Wakely Date: Sun, 14 Nov 2021 17:12:53 +0000 Message-ID: Subject: Re: [PATCH][_GLIBCXX_DEBUG] Code cleanup/simplification To: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= Cc: "libstdc++@gcc.gnu.org" , gcc-patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2021 17:13:06 -0000 On Sat, 13 Nov 2021 at 13:19, Fran=C3=A7ois Dumont via Libstdc++ 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=3D(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=3D(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=3D(initializer_list<>)): Remove _M_base() ca= lls. > (list::splice, list::merge): Likewise. > * include/debug/map.h (map(map&&, const allocator_type&)): > Remove _M_safe() and _M_base() calls. > (map::operator=3D(initializer_list<>)): Remove _M_base() cal= ls. > * include/debug/multimap.h (multimap(multimap&&, const > allocator_type&)): > Remove _M_safe() and _M_base() calls. > (multimap::operator=3D(initializer_list<>)): Remove _M_base(= ) > calls. > * include/debug/set.h (set(set&&, const allocator_type&)): > Remove _M_safe() and _M_base() calls. > (set::operator=3D(initializer_list<>)): Remove _M_base() cal= ls. > * include/debug/multiset.h (multiset(multiset&&, const > allocator_type&)): > Remove _M_safe() and _M_base() calls. > (multiset::operator=3D(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=3D(initializer_list<>)): Remove > _M_base() call. > (basic_string::operator=3D(const _CharT*), > basic_string::operator=3D(_CharT)): Likewise. > (basic_string::operator[](size_type), > basic_string::operator+=3D(const basic_string&)): Likewise. > (basic_string::operator+=3D(const _Char*), > basic_string::operator+=3D(_CharT)): Likewise. > * include/debug/unordered_map > (unordered_map(unordered_map&&, const allocator_type&)): > Remove _M_safe() and _M_base() calls. > (unordered_map::operator=3D(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=3D(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=3D(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=3D(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=3D(initializer_list<>)): Remove _M_base() > calls. > (vector::operator[](size_type)): Likewise. > > Tested under Linux x86_64 _GLIBCXX_DEBUG mode -std=3Dgnu++14 and -std=3Dg= nu++98. > > Ok to commit ? Looks good, please commit, thanks.