From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id E6B583858C50 for ; Tue, 12 Jul 2022 18:22:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E6B583858C50 Received: by mail-ej1-x631.google.com with SMTP id mf4so14628881ejc.3 for ; Tue, 12 Jul 2022 11:22:15 -0700 (PDT) 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=EH1lc26ktSP62liFkHT9lqYPZ48pzdf3WR60FwRGWw8=; b=YRtOOvfjWojOQ32vVIeZ0LB1N3OGSjrUVFKT+deHNJg1rOsfRvAdOfl9e3grAKx8SK Bu2YnndNkb6DPFHX6A7merXwXxNmgRWzZ69DSN5tPnOGJ5BLXI6jYD1KEi9mv46J+Uhf Z+BaA1E1DjbpxMpJvbd6HlqdkbKNRLHcOdoM5rLXfFgx4kAAL1fgvdxcQfpLHdiUW8Ak OjoKEo8+ffCqx/l7C78/ad+qIXj/DiSjQkLUOAka5W9lbBVfvyLc9bmHj9bRr2C7Wvhp 8OaJRQ0s2R49JrMeZKGMfX8fbdvuitJ9CebNpdXCvsFnmsMPLklCtUMHN1ghd2FVLFl/ aQgA== X-Gm-Message-State: AJIora/BYMLpIO2GHUQfw93HYRNBA2Ow+124F7eZnI2qUSzTQ5C8N8V4 oRJG+vcmpnLPZN4n2sGVFnJbs1PSNyDCB4ruFp8= X-Google-Smtp-Source: AGRyM1tVryd7G2zcxMnjhIkSCJxw7dq/hmukGAnxu5gr5yzZh6XGaWYS+s0S9Y/rrpX/I3fOv8uyQ39ETr1/lib4EBg= X-Received: by 2002:a17:907:9627:b0:72b:6d22:4334 with SMTP id gb39-20020a170907962700b0072b6d224334mr7926332ejc.506.1657650134822; Tue, 12 Jul 2022 11:22:14 -0700 (PDT) MIME-Version: 1.0 References: <20220712002527.417444-1-dmalcolm@redhat.com> <03b8afc0-b917-e940-4995-9ba5493567c2@palves.net> <7f2ddb2d-da00-6852-339a-86c7d853087f@palves.net> <55f00de5-6c6b-51f3-01d4-5f7710e2c792@palves.net> In-Reply-To: <55f00de5-6c6b-51f3-01d4-5f7710e2c792@palves.net> From: Jonathan Wakely Date: Tue, 12 Jul 2022 19:22:01 +0100 Message-ID: Subject: Re: [PATCH 1/2] Add gcc/make-unique.h To: Pedro Alves Cc: David Malcolm , gcc-patches X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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 18:22:17 -0000 On Tue, 12 Jul 2022, 17:40 Pedro Alves, wrote: > 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? > No, I don't follow the logic of "if you do it for one thing you must do it for everything". That's a straw man. But I don't really mind how this gets done. Your suggestion is fine. >