220 8338 <CAFk2RUac5YbozBydFq7VDcBz9YZyT7qpGtNkAiz8jzgx0U7xMw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Proposal: Default swap operation
Date: Wed, 1 Jan 2014 23:48:33 +0200
Lines: 32
Approved: news@gmane.org
Message-ID: <CAFk2RUac5YbozBydFq7VDcBz9YZyT7qpGtNkAiz8jzgx0U7xMw@mail.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>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1388612910 14287 80.91.229.3 (1 Jan 2014 21:48:30 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 1 Jan 2014 21:48:30 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5JHI7A7ALRBMU2SKLAKGQEFLAJFLA@isocpp.org Wed Jan 01 22:48:36 2014
Return-path: <std-proposals+bncBC5JHI7A7ALRBMU2SKLAKGQEFLAJFLA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oa0-f72.google.com ([209.85.219.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBMU2SKLAKGQEFLAJFLA@isocpp.org>)
	id 1VyTeV-0002Fm-Mx
	for gclcip-std-proposals@m.gmane.org; Wed, 01 Jan 2014 22:48:35 +0100
Original-Received: by mail-oa0-f72.google.com with SMTP id o6sf69063665oag.3
        for <gclcip-std-proposals@m.gmane.org>; Wed, 01 Jan 2014 13:48:34 -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:in-reply-to:references:date
         :message-id:subject:from: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=oL8lxRkuXAyJEy+Awtu5zvI4f0bgLJcqtfL0Ijkwiks=;
        b=ire/HZZYgo1DPyvBLYxwTAsErqajdkUsZ3aQxrwDB2/ryg8JU9d3XtzcZyZvEnLiot
         UmUvaFBFH4itH1u8nNcYGmFf5JgzsmQIDsAIqcp59bNqiPHmEvK8MPi04SFZhOPw1Rcv
         kuzcagGkNb7xUC5uy9Q2NkxjeLclp35pCUWccthyE3DukF8jN8g2to6fZDitCUuW8daY
         bUwa20zrrRouhDj8k2X7Ulara8ysIROyzqNdCUNLQmKNz/1QRzyVHkOsVcrQCqEEPoFv
         lAYbGcAGJor1bT27aQ4Q9AMQBLIQvahrJ94xzvDmcz2EWNpRepBcwR+aeddT5a26e7HH
         il2w==
X-Gm-Message-State: ALoCoQl6oPzejKQXVLPBee9CdugXGQHAvWpq5WmC/qiLAtvjceRpGnOtDA3J+0xpmM1VBCfFs6Lg
X-Received: by 10.50.79.201 with SMTP id l9mr32490970igx.4.1388612914764;
        Wed, 01 Jan 2014 13:48:34 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.48.82 with SMTP id j18ls4201017qen.49.gmail; Wed, 01 Jan
 2014 13:48:34 -0800 (PST)
X-Received: by 10.224.11.74 with SMTP id s10mr30684271qas.1.1388612914200;
        Wed, 01 Jan 2014 13:48:34 -0800 (PST)
Original-Received: from mail-qc0-x22b.google.com (mail-qc0-x22b.google.com [2607:f8b0:400d:c01::22b])
        by mx.google.com with ESMTPS id l5si756592qaf.69.2014.01.01.13.48.34
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 01 Jan 2014 13:48:34 -0800 (PST)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:400d:c01::22b as permitted sender) client-ip=2607:f8b0:400d:c01::22b;
Original-Received: by mail-qc0-f171.google.com with SMTP id c9so12829593qcz.16
        for <std-proposals@isocpp.org>; Wed, 01 Jan 2014 13:48:34 -0800 (PST)
X-Received: by 10.49.15.202 with SMTP id z10mr136152039qec.46.1388612914087;
 Wed, 01 Jan 2014 13:48:34 -0800 (PST)
Original-Received: by 10.224.104.139 with HTTP; Wed, 1 Jan 2014 13:48:33 -0800 (PST)
In-Reply-To: <52C488CB.3030805@gmail.com>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of ville.voutilainen@gmail.com designates 2607:f8b0:400d:c01::22b as
 permitted sender) smtp.mail=ville.voutilainen@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:8338
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8338>

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.

-- 

--- 
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/.

.
