220 3097 <19425b1d-6f18-4532-85aa-2bb58aab5d11@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: =?UTF-8?Q?Andrzej_Krzemie=C5=84ski?= <akrzemi1@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: A proposal to add swap traits to the standard library
Date: Fri, 15 Mar 2013 00:59:24 -0700 (PDT)
Lines: 135
Approved: news@gmane.org
Message-ID: <19425b1d-6f18-4532-85aa-2bb58aab5d11@isocpp.org>
References: <CA+Acj4fnCPDP2wPVts1B4Zaz6xzZ899=A=6ShTUqw_Ep5gN7pg@mail.gmail.com> <6c1f8dc8-faaa-4b25-aea9-5dbe95bde4d4@isocpp.org> <489b9128-09ba-48b6-a18e-965636e9a072@isocpp.org> <CA+Acj4cYuqtkt4Y+N8QSw2FBzHKNADmSLAz=LMDy9fM_guhqkw@mail.gmail.com> <CA+Acj4fFUBm3Z+Y+PziS5Vn8SV472jvHOVQjfBxjMEqAbXY9Uw@mail.gmail.com>
 <5142390A.2040507@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_974_10406188.1363334364028"
X-Trace: ger.gmane.org 1363334365 2697 80.91.229.3 (15 Mar 2013 07:59:25 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 15 Mar 2013 07:59:25 +0000 (UTC)
Cc: "Andrew C. Morrow" <andrew.c.morrow@gmail.com>
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDT2DGOJ34DBBXFJROFAKGQEJ6EQQLA@isocpp.org Fri Mar 15 08:59:50 2013
Return-path: <std-proposals+bncBDT2DGOJ34DBBXFJROFAKGQEJ6EQQLA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vb0-f72.google.com ([209.85.212.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDT2DGOJ34DBBXFJROFAKGQEJ6EQQLA@isocpp.org>)
	id 1UGPYK-00005o-7E
	for gclcip-std-proposals@m.gmane.org; Fri, 15 Mar 2013 08:59:48 +0100
Original-Received: by mail-vb0-f72.google.com with SMTP id ft2sf4133616vbb.11
        for <gclcip-std-proposals@m.gmane.org>; Fri, 15 Mar 2013 00:59:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:date:from:to:cc:message-id
         :in-reply-to:references:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:x-google-group-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=N7fJtZR8LQX/OqkdCCVZ1EijJzXD68RlDMLvuxL2Wmg=;
        b=ODslsAELD/LU98QxPJgkiiCU8md1PAF63mNVh5s8ccpLDM8KSs/Lob1TyYwhey0qQ7
         rjfJdJ5gbpVtEbLuNaw3uqS5QU8Z98Eu2Mfwq+cFl2e2Q2RkZx0ow1JI0TeVhxA0Szdl
         t4IGCNM4v7MirbRX/Ev+t4qPDxlPo7eF3T/7ggGLr7hQHCFVHQte/YPUA6ZXe/qIAXm5
         W1s/OXmMxe3HsZVyjmtJdDNfW7L9gPjjGGQKK6UVwPteM3SO/kXnc5nmiErEbVkgtY0j
         0RiPXMMWCleBNc2F3K+VerY1kY0fyW4kyGLXcSLV88wq643qU2GAzGXKYH8v08wUOj2l
         /zUQ==
X-Received: by 10.224.185.79 with SMTP id cn15mr2518043qab.4.1363334364768;
        Fri, 15 Mar 2013 00:59:24 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.12.34 with SMTP id v2ls287103qeb.76.gmail; Fri, 15 Mar 2013
 00:59:24 -0700 (PDT)
X-Received: by 10.49.106.131 with SMTP id gu3mr487594qeb.36.1363334364352;
        Fri, 15 Mar 2013 00:59:24 -0700 (PDT)
In-Reply-To: <5142390A.2040507@gmail.com>
X-Original-Sender: akrzemi1@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?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:3097
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/3097>

------=_Part_974_10406188.1363334364028
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable



W dniu czwartek, 14 marca 2013 21:54:34 UTC+1 u=BFytkownik Mikael Kilpel=E4=
inen=20
napisa=B3:
>
> 14.3.2013 20:50, Andrew C. Morrow kirjoitti:=20
> >=20
> > Any suggestions about how to repair this proposal given the problems=20
> > with is_swappable?=20
> >=20
>
> Not really. Sorry.=20
>
> I was experimenting with a version that has swap(...) that hides the=20
> std::swap to see if there is anything that matches via=20
> ADL and if not, use qualified std::swap and some more constraints. This=
=20
> works in normal cases fine, but=20
> of course there is this small gap between the template std::swap and the=
=20
> swap(...) where the adl version might match=20
> and hence you get wrong results again (you cannot hide the std::swap=20
> with same signature as it is as it gets pulled in by adl anyhow=20
> and it is ambigious, like Nikolay already noted).=20
>
> So I can only conclude, since you need the is_swappable for the main=20
> purpose, namely is_swappale_nothrow. Keep it there, explain=20
> the current problems with it and mention that something should probably=
=20
> be done about it (ie. constrain swap or ..) and let committee give=20
> feedback.=20
> And make sure that the nothrow version is the main purpose of this=20
> proposal.=20
>
> Of course we should continue thinking how to solve this but...=20
> Mikael=20
>

Sorry, if my suggestion is dumb (I am not entirely following the details),=
=20
but it looked like you have a problem with implementing the proposed traits=
=20
within the C++ language, rather than with the proposal itself. Did you=20
consider proposing a requirement that is not implementable within C++ but=
=20
could be provided by the vendors by some intrinsics or compiler magic (much=
=20
like other traits)?

Regards,
&rzej  =20

--=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/?hl=3Den.



------=_Part_974_10406188.1363334364028
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

<br><br>W dniu czwartek, 14 marca 2013 21:54:34 UTC+1 u=BFytkownik Mikael K=
ilpel=E4inen napisa=B3:<blockquote class=3D"gmail_quote" style=3D"margin: 0=
;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">14.3.20=
13 20:50, Andrew C. Morrow kirjoitti:
<br>&gt;
<br>&gt; Any suggestions about how to repair this proposal given the proble=
ms=20
<br>&gt; with is_swappable?
<br>&gt;
<br>
<br>Not really. Sorry.
<br>
<br>I was experimenting with a version that has swap(...) that hides the=20
<br>std::swap to see if there is anything that matches via
<br>ADL and if not, use qualified std::swap and some more constraints. This=
=20
<br>works in normal cases fine, but
<br>of course there is this small gap between the template std::swap and th=
e=20
<br>swap(...) where the adl version might match
<br>and hence you get wrong results again (you cannot hide the std::swap=20
<br>with same signature as it is as it gets pulled in by adl anyhow
<br>and it is ambigious, like Nikolay already noted).
<br>
<br>So I can only conclude, since you need the is_swappable for the main=20
<br>purpose, namely is_swappale_nothrow. Keep it there, explain
<br>the current problems with it and mention that something should probably=
=20
<br>be done about it (ie. constrain swap or ..) and let committee give feed=
back.
<br>And make sure that the nothrow version is the main purpose of this prop=
osal.
<br>
<br>Of course we should continue thinking how to solve this but...
<br>Mikael
<br></blockquote><div><br>Sorry, if my suggestion is dumb (I am not entirel=
y following the details), but it looked like you have a problem with implem=
enting the proposed traits within the C++ language, rather than with the pr=
oposal itself. Did you consider proposing a requirement that is not impleme=
ntable within C++ but could be provided by the vendors by some intrinsics o=
r compiler magic (much like other traits)?<br><br>Regards,<br>&amp;rzej &nb=
sp; <br></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/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_974_10406188.1363334364028--

.
