220 2740 <CAOHCbiuw0zezce9kcXVsEcE=mPmp=93zQHSRMzUcNw6u3TCsBQ@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Tony V E <tvaneerd@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: optional references -- take 2
Date: Tue, 5 Feb 2013 12:23:44 -0500
Lines: 49
Approved: news@gmane.org
Message-ID: <CAOHCbiuw0zezce9kcXVsEcE=mPmp=93zQHSRMzUcNw6u3TCsBQ@mail.gmail.com>
References: <8d57e9e9-e4cc-441c-abeb-e6526531fad5@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1360085026 3126 80.91.229.3 (5 Feb 2013 17:23:46 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 5 Feb 2013 17:23:46 +0000 (UTC)
Cc: Sean Parent <sean_parent@mac.com>
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCUZ5QWKNQIKBAGFRACRUBGGYAV4A@isocpp.org Tue Feb 05 18:24:06 2013
Return-path: <std-proposals+bncBCUZ5QWKNQIKBAGFRACRUBGGYAV4A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vc0-f198.google.com ([209.85.220.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCUZ5QWKNQIKBAGFRACRUBGGYAV4A@isocpp.org>)
	id 1U2mFY-0002OB-8L
	for gclcip-std-proposals@m.gmane.org; Tue, 05 Feb 2013 18:24:04 +0100
Original-Received: by mail-vc0-f198.google.com with SMTP id m8sf476813vcd.9
        for <gclcip-std-proposals@m.gmane.org>; Tue, 05 Feb 2013 09:23:45 -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:cc: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
         :content-transfer-encoding;
        bh=2TiSi22TUWDx7JjBo0JaUknYm2y3/wYp3YKpxwpdSyU=;
        b=N0UnBLb6WCA517wFNYytm471410TfV5mbUJOen3XTeFTkkbiD1MY1H8bBu/VfMcat9
         a+5f12PK1KBS5AsoUjz4nL9xOgr/U6TfiTUqaoH1irPSSS0dDOrvZk4A/Co3MkJAqerC
         wlpRr1T9zBnIMVMx94A5ITxmBceTlUaB+GUE14ADlWPziX2Pxz0kiVi6lzc6j7ehZXAn
         4iRtIcUZzZPwECE1jhhp4FN7aQGTPUhP+7kW3+EplMImdNAOLJFOOQ/WdTx62Vp7GqsR
         cpdOqD5gky 
X-Received: by 10.236.132.104 with SMTP id n68mr11474814yhi.37.1360085025121;
        Tue, 05 Feb 2013 09:23:45 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.35.49 with SMTP id e17ls57341qej.59.gmail; Tue, 05 Feb 2013
 09:23:44 -0800 (PST)
X-Received: by 10.49.108.9 with SMTP id hg9mr22936429qeb.34.1360085024585;
        Tue, 05 Feb 2013 09:23:44 -0800 (PST)
X-Received: by 10.49.108.9 with SMTP id hg9mr22936427qeb.34.1360085024534;
        Tue, 05 Feb 2013 09:23:44 -0800 (PST)
Original-Received: from mail-qe0-f48.google.com (mail-qe0-f48.google.com [209.85.128.48])
        by mx.google.com with ESMTPS id q4si5538886qct.177.2013.02.05.09.23.44
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Tue, 05 Feb 2013 09:23:44 -0800 (PST)
Received-SPF: pass (google.com: domain of tvaneerd@gmail.com designates 209.85.128.48 as permitted sender) client-ip=209.85.128.48;
Original-Received: by mail-qe0-f48.google.com with SMTP id 3so200635qea.21
        for <std-proposals@isocpp.org>; Tue, 05 Feb 2013 09:23:44 -0800 (PST)
X-Received: by 10.224.146.136 with SMTP id h8mr19864669qav.97.1360085024415;
 Tue, 05 Feb 2013 09:23:44 -0800 (PST)
Original-Received: by 10.49.87.168 with HTTP; Tue, 5 Feb 2013 09:23:44 -0800 (PST)
In-Reply-To: <8d57e9e9-e4cc-441c-abeb-e6526531fad5@isocpp.org>
X-Original-Sender: tvaneerd@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of tvaneerd@gmail.com designates 209.85.128.48 as permitted sender)
 smtp.mail=tvaneerd@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:2740
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/2740>

On Mon, Feb 4, 2013 at 2:23 PM, Andrzej Krzemie=C5=84ski <akrzemi1@gmail.co=
m> wrote:
>> > I wanted to consult with people here one more thing about mixed relops=
..
>> > Assuming that we allow mixed relops for optional values, should we als=
o
>> > provide them for optional references?
>> >
>> > int i =3D 9;
>> > optional<int&> oi =3D i;
>> > return oi =3D=3D i; // should it work?
>> >
>>
>> Just to be clear, does it compare the values, or the ref?
>
>
> The values.
>
>
>
> mixed assignment is illegal. Use one of the following instead:
>
> *oi =3D j; // if you want to alter the referred-to object
> oi =3D {j}; // if you want to rebind a reference
>
>>
>
> Copy constructor and copy assignment are shallow: they only (re)bind a
> reference. Other operations are deep: this includes comparison (mixed or
> homogenous)
>

Is optional<T&> a RegularType?

Tony

--=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.



.
