220 2679 <510D670C.5020007@gmail.com> article
Path: news.gmane.org!not-for-mail
From: =?ISO-8859-1?Q?Mikael_Kilpel=E4inen?=
 <mikael.kilpelainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: A proposal to add swap traits to the standard library
Date: Sat, 02 Feb 2013 20:20:44 +0100
Lines: 37
Approved: news@gmane.org
Message-ID: <510D670C.5020007@gmail.com>
References: <CA+Acj4fnCPDP2wPVts1B4Zaz6xzZ899=A=6ShTUqw_Ep5gN7pg@mail.gmail.com> <1359827596.1381.2.camel@Nokia-N900> <41C25E3D-C254-43AE-BFEA-ED83B7DAF74E@gmail.com> <CAFk2RUaUGEho5k4pNqHyM6uv13q9FAjC7mGFhdN_GJ7nbRLu2A@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Trace: ger.gmane.org 1359832872 24654 80.91.229.3 (2 Feb 2013 19:21:12 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 2 Feb 2013 19:21:12 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDHYRTPW4EBRBKOOWWEAKGQEAOPMLJQ@isocpp.org Sat Feb 02 20:21:33 2013
Return-path: <std-proposals+bncBDHYRTPW4EBRBKOOWWEAKGQEAOPMLJQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wg0-f69.google.com ([74.125.82.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDHYRTPW4EBRBKOOWWEAKGQEAOPMLJQ@isocpp.org>)
	id 1U1ieZ-0000sh-TP
	for gclcip-std-proposals@m.gmane.org; Sat, 02 Feb 2013 20:21:31 +0100
Original-Received: by mail-wg0-f69.google.com with SMTP id fn15sf5656415wgb.8
        for <gclcip-std-proposals@m.gmane.org>; Sat, 02 Feb 2013 11:21:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:x-received:received-spf
         :x-received:message-id:date:from:user-agent:mime-version:to:subject
         :references:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-google-group-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=FcPMa9g4lTZ8AFKIdXg9kx9MpK77PQjGlDHlWJUavwU=;
        b=u0o2e3p4eyun2MOrLBP1BQYErjctjEXnnmUp7qh8veQfYehirfksSv9o5G/6ZZaUxl
         /cAQJNSE4cuj3BRfBOPkhwUh6QS9XKTKkqXCzjqAxNk+miSNlzkLqef5U+c5hlUSYdK4
         M19dkDnMxZtuiFLGg6ICc2DOxLOi39I8RbIee8WJbNKii6WMO+/oQoMvb90SD8zp8dSw
         lxMFE5vtfteYDejiSBadXf2hUCNz5f9/AaQUynmB+EJT4XMtjqmIAUudVgoIEpTHe/VZ
         cUFNvchdG3MFoHWRV9B4v3ZcQaKSLfyAkYafSO 
X-Received: by 10.180.102.69 with SMTP id fm5mr625053wib.0.1359832873600;
        Sat, 02 Feb 2013 11:21:13 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.107.5 with SMTP id gy5ls421870wib.6.gmail; Sat, 02 Feb
 2013 11:21:12 -0800 (PST)
X-Received: by 10.14.178.196 with SMTP id f44mr53576291eem.14.1359832872849;
        Sat, 02 Feb 2013 11:21:12 -0800 (PST)
X-Received: by 10.14.178.196 with SMTP id f44mr53576289eem.14.1359832872819;
        Sat, 02 Feb 2013 11:21:12 -0800 (PST)
Original-Received: from mail-ee0-f43.google.com (mail-ee0-f43.google.com [74.125.83.43])
        by mx.google.com with ESMTPS id d45si19577233eem.95.2013.02.02.11.21.12
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sat, 02 Feb 2013 11:21:12 -0800 (PST)
Received-SPF: pass (google.com: domain of mikael.kilpelainen@gmail.com designates 74.125.83.43 as permitted sender) client-ip=74.125.83.43;
Original-Received: by mail-ee0-f43.google.com with SMTP id c50so2657597eek.2
        for <std-proposals@isocpp.org>; Sat, 02 Feb 2013 11:21:12 -0800 (PST)
X-Received: by 10.14.214.67 with SMTP id b43mr53623865eep.33.1359832872614;
        Sat, 02 Feb 2013 11:21:12 -0800 (PST)
Original-Received: from [192.168.1.72] (koln-4db4f39d.pool.mediaWays.net. [77.180.243.157])
        by mx.google.com with ESMTPS id h5sm18810947eem.1.2013.02.02.11.21.11
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sat, 02 Feb 2013 11:21:12 -0800 (PST)
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
In-Reply-To: <CAFk2RUaUGEho5k4pNqHyM6uv13q9FAjC7mGFhdN_GJ7nbRLu2A@mail.gmail.com>
X-Original-Sender: mikael.kilpelainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of mikael.kilpelainen@gmail.com designates 74.125.83.43 as permitted
 sender) smtp.mail=mikael.kilpelainen@gmail.com;       dkim=pass header.i=@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:2679
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/2679>

2.2.2013 20:12, Ville Voutilainen kirjoitti:
> On 2 February 2013 20:00, Howard Hinnant <howard.hinnant@gmail.com> wrote:
>> On Feb 2, 2013, at 12:53 PM, Ville Voutilainen <ville.voutilainen@gmail.com> wrote:
>>> Just quickly, what's the issue with
>>> noexcept(swap(x, y)) ?
>> Challenge:  Make this code compile without a using directive or using declaration:
> Wow. I think "wtf". Utterly baffled. :) I didn't mean to say that this
> proposal is
> unnecessary, but your example seems to indicate it's definitely worth
> considering.
> In other words, I tried it quickly, and with all the expertise I have,
> I don't want
> to try further. Perhaps I'm missing something, but why doesn't it work?
>
Because you are calling the swap with ints.. so no ADL to find the 
std::swap .. you can make it compile by having


void swap(int& a, int& b) noexcept {
    std::swap(a, b);
}

before the foo..  Or am i totally mistaken here?


Mikael

-- 

--- 
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 email 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-proposals/?hl=en.



.
