From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 7CB1C3858C3A for ; Tue, 9 Nov 2021 16:25:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7CB1C3858C3A Received: from mail-yb1-f198.google.com (mail-yb1-f198.google.com [209.85.219.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-452-5-AIGb1yP6axhxZSPbUJTw-1; Tue, 09 Nov 2021 11:25:14 -0500 X-MC-Unique: 5-AIGb1yP6axhxZSPbUJTw-1 Received: by mail-yb1-f198.google.com with SMTP id l28-20020a25b31c000000b005c27dd4987bso31040634ybj.18 for ; Tue, 09 Nov 2021 08:25:14 -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; bh=MankwfuDzV2L0qxFarVTahvjd+qE+55i4a4VhmUKcyg=; b=ras+JuI+1NrUPFdnvti4uPw3Y19E9AD0qf43+uf18jymh41qJkraQxflnffjv/x6FP XBLEOunK5wtVotpYazCdl9GLFLVxQKpfcHGvsa8oWx01B/mYlqOXXmnDi+EYrBdMZxI+ qf7h4fWoufBNAouc8lkh33z7tKhd7N992jXjWrN+yfQ+Jd6r+ZOdbPMR7rqnA7ZUU29O qmMEdGBn6XXj6DgBMCeK579TAaTsHnon937o8GpdjvikhDtSkBTeTzlWFavYVm8+mUqA ckaxHpX2YUl+caMfpOlloqQuJkIvJMPtUbT5hWtlMD8wwtNDM9dUXOo3Lodavl5cbeY9 wjLQ== X-Gm-Message-State: AOAM530rHdYHWmrQ7JtnGVpWNmBd3HU29JmobjopKSnt/fr6CZ11YA2s tTwADX0jjul4M+sM1fSBF/CfPTJWRn5OKX1VCTpl+6nz9wu9T2Um6z+SgLfkEeGbrsdWmVAEoas +cmibUGokZHsoZu3CqfOZAEXM5B5UD/4= X-Received: by 2002:a05:6902:4e7:: with SMTP id w7mr9059280ybs.77.1636475114239; Tue, 09 Nov 2021 08:25:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwXX6ooL7XrH7k6xBLkor2YkWG9o3UBdVJNMfshpvL+3Gp9K3/FX4g992BYCWBeuDrYdIF4Z8mDqPIqSwhNjLU= X-Received: by 2002:a05:6902:4e7:: with SMTP id w7mr9059253ybs.77.1636475114038; Tue, 09 Nov 2021 08:25:14 -0800 (PST) MIME-Version: 1.0 References: <4eec3fb9-851e-3e4e-f9f4-1110db3af747@gmail.com> <6c349652-8b6f-2027-08c3-6ce58a765aeb@gmail.com> <22bf1b42-8cf4-7a6e-d5dc-c322ccbb2b46@gmail.com> <68641ea0-2a14-e3a5-8315-a7b3a9c1fdb4@gmail.com> In-Reply-To: From: Jonathan Wakely Date: Tue, 9 Nov 2021 16:25:02 +0000 Message-ID: Subject: Re: [PATH][_GLIBCXX_DEBUG] Fix unordered container merge To: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= Cc: Jonathan Wakely , "libstdc++" , gcc-patches X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Tue, 09 Nov 2021 16:25:17 -0000 On Mon, 8 Nov 2021 at 21:36, Fran=C3=A7ois Dumont wr= ote: > Yet another version this time with only 1 guard implementation. The > predicate to invalidate the safe iterators has been externalized. > > Ok to commit ? > I like this version a lot - thanks for persisting with it. OK to commit, thanks. As an aside ... --- a/libstdc++-v3/testsuite/util/testsuite_abi.h +++ b/libstdc++-v3/testsuite/util/testsuite_abi.h @@ -24,7 +24,11 @@ #include #if __cplusplus >=3D 201103L # include +# ifdef _GLIBCXX_DEBUG +namespace unord =3D std::_GLIBCXX_STD_C; +# else namespace unord =3D std; +# endif #else # include namespace unord =3D std::tr1; Several times I've been annoyed by the fact that we don't have a way to refer to std::_GLIBCXX_STD_C::vector etc. that is always valid, in normal mode and debug mode. Maybe we should add: namespace std { namespace _GLIBCXX_STD_C =3D ::std; } That way we can refer to std::_GLIBCXX_STD_C::foo in normal mode, and it will mean the same thing as in debug mode. So we don't need to use #if conditions like this.