220 8390 <B210A8CE-D62D-4774-A2AF-A5C1C43D42B7@me.com> article
Path: news.gmane.org!not-for-mail
From: Dietmar Kuhl <dietmar.kuehl@me.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Proposal: Default swap operation
Date: Wed, 1 Jan 2014 03:17:01 +0100
Lines: 60
Approved: news@gmane.org
Message-ID: <B210A8CE-D62D-4774-A2AF-A5C1C43D42B7@me.com>
References: <c505e517-1c73-4486-b9dd-9ec15af1e649@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\))
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1388796149 3787 80.91.229.3 (4 Jan 2014 00:42:29 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 4 Jan 2014 00:42:29 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBAABB6VRTWLAKGQEIWONTWI@isocpp.org Sat Jan 04 01:42:35 2014
Return-path: <std-proposals+bncBAABB6VRTWLAKGQEIWONTWI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lb0-f197.google.com ([209.85.217.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBAABB6VRTWLAKGQEIWONTWI@isocpp.org>)
	id 1VzFJz-000106-9w
	for gclcip-std-proposals@m.gmane.org; Sat, 04 Jan 2014 01:42:35 +0100
Original-Received: by mail-lb0-f197.google.com with SMTP id u14sf26126703lbd.0
        for <gclcip-std-proposals@m.gmane.org>; Fri, 03 Jan 2014 16:42:35 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:subject:from:in-reply-to:date
         :message-id:references:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type:content-transfer-encoding;
        bh=cGCzbcTg/Q8r/1BcFuPI9d3oQQilEEaedii6jQNKnLU=;
        b=B98m+afeFgR5osGBRyDeNe8Rt9W1pajBjfPZ6NCA4F+MBiYmOoPLBvGH19/NCUAt0D
         rEsia2Ckq7JrN7ALIB2cKq6UBtKvJ4PCEPrzVkkg9kUkcWwxl3zk3rzVTZjE0GKk3Ge0
         wgcuxcFpJ2v7ckiZXvL92R8OSUSDtgSMCM5KDI9u2HADFMIkUcBjHp3EHu53s5vU2gDh
         QxGOM8Rd1y92iVW4ran4eNv4ZU1XNklTov4lx4lwC4YeZ9QfU08bWjIZA2ejm44V3V7K
         kpMCAHPQydMoZNOOUxoSK8H66J5JU8dFj8Gt3dfecKpseZr0DvMZi8rpPdxTz9NIZ0uC
         s98g==
X-Gm-Message-State: ALoCoQmqV47b5yur5dWINBVuw8EmHnoT6I8XU/0RhwXwTolDQxry8mbZPwTykyMTZaH8a7mscxQ+
X-Received: by 10.180.91.130 with SMTP id ce2mr88114wib.7.1388796154845;
        Fri, 03 Jan 2014 16:42:34 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.89.41 with SMTP id bl9ls146434wib.9.gmail; Fri, 03 Jan
 2014 16:42:34 -0800 (PST)
X-Received: by 10.180.126.2 with SMTP id mu2mr2352494wib.4.1388796154135;
        Fri, 03 Jan 2014 16:42:34 -0800 (PST)
Original-Received: by 10.194.216.231 with SMTP id ot7mswjc;
        Tue, 31 Dec 2013 18:17:02 -0800 (PST)
X-Received: by 10.180.75.115 with SMTP id b19mr50142795wiw.19.1388542622725;
        Tue, 31 Dec 2013 18:17:02 -0800 (PST)
Original-Received: from nm16.bullet.mail.ir2.yahoo.com (nm16.bullet.mail.ir2.yahoo.com. [212.82.96.39])
        by mx.google.com with SMTP id df6si19266872wjc.144.2013.12.31.18.17.02
        for <std-proposals@isocpp.org>;
        Tue, 31 Dec 2013 18:17:02 -0800 (PST)
Received-SPF: softfail (google.com: domain of transitioning dietmar.kuehl@me.com does not designate 212.82.96.39 as permitted sender) client-ip=212.82.96.39;
Original-Received: from [212.82.98.61] by nm16.bullet.mail.ir2.yahoo.com with NNFMP; 01 Jan 2014 02:17:02 -0000
Original-Received: from [46.228.39.104] by tm14.bullet.mail.ir2.yahoo.com with NNFMP; 01 Jan 2014 02:17:02 -0000
Original-Received: from [127.0.0.1] by smtp141.mail.ir2.yahoo.com with NNFMP; 01 Jan 2014 02:17:02 -0000
X-Yahoo-Newman-Id: 429976.8235.bm@smtp141.mail.ir2.yahoo.com
X-Yahoo-Newman-Property: ymail-3
X-YMail-OSG: Y0EYXZ0VM1mMdGLhf4K4HziuegspQyhOPZDWG73Gu.8EpPK
 Df_AGZ5YvZAMt1LH5pb2USLjdzBSvmh0QO7l1LSu5_WE874fkGFJxh2Lp0ra
 C1txYoEF.OMwpAJqRa9bpwSQz.Ldk0PJHYOxSnej2VliHZidSc156tCuyfpo
 saabeOGy_wKoER9JMYm3sulgWaz..AtF8B7_.77vwLHb.veFEvVFDR6cqzCm
 Ryr6OSHxBgXqU_0r4VzGw2ilBvmNlTu_A8PnP9nZS5hiopr74FADTNQ1u_Dz
 9BrN4ipX1n5ZfhfA5kHHp6WNAQ8dQLpq3ePrjv8YSz5i87i3xHcyIFReZfxn
 ZGFIhQUgZ8lbC6O5gBZNkKE1V11.9oZVFCFXEW53tgXPnfk_kTyTvXBWaqpq
 IQbP14MiIfo0c2UKL_V_c.7MHm5bUCdArMRTVJHJ9HuFt7jOL7so51pFuf9t
 tW2.SSMZvcE5jNIxidmbp_6SSNAbWxbm1_eJrbnsr1tpMDvCWhFlcxHGnGfb
 tNjREV8imCOv_CN54qbQ8.ToibvKZoyZ3
X-Yahoo-SMTP: jGL4fFmswBCDXhc_dhi0hMnBJmi0Kin0mXk-
X-Rocket-Received: from [192.168.178.43] (dietmar.kuehl@77.186.41.174 with plain [188.125.69.59])
        by smtp141.mail.ir2.yahoo.com with SMTP; 01 Jan 2014 02:17:02 +0000 UTC
In-Reply-To: <c505e517-1c73-4486-b9dd-9ec15af1e649@isocpp.org>
X-Mailer: Apple Mail (2.1827)
X-Original-Sender: dietmar.kuehl@me.com
X-Original-Authentication-Results: mx.google.com;       spf=softfail
 (google.com: domain of transitioning dietmar.kuehl@me.com does not designate
 212.82.96.39 as permitted sender) smtp.mail=dietmar.kuehl@me.com;
       dmarc=fail (p=NONE dis=NONE) header.from=me.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:8390
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8390>

I realize that I'm an awful spoil-sport but the desire to generate default =
versions of operator=3D=3D(), swap(), operator<(), I/O operations, and poss=
ibly other operations with varying degrees of design considerations is why =
I think this direction is a waste of time! Instead of even looking at propo=
sals to do any of these, we should concentrate our efforts on putting a suf=
ficient initial version of compile-time reflection together and provide the=
 necessary library components to have the corresponding operations generate=
d!

Since I stated this when a defaulted version of operator=3D=3D() was discus=
sed at the committee meeting and proponents of a default operator=3D=3D() b=
asically stated that their desire is more important than having a generic s=
olution, I expect the same to happen here and won't mention it again. Howev=
er, I will continue to consider any efforts of defaulting additional member=
s which isn't based on a generally available reflection system a waste of t=
ime. Note that this position is based on the merits of any specific proposa=
l for optionally defaulting member functions but rather on wanting a genera=
l solution in favour of many special solutions baked into the language.

On 1 Jan 2014, at 02:42, fmatthew5876@gmail.com wrote:

> Writing swap() is one of those boilerplate kinds of things that is usuall=
y trivial but annoying (and error prone when you change data members but fo=
rget to update swap()).
>=20
> Why not allow this:
>=20
> class Foo {
>   public:
>     void swap(Foo& f) =3D default;
>   private:
>     int a;
>     Bar b;
>     float c;
>     Baz* d;
> };
>=20
> Which would be the equivalent of this:
>=20
> void Foo::swap(Foo& f) {
>   using std::swap;
>   swap(a, f.a);
>   swap(b, f.b);
>   swap(c, f.c);
>   swap(d, f.d);
> }
>=20
> Any reason this wouldn't make it as a proposal?

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

.
