From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by sourceware.org (Postfix) with ESMTPS id 8898D3858C50 for ; Tue, 12 Jul 2022 16:40:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8898D3858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f50.google.com with SMTP id l22-20020a05600c4f1600b003a2e10c8cdeso1031012wmq.1 for ; Tue, 12 Jul 2022 09:40:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=y/rMOUqW+NxjeJmE70FQNPYHws/zkru4Vuxf7aABYG4=; b=Hkykx+ilqdQtXNLE8lZhgFzgpoRmwgVFnuL/RQ7gfBPISCQmowT7Mi7vHqGMvNDmTW bmzVk5wMSNeJv4+HPWv5q7j/+uZ9opYKhnKMq57efY5lI/JNUZ9YMV3fw8MM2+xRWbkg 0QSHem3P7Ngdla9aI2W3tWqgZN2jDR9Be6XW0NvFpSBpPscg0YIsaqL6uVmwpypaN1Op /+a82tzFZcgO5TgtaUOhTrkoAKjZkKt6yjvrLL963HOQpNfIE0pMZ/1D5P4z6beCCHLc RQbYWO1HVclePSHCqTPejp+mRPulNdf54xMgdgUvFdXRLj0lhlh/v0FhGKIuPeb/GX5g fKSA== X-Gm-Message-State: AJIora/D8SibI4EVwdufiti5A3qBHTc1QNa0t7nj+OHINrW9qIrk43SJ oJIf21KPYmt4UgQ4CYWCpQKvl5f8JV8= X-Google-Smtp-Source: AGRyM1uKwjoJtdy42J73t9LSvigSLGTE19Cdj892pB/LE5+11XZOLgDjW25pzXtKj2IDib5iiJa9RQ== X-Received: by 2002:a05:600c:600d:b0:3a2:f046:cbbb with SMTP id az13-20020a05600c600d00b003a2f046cbbbmr3264435wmb.101.1657644011207; Tue, 12 Jul 2022 09:40:11 -0700 (PDT) Received: from ?IPv6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id b1-20020adfee81000000b0021bbdc3375fsm8789160wro.68.2022.07.12.09.40.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Jul 2022 09:40:10 -0700 (PDT) Subject: Re: [PATCH 1/2] Add gcc/make-unique.h To: Jonathan Wakely Cc: David Malcolm , gcc-patches References: <20220712002527.417444-1-dmalcolm@redhat.com> <03b8afc0-b917-e940-4995-9ba5493567c2@palves.net> <7f2ddb2d-da00-6852-339a-86c7d853087f@palves.net> From: Pedro Alves Message-ID: <55f00de5-6c6b-51f3-01d4-5f7710e2c792@palves.net> Date: Tue, 12 Jul 2022 17:40:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2022 16:40:15 -0000 On 2022-07-12 4:14 p.m., Jonathan Wakely wrote: >> So once GCC requires C++14, why would you want to preserve >> once-backported symbols in a namespace other than std, when you no longer have a reason to? >> It will just be another unnecessary thing that newcomers at that future time will have >> to learn. > > I also don't see a problem with importing std::make_unique into > namespace gcc for local use alongside other things in namespace gcc. I > do consider that idiomatic. It says "the make_unique for gcc code is > std::make_unique". It means you only need a 'using namespace gcc;' at > the top of a source file and you get access to everything in namespace > gcc, even if it is something like std::make_unique that was originally > defined in a different namespace. > If that's the approach, then GCC should import std::unique_ptr, std::move, std::foo, std::bar into the gcc namespace too, no? Are you really going to propose that?