220 2127 <CAGsORuDaFt3tweHJGe+XeWLjoMnCUc+r8-3uLR9JJVFYOmW3BA@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Zhihao Yuan <lichray@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: optional<T>, one more value or two states
Date: Thu, 24 Jan 2013 08:15:49 -0600
Lines: 27
Approved: news@gmane.org
Message-ID: <CAGsORuDaFt3tweHJGe+XeWLjoMnCUc+r8-3uLR9JJVFYOmW3BA@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>
	<51013FC6.9080907@bubblescope.net>
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 1359036949 21503 80.91.229.3 (24 Jan 2013 14:15:49 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 24 Jan 2013 14:15:49 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCUILMGRQMARBFUEQWEAKGQEV5UBAKY@isocpp.org Thu Jan 24 15:16:08 2013
Return-path: <std-proposals+bncBCUILMGRQMARBFUEQWEAKGQEV5UBAKY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-we0-f197.google.com ([74.125.82.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCUILMGRQMARBFUEQWEAKGQEV5UBAKY@isocpp.org>)
	id 1TyNb6-0005gO-G9
	for gclcip-std-proposals@m.gmane.org; Thu, 24 Jan 2013 15:16:08 +0100
Original-Received: by mail-we0-f197.google.com with SMTP id t44sf310088wey.4
        for <gclcip-std-proposals@m.gmane.org>; Thu, 24 Jan 2013 06:15:51 -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=3eKjC/gYTsm9duNlU1G3f0P2u6ePRsSweUpN2oQj9gY=;
        b=p7VMWgzBRW4/RZD/hTWancW5wFa3u1XNugf5RxMm9bkLEDUx3ItPn0Y8FJ1fZgT9DM
         NL4+uOFN+bmqdgmUBWo6c4xgmYN2hFFCfvzbiy9up8cRIt7cvcgHWXsUKO73q090BuNo
         bbaPoCaD2NMFwHruVwWc7IWqhrbOoVMQ8WYduW/Xn4Wjui3pCQU9Ui6QHMKqFGWWK7wV
         mDPh8pcyuaZGf36WlzOTLEhSbV9tqOBEJ6eYM0CkO6CB+7F3vlSdEJQqkKwiIHIPXiND
         GjuLlv+TqpUF/9pFl4fVGkJrjYEIsCWvb35u/B6L8MwH4nGIa 
X-Received: by 10.152.144.135 with SMTP id sm7mr668250lab.3.1359036950935;
        Thu, 24 Jan 2013 06:15:50 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.125.171 with SMTP id mr11ls36982lab.72.gmail; Thu, 24 Jan
 2013 06:15:50 -0800 (PST)
X-Received: by 10.112.17.108 with SMTP id n12mr848868lbd.21.1359036950444;
        Thu, 24 Jan 2013 06:15:50 -0800 (PST)
X-Received: by 10.112.17.108 with SMTP id n12mr848866lbd.21.1359036950418;
        Thu, 24 Jan 2013 06:15:50 -0800 (PST)
Original-Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com [209.85.217.178])
        by mx.google.com with ESMTPS id v2si10663735lbj.219.2013.01.24.06.15.50
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Thu, 24 Jan 2013 06:15:50 -0800 (PST)
Received-SPF: pass (google.com: domain of lichray@gmail.com designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178;
Original-Received: by mail-lb0-f178.google.com with SMTP id n1so4693003lba.23
        for <std-proposals@isocpp.org>; Thu, 24 Jan 2013 06:15:50 -0800 (PST)
X-Received: by 10.112.17.137 with SMTP id o9mr917708lbd.15.1359036949953; Thu,
 24 Jan 2013 06:15:49 -0800 (PST)
Original-Received: by 10.112.75.131 with HTTP; Thu, 24 Jan 2013 06:15:49 -0800 (PST)
In-Reply-To: <51013FC6.9080907@bubblescope.net>
X-Original-Sender: lichray@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of lichray@gmail.com designates 209.85.217.178 as permitted sender)
 smtp.mail=lichray@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:2127
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/2127>

On Thu, Jan 24, 2013 at 8:05 AM, Chris Jefferson
<chris@bubblescope.net> wrote:> True. But looking at the boost mailing
list and bug reports, there does not
> I have written quite a lot of code with boost::optional, it is very common
> to make an optional<T> from a T, in 'return' statements for example. Having
> to add an explicit cast to all of those would annoy me.

Jeffery proposed a convert() utility to solve a problem like this:

http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3521.html

--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://4bsd.biz/

-- 

--- 
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.



.
