220 2364 <CAFk2RUa+T=SF31OVA5PJgzf70c8yox5ZT-S8+uuJdY6amrOtjg@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: optional<T>, one more value or two states
Date: Sun, 27 Jan 2013 22:55:38 +0200
Lines: 30
Approved: news@gmane.org
Message-ID: <CAFk2RUa+T=SF31OVA5PJgzf70c8yox5ZT-S8+uuJdY6amrOtjg@mail.gmail.com>
References: <CAGsORuC1ADLXgS9AZZiTo=knmhT-+9Yj+82v+b8Nq_WJpb1fOg@mail.gmail.com>
	<CAFk2RUZyZA0LLUNuVNcnibv+qBF69jMytWQL3tkp-Kp21oEU+A@mail.gmail.com>
	<CAGsORuB-Qkx-LaXj2jO4yLrwN524kiJONSg7oczkQZHYaJ6ASg@mail.gmail.com>
	<d360a952-28ae-4d57-bb20-96fd08725a0b@isocpp.org>
	<CAPXezF_JggyMaXjGS9r1EAGVu1NhQBEyGEXB8tKmVqgFfjoCeg@mail.gmail.com>
	<CALJmx62zJd_tZ=XYL7TaSkRN6432SObwH9YS87eLX-h_pMuFYQ@mail.gmail.com>
	<CAOHCbivAK0ypmMhrhJ3zKpF8BHu3h_rUNzeao-HnibJkC-qqGw@mail.gmail.com>
	<ef15483d-5665-4da3-9b79-aefd3c725e1b@isocpp.org>
	<CAOHCbithEUfm+w_06V71=hpkqGUJvqiyDFqD7fesfgLy4uUieg@mail.gmail.com>
	<2c2b9360-8e5e-422d-9b85-124bd947b004@isocpp.org>
	<123b9f65-12fd-4285-bb6c-cfee383d4552@isocpp.org>
	<CAHOE3yeF6KBBz7a1uw58oA3Shh_w0HFGiLtUGEd4ntJAKBauew@mail.gmail.com>
	<CAFk2RUZXrc5MoLdR8ie_kJqwLS1byqpv96qNX4XeEKNnXPu9hQ@mail.gmail.com>
	<CAHOE3ydsbjeP9OJhiC-5BYOnxoqUV3PUF2n6Mkf-VTN9_hJDKg@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
X-Trace: ger.gmane.org 1359320139 14403 80.91.229.3 (27 Jan 2013 20:55:39 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 27 Jan 2013 20:55:39 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5JHI7A7ALRBS5IS2EAKGQE7U5A5NQ@isocpp.org Sun Jan 27 21:55:59 2013
Return-path: <std-proposals+bncBC5JHI7A7ALRBS5IS2EAKGQE7U5A5NQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f200.google.com ([209.85.214.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBS5IS2EAKGQE7U5A5NQ@isocpp.org>)
	id 1TzZGf-0003f3-TH
	for gclcip-std-proposals@m.gmane.org; Sun, 27 Jan 2013 21:55:58 +0100
Original-Received: by mail-ob0-f200.google.com with SMTP id un3sf12427615obb.7
        for <gclcip-std-proposals@m.gmane.org>; Sun, 27 Jan 2013 12:55:39 -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
         :mime-version:x-received:in-reply-to:references:date:message-id
         :subject:from: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=UWrofTSC9NnhTeJ2R/cKVx0+XauCwKoSuKIgwDaZNOA=;
        b=RSEKOEZG3/G9KxQS9Mic4LmMhreYsUYn7VyCGdRTN+fKiPhsRj9W7JKxtv7E8M1KD4
         oyPsWAz1oy1mskw40nNBrKyE1uYx7xLipNGq1+DwZ7X0VGaQq5wUD+KncFFK8zqBVred
         0bAoPCKk96yDhwlBhn3+XdzaJV7hI/5g+wIK78OXHV8+KX0goDIpZ3IHa2gexMFSIXJ8
         mWEHMwjCjs+5xCtf1BKcywIdk3FwDK/o1s35foctMw3lSjrRV5yjOxTHCOzUZE9Go7TW
         4yOqNEjCHfYnGTFUhBUfSthrHH7dAgSbGFSzOfRXYpfUHKOY5 
X-Received: by 10.182.160.101 with SMTP id xj5mr1890577obb.44.1359320139495;
        Sun, 27 Jan 2013 12:55:39 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.185.5 with SMTP id ey5ls180216obc.49.gmail; Sun, 27 Jan
 2013 12:55:39 -0800 (PST)
X-Received: by 10.182.150.72 with SMTP id ug8mr9705527obb.1.1359320139035;
        Sun, 27 Jan 2013 12:55:39 -0800 (PST)
X-Received: by 10.182.150.72 with SMTP id ug8mr9705526obb.1.1359320139022;
        Sun, 27 Jan 2013 12:55:39 -0800 (PST)
Original-Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173])
        by mx.google.com with ESMTPS id y4si7814864obv.99.2013.01.27.12.55.39
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 27 Jan 2013 12:55:39 -0800 (PST)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 209.85.214.173 as permitted sender) client-ip=209.85.214.173;
Original-Received: by mail-ob0-f173.google.com with SMTP id dn14so2169632obc.18
        for <std-proposals@isocpp.org>; Sun, 27 Jan 2013 12:55:38 -0800 (PST)
X-Received: by 10.182.40.71 with SMTP id v7mr859959obk.85.1359320138910; Sun,
 27 Jan 2013 12:55:38 -0800 (PST)
Original-Received: by 10.76.108.82 with HTTP; Sun, 27 Jan 2013 12:55:38 -0800 (PST)
In-Reply-To: <CAHOE3ydsbjeP9OJhiC-5BYOnxoqUV3PUF2n6Mkf-VTN9_hJDKg@mail.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 209.85.214.173 as permitted
 sender) smtp.mail=ville.voutilainen@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:2364
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/2364>

On 27 January 2013 22:48, Daniel James <dnljms@gmail.com> wrote:
>>>     auto x = y;
>>>     *x = 2;
>>> Then for any standard type this is equivalent to assigning '2' to
>>> whatever y points to. By using 'operator*' in std::optional, the
>>> semantics of 'operator*' will be changed. That shouldn't be done
>>> lightly, especially since with templates and 'auto' a type is defined
>>> by the functions and operators that it supports..
>> What semantics does that change? The code assigns to what x points
>> to, x just happens to be optional<T>, which is intrusive and points to
>> the guts of itself. I don't see a semantic violation there.
> x and y point to different things with std::optional. Same code,
> different results = semantic change.

Yes? x and y point to different things also if y is of the proposed
value_ptr type.
They point to different things if y is an auto_ptr. So there are
already exceptions
to this alleged rule, and chances are there's more exceptions coming.

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To post to this group, send email to std-proposals@isocpp.org.
To unsubscribe from this group, send email to std-proposals+unsubscribe@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.



.
