220 2144 <CANh-dXkCNy5iVk3D0NZxRw9DifzZwou2KFi+r374cBV5fFRXFQ@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Jeffrey Yasskin <jyasskin@googlers.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: optional<T>, one more value or two states
Date: Thu, 24 Jan 2013 10:01:07 -0800
Lines: 27
Approved: news@gmane.org
Message-ID: <CANh-dXkCNy5iVk3D0NZxRw9DifzZwou2KFi+r374cBV5fFRXFQ@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> <CAGsORuDaFt3tweHJGe+XeWLjoMnCUc+r8-3uLR9JJVFYOmW3BA@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 1359050492 20822 80.91.229.3 (24 Jan 2013 18:01:32 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 24 Jan 2013 18:01:32 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDDM34EO6QDRB6PNQWEAKGQE4NH6SJA@isocpp.org Thu Jan 24 19:01:48 2013
Return-path: <std-proposals+bncBDDM34EO6QDRB6PNQWEAKGQE4NH6SJA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f198.google.com ([209.85.214.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDDM34EO6QDRB6PNQWEAKGQE4NH6SJA@isocpp.org>)
	id 1TyR7T-0005oS-Ka
	for gclcip-std-proposals@m.gmane.org; Thu, 24 Jan 2013 19:01:47 +0100
Original-Received: by mail-ob0-f198.google.com with SMTP id dn14sf4564249obc.1
        for <gclcip-std-proposals@m.gmane.org>; Thu, 24 Jan 2013 10:01:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlers.com; s=googlers;
        h=x-received:x-beenthere:x-received:x-received:received-spf
         :x-received:mime-version:in-reply-to:references:from:date:message-id
         :subject: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=3m4B9UmX+EBEyZsEoXtagE5eeVuB/yYY75+ZEzrveT4=;
        b=UrHk7NugY6sNKc2+Kd+YjYQaLJvc4pLspdiNoUR46zrdKStXqRipxbKDhoJj2YEKID
         z7eMBwRTsUSL2z4YdvJpx9OQNTIy4x8Rf7InedHXO9ShRpr4tKbSAut29YSexb0K5r3Y
         GePTpaOyBLVYjkf8PmxhjWJu8PnQUAFWmIVj4=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-received:x-beenthere:x-received:x-received:received-spf
         :x-received:mime-version:in-reply-to:references:from:date:message-id
         :subject:to:x-gm-message-state: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=3m4B9UmX+EBEyZsEoXtagE5eeVuB/yYY75+ZEzrveT4=;
        b=YKLEnKRdVyx0b3Iqt7PtuwsDMeStH5iZl+r04WuChYr/qi5J5mE8QSyGvbssY4aeyq
         eIo8weHu9JJhpblDpN4C+Ih39LZoP9Z4C8abmmkWlV/ahhuq0U8ZH3SA2C2BOWDjeDLe
         BcpKt233+NW0oCGsP3gaCG+saS70L3EYL2qE5HTIWwLvFW6OjcVOFrNjlSBLAnRxa48I
         3k0/Z1pTv284nyF2kE8Sg4RXkyX41XB9rvW3tyRkvoCwg8latf7b7tkUy/V9EoLc6iZ/
         +SSF5e9CpOo2IKPEFLhl 
X-Received: by 10.182.189.40 with SMTP id gf8mr737516obc.15.1359050489566;
        Thu, 24 Jan 2013 10:01:29 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.53.101 with SMTP id a5ls163625obp.51.gmail; Thu, 24 Jan
 2013 10:01:28 -0800 (PST)
X-Received: by 10.60.3.167 with SMTP id d7mr2168601oed.85.1359050488493;
        Thu, 24 Jan 2013 10:01:28 -0800 (PST)
X-Received: by 10.60.3.167 with SMTP id d7mr2168598oed.85.1359050488480;
        Thu, 24 Jan 2013 10:01:28 -0800 (PST)
Original-Received: from mail-oa0-f52.google.com (mail-oa0-f52.google.com [209.85.219.52])
        by mx.google.com with ESMTPS id ih6si2297292obb.199.2013.01.24.10.01.27
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Thu, 24 Jan 2013 10:01:27 -0800 (PST)
Received-SPF: pass (google.com: domain of jyasskin@google.com designates 209.85.219.52 as permitted sender) client-ip=209.85.219.52;
Original-Received: by mail-oa0-f52.google.com with SMTP id o6so10099789oag.39
        for <std-proposals@isocpp.org>; Thu, 24 Jan 2013 10:01:27 -0800 (PST)
X-Received: by 10.60.31.39 with SMTP id x7mr2269125oeh.45.1359050487193; Thu,
 24 Jan 2013 10:01:27 -0800 (PST)
Original-Received: by 10.182.150.36 with HTTP; Thu, 24 Jan 2013 10:01:07 -0800 (PST)
In-Reply-To: <CAGsORuDaFt3tweHJGe+XeWLjoMnCUc+r8-3uLR9JJVFYOmW3BA@mail.gmail.com>
X-Gm-Message-State: ALoCoQkY8hcITONghhw/Li1GEqQAXDg1k0k1UHaAZr0iU97mtyHLje3hXvzl7F745t+r/NKVjLNAvfMdK2LvJ23mBLdz6WNSSkD2b0b5pCAMr5+huOQI7fDw3fLFNRPy6GHJ17t5k+xLLFMnUWKOrbNZeTdkecbdqiXznj4Jye3sCanctousD1cUsgAUQRUdqAO/8/+RUdQl
X-Original-Sender: jyasskin@googlers.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of jyasskin@google.com designates 209.85.219.52 as permitted sender)
 smtp.mail=jyasskin@google.com;       dkim=pass header.i=@googlers.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:2144
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/2144>

On Thu, Jan 24, 2013 at 6:15 AM, Zhihao Yuan <lichray@gmail.com> wrote:
> 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

That proposal is for types that have a good reason to make their
conversions explicit. optional<T> has good reasons to make its
conversion implicit, and if convert() is adopted, those reasons
wouldn't go away.

-- 

--- 
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.



.
