From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 918713858410 for ; Wed, 8 Mar 2023 07:25:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 918713858410 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 946A71F383; Wed, 8 Mar 2023 07:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678260339; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=T/o+5qpa4QjwkKJPYfyLHfUM8qSLzpqH9Fm6aX6U800=; b=Zl1UHCfUwBJs/WFUohNoQiNMt+pr4li/RqeQu3Rcb7+5MLq0hM64Z9uZft/+kJQkV8dDRp k6z8D6kxlF1BS0dECCS9FvmOQ1J2P52UUp/GldpQyQVCWRTbNuBuyKFj80ZTJQ2uP7++jN mVVzjn02/BRRMncYePwlqm3P4VvntWU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678260339; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=T/o+5qpa4QjwkKJPYfyLHfUM8qSLzpqH9Fm6aX6U800=; b=jOL+blQmltwoHdCtiWh5sIC/O1LLOcyWazKwQlQLZ0FHRTM8UWPMB/D+bCijCa4783oZ2+ WYs1ibulZA6gySBw== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 835942C141; Wed, 8 Mar 2023 07:25:39 +0000 (UTC) Date: Wed, 8 Mar 2023 07:25:39 +0000 (UTC) From: Richard Biener To: Alexander Monakov cc: Jonathan Wakely , gcc-patches@gcc.gnu.org, Jakub Jelinek Subject: Re: [PATCH] [RFC] RAII auto_mpfr and autp_mpz In-Reply-To: Message-ID: References: <20230306101121.3CFDA13A66@imap2.suse-dmz.suse.de> <758f3df6-7d0c-0712-fd79-b6e391cb402d@ispras.ru> User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 8 Mar 2023, Alexander Monakov wrote: > > On Tue, 7 Mar 2023, Jonathan Wakely wrote: > > > > Shouldn't this use the idiom suggested in ansidecl.h, i.e. > > > > > > private: > > > DISABLE_COPY_AND_ASSIGN (auto_mpfr); > > > > > > Why? A macro like that (or a base class like boost::noncopyable) has > > some value in a code base that wants to work for both C++03 and C++11 > > (or later). But in GCC we know we have C++11 now, so we can just > > delete members. I don't see what the macro adds. > > Evidently it's possible to forget to delete one of the members, as > showcased in this very thread. Yes. And I copy&pasted from somewhere I forgot which also forgot it ... > The idiom is also slightly easier to read. Of course inconsistency in the code-base isn't helping that. auto_bitmap seems to declare but not define things (including move assign/CTOR?) Richard.