220 8339 <52C4908B.2030606@gmail.com> article
Path: news.gmane.org!not-for-mail
From: Matthew Woehlke <mwoehlke.floss@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Proposal: Default swap operation
Date: Wed, 01 Jan 2014 17:02:51 -0500
Lines: 41
Approved: news@gmane.org
Message-ID: <52C4908B.2030606@gmail.com>
References: <c505e517-1c73-4486-b9dd-9ec15af1e649@isocpp.org>	<-414611097405781448@gmail297201516>	<52C456C5.8000407@gmail.com>	<1429572.pH5kxD60ME@tjmaciei-mobl2>	<CAFk2RUbQ0uHfJUJiVM3mDrpAZW9TZ+1yJkfQnZnQtO3gfHcvFw@mail.gmail.com>	<52C488CB.3030805@gmail.com> <CAFk2RUac5YbozBydFq7VDcBz9YZyT7qpGtNkAiz8jzgx0U7xMw@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 1388613771 22282 80.91.229.3 (1 Jan 2014 22:02:51 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 1 Jan 2014 22:02:51 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC37LBFWUIFBBDNBSKLAKGQEMQ37X7A@isocpp.org Wed Jan 01 23:02:55 2014
Return-path: <std-proposals+bncBC37LBFWUIFBBDNBSKLAKGQEMQ37X7A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yh0-f69.google.com ([209.85.213.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC37LBFWUIFBBDNBSKLAKGQEMQ37X7A@isocpp.org>)
	id 1VyTsM-0005eA-J0
	for gclcip-std-proposals@m.gmane.org; Wed, 01 Jan 2014 23:02:54 +0100
Original-Received: by mail-yh0-f69.google.com with SMTP id a41sf17104061yho.0
        for <gclcip-std-proposals@m.gmane.org>; Wed, 01 Jan 2014 14:02:53 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state: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:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=K6Ob8Z+nuHRyVlI86f+agcwnN+CwoIRgAAcCKzDaUaU=;
        b=gspD+mWOWdvOdNhzXOKGZp9f08s0wjTArAQnKPbc3p3adr3CClaA3cGZZS7Fhnj0/y
         MgVnT27AwmnxXKpSZnuYBG0df3mwVSLsVyGxG/oOjXDepL5j1Or+VyFRNE1x5OVRpwWh
         kaakoNX2J9wGwmIrgCdDzcyYcam/21RBfoP5ipAayh1A4TBPlYjfeoekQC2kX9ORekb1
         pzwWLyNwd4coT2dp+0xfTQDdRBq/RqW+ThOGVRACkhnGyrfJjGxNi8LhcdZap85y9VI4
         js2A4DO7vT4oa8QMAKBKPnkD6Sbt+buTu3jnOGuIm+SKtxSsVQNZnXs0A8f7w+9WQZIS
         /LIA==
X-Gm-Message-State: ALoCoQkO23XBDXJWy8uNxIuZBQW0CUJXlN1L7bFwiJ5yGErDLtabVgf67UWef836/9a+ViOpBN+Y
X-Received: by 10.224.162.212 with SMTP id w20mr30764690qax.5.1388613773717;
        Wed, 01 Jan 2014 14:02:53 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.94.41 with SMTP id cz9ls4353968qeb.57.gmail; Wed, 01 Jan
 2014 14:02:53 -0800 (PST)
X-Received: by 10.224.90.6 with SMTP id g6mr28473451qam.87.1388613773362;
        Wed, 01 Jan 2014 14:02:53 -0800 (PST)
Original-Received: from mail-ig0-x22d.google.com (mail-ig0-x22d.google.com [2607:f8b0:4001:c05::22d])
        by mx.google.com with ESMTPS id q6si51658098qag.120.2014.01.01.14.02.53
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 01 Jan 2014 14:02:53 -0800 (PST)
Received-SPF: pass (google.com: domain of mwoehlke.floss@gmail.com designates 2607:f8b0:4001:c05::22d as permitted sender) client-ip=2607:f8b0:4001:c05::22d;
Original-Received: by mail-ig0-f173.google.com with SMTP id ut6so1329671igb.0
        for <std-proposals@isocpp.org>; Wed, 01 Jan 2014 14:02:53 -0800 (PST)
X-Received: by 10.50.239.131 with SMTP id vs3mr53892280igc.34.1388613772939;
        Wed, 01 Jan 2014 14:02:52 -0800 (PST)
Original-Received: from [192.168.1.181] (tripoint.kitware.com. [66.194.253.20])
        by mx.google.com with ESMTPSA id w4sm70795170igb.5.2014.01.01.14.02.52
        for <multiple recipients>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 01 Jan 2014 14:02:52 -0800 (PST)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0
In-Reply-To: <CAFk2RUac5YbozBydFq7VDcBz9YZyT7qpGtNkAiz8jzgx0U7xMw@mail.gmail.com>
X-Original-Sender: mwoehlke.floss@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of mwoehlke.floss@gmail.com designates 2607:f8b0:4001:c05::22d as
 permitted sender) smtp.mail=mwoehlke.floss@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=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:8339
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8339>

On 2014-01-01 16:48, Ville Voutilainen wrote:
> On 1 January 2014 23:29, Matthew Woehlke <mwoehlke.floss@gmail.com> wrote:
>> On 2014-01-01 14:53, Ville Voutilainen wrote:
>>> I don't see any wording in the standard that would require other TUs to
>>> see the =default to use the function.
>>
>>
>> I'm inclined to agree. I didn't consult the spec, but when I tried using it
>> in a project, I am not seeing link errors that I would expect if the
>> definition wasn't available to other TU's. (And I *do* see link errors if I
>> omit the dtor definition entirely, so the dtor is definitely being
>> referenced.)
>>
>> I'd also be curious about your reading of the spec. It may be that
>> technically such a program is ill-formed, but existing compilers (or at
>> least gcc) "DTRT" (i.e. behave in the desired manner) anyway?
>
>
> I have no reason to believe a program that defaults a special member
> after the first declaration is in any way ill-formed, quite the contrary.
> And I have no reason to believe such a definition wouldn't be accessible
> to other TUs. Both of these statements are based on my reading of the
> spec, it specifically allows defaulting after first declaration, and there's
> nothing saying such a definition is in any way static.

Right. Thiago, do we convince you? If not, would you kindly explain your 
take? (And/or does anyone know of any compilers that don't behave this way?)

Thanks,

-- 
Matthew

-- 

--- 
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/.

.
