220 8361 <59bb86d3-995e-43dc-b5c3-0bf1bfc9620f@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Evgeny Panasyuk <evgeny.panasyuk@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Proposal: Default swap operation
Date: Thu, 2 Jan 2014 01:02:11 -0800 (PST)
Lines: 68
Approved: news@gmane.org
Message-ID: <59bb86d3-995e-43dc-b5c3-0bf1bfc9620f@isocpp.org>
References: <c505e517-1c73-4486-b9dd-9ec15af1e649@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_7305_12351074.1388653331614"
X-Trace: ger.gmane.org 1388653329 18727 80.91.229.3 (2 Jan 2014 09:02:09 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 2 Jan 2014 09:02:09 +0000 (UTC)
Cc: fmatthew5876@gmail.com
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC54TLGKR4LBBFGWSSLAKGQETA7HP2A@isocpp.org Thu Jan 02 10:02:16 2014
Return-path: <std-proposals+bncBC54TLGKR4LBBFGWSSLAKGQETA7HP2A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pd0-f200.google.com ([209.85.192.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC54TLGKR4LBBFGWSSLAKGQETA7HP2A@isocpp.org>)
	id 1VyeAS-0005eZ-Av
	for gclcip-std-proposals@m.gmane.org; Thu, 02 Jan 2014 10:02:16 +0100
Original-Received: by mail-pd0-f200.google.com with SMTP id p10sf42086039pdj.7
        for <gclcip-std-proposals@m.gmane.org>; Thu, 02 Jan 2014 01:02:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=m6Wt50qwIW/OyEzBi4PgrP3+jBPmZiPUoQ43wCburu4=;
        b=XAedAGYA+SuP27Ip/bcuXVk97lBC+rg+r6BF/5u9ChvMgJSzYnbFzIUizqo1cq8+O0
         wQKUA4RI/MfJWgsoved1v+btE4GWHQftiQcf0p4OJL7jzTRaYjlUFEOmtq2LlbjU3zxZ
         H2Gab9Ee5YudxejvSWySqCFGl8sSJ11/iRiYdhXZeyaEy9MkyaZQPjDC+POZ44lyBrED
         JNYYUB3zVfrs3U5WurDHriZw5RAQnCMCtZ7QnugkmhRIOTpI4BfDhiBOykBtwsoPc7pt
         61IqEyMCjL60IrX5zIhVf2ftWYF/6GWYIQ0PvC9NTw/vKL306X2EaiA5ZNhocjSpWkXK
         2ecg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:x-original-sender:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=m6Wt50qwIW/OyEzBi4PgrP3+jBPmZiPUoQ43wCburu4=;
        b=aerucuMgdgMHOixN6ftSU3Xq+Ay4XfRvCfzN7p9lrV1jGN2FErPnev9Qf+EvbJd2Qq
         q0QSxOWWWpCoWS0aftLtU/fuU3rbaJXruAl5hovazaSUKObBG1CBJ+s2fn3HBdHqGQCf
         gspgbqCelKSLli/KmccGQtmvcPM88ajCIOoW/Upj+wXzp6iIqz0Qv3gV9Qqu77L8aVr8
         ZHdGhZlcjIBtu167smugLpqEyog1OwVmsdLFe8UXIOgcFcOgcDT5xbeMoKXR6kJ3Dww5
         lVM+cZ3L6DReUeBniOxjDk2Cja9Yxjup3nT2ApP0I/CX/Ro2CxQVPHJcNeI3Cnf5UICf
         sq2Q==
X-Gm-Message-State: ALoCoQlizfQ/lgT6PboHBNxukMUWLrrYtCCQZc0/eHTzDg1sTAcVQ8I3LtMIeup47o/j9to/nATt
X-Received: by 10.68.104.163 with SMTP id gf3mr32861798pbb.7.1388653333017;
        Thu, 02 Jan 2014 01:02:13 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.131.4 with SMTP id oi4ls4205594qeb.76.gmail; Thu, 02 Jan
 2014 01:02:12 -0800 (PST)
X-Received: by 10.49.95.8 with SMTP id dg8mr3484qeb.24.1388653332290;
        Thu, 02 Jan 2014 01:02:12 -0800 (PST)
In-Reply-To: <c505e517-1c73-4486-b9dd-9ec15af1e649@isocpp.org>
X-Original-Sender: evgeny.panasyuk@gmail.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:8361
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8361>

------=_Part_7305_12351074.1388653331614
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable

1 jan 2014 =C7., 5:42:54 UTC+4 fmatth...@gmail.com:
>
> Writing swap() is one of those boilerplate kinds of things that is usuall=
y=20
> trivial but annoying (and error prone when you change data members but=20
> forget to update swap()).
> [...]
> Any reason this wouldn't make it as a proposal?
>

Compile time reflection is general solution for such kind of problems. It=
=20
would help to remove boilerplate for swap, and for all other cases like=20
hash_value, operator<, operator=3D=3D, etc.
I think we should get compile time reflection first - and check what kind=
=20
of experience it provides.

Here is example: http://coliru.stacked-crooked.com/a/1a1ae88f8b705f3d

--=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/.

------=_Part_7305_12351074.1388653331614
Content-Type: text/html; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">1 jan 2014&nbsp;=C7., 5:42:54 UTC+4 fmatth...@gmail.com:<b=
lockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;borde=
r-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">Writing swap() =
is one of those boilerplate kinds of things that is usually trivial but ann=
oying (and error prone when you change data members but forget to update sw=
ap()).<br>[...]<br><div>Any reason this wouldn't make it as a proposal?</di=
v></div></blockquote><div><br>Compile time reflection is general solution f=
or such kind of problems. It would help to remove boilerplate for swap, and=
 for all other cases like hash_value, operator&lt;, operator=3D=3D, etc.<br=
>I think we should get compile time reflection first - and check what kind =
of experience it provides.<br><br>Here is example: http://coliru.stacked-cr=
ooked.com/a/1a1ae88f8b705f3d<br></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_7305_12351074.1388653331614--

.
