220 33023 <CAFk2RUaVNMX9ktdTTTZywzmmOh6zJVShRcnL_ppJeFnFDpm0nw@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: std::optional - support for sentinel values
Date: Thu, 29 Jun 2017 14:13:07 +0300
Lines: 30
Approved: news@gmane.org
Message-ID: <CAFk2RUaVNMX9ktdTTTZywzmmOh6zJVShRcnL_ppJeFnFDpm0nw@mail.gmail.com>
References: <6e23864f-827a-4bdb-89de-a60d8f5be993@isocpp.org>
 <CAFk2RUbRhek+uf3sjX9o8dugGMLbTMxEpLjqB43gEMOhNfirhg@mail.gmail.com>
 <9f81f2b9-958c-4018-9f78-a6ac2e425899@isocpp.org> <CAFk2RUa6KjAGsdr2-=490s+RNzYWFF+9W=FyiU29ScDR+2CJrg@mail.gmail.com>
 <730d0077-5a80-4dce-8250-19be62b1a23b@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1498734790 19003 195.159.176.226 (29 Jun 2017 11:13:10 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 29 Jun 2017 11:13:10 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC5JHI7A7ALRBRGB2PFAKGQEI7BEINI@isocpp.org Thu Jun 29 13:13:06 2017
Return-path: <std-proposals+bncBC5JHI7A7ALRBRGB2PFAKGQEI7BEINI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-io0-f200.google.com ([209.85.223.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBRGB2PFAKGQEI7BEINI@isocpp.org>)
	id 1dQXNh-0004bE-GE
	for gclcip-std-proposals@m.gmane.org; Thu, 29 Jun 2017 13:13:05 +0200
Original-Received: by mail-io0-f200.google.com with SMTP id r70sf6663399ioe.5
        for <gclcip-std-proposals@m.gmane.org>; Thu, 29 Jun 2017 04:13:11 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1498734790; cv=pass;
        d=google.com; s=arc-20160816;
        b=ZvP7WIZfhs/RFKbtIJHIPHUHryEE7fBODng3pDxkcGIGz/XItjdAVhqJPuJItSdn9e
         cbydNRY5oAcSM/IPMnEJ/mDKsvuRWIvvp6dxLH4gjWG5B4M5yi2E68hgdUDaOL3i59ry
         UVtBAjT3IKISDsLYwzg91qExKEfGUHGDvxSIhCO/E/sQoVeSKmQFIRT/NkvsRWWktfT3
         ShcVirHYEpku4c/IjkfGFAtG5l6MnLYEHQJhPC2VVCxbh2WXA2m3Y0iyJODyeSPWaa9Z
         xrm7CY7trbIxQ4yVpRDkmx7oDsivMkbQQQ9LEvR9UfVgIBA2G6pE8FypxuT62F7yYadI
         5mXA==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=/DaA2Fj1NJYcOh5l8jUoDkEZvqf+jUKe6KttuFDPlQo=;
        b=qC66uIotGi3ebVWha5XNSwdk8naOPhuIUCvDvPWnXPB2ouedzRQdIpwalQGaCIt+mu
         Kdl/ZDU3RWDl8o3T5kz6LBDZUF+p1NfPMC7vyaj0h6RMN1ekPU/C3sRwNQhpiNKDLwCP
         P37383gwqADoex7urCGWrsIj4F7FtN6wGobaHgAHn4/rsczIuNzkggoAq1GXz1GEjJTl
         y8mxxVQKueqAuHlnjBneCdGYq7kzRRR1m6TuI4e+DdQQlDiCOZ2OD60XmUXs2jdXQd3P
         dI476+kPDaOk6ZO0xwK9vn7mkch1KLTB5IXmdRUt7HnrACGYlbBE+yMmObU+G1862y5c
         OeNg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=QAsEiTLi;
       spf=pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:4001:c06::236 as permitted sender) smtp.mailfrom=ville.voutilainen@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=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:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=/DaA2Fj1NJYcOh5l8jUoDkEZvqf+jUKe6KttuFDPlQo=;
        b=j9vn1zzCsSjt0XiDzRbQh2PJHv/l8Un2+QeOwoIysP2SHid/Pt3FgmZSoDw4OweG+L
         nJmIdxl9Fw30ZF6Efj335KHyXvjWyH1KedL3vWz8hi64TZfu1MYmqlC3LNPckrFQqNM9
         P27ViXXGZzofRmPSBdev/JgX6KF5IgGwOKLBYa1fdo0Fp4ypVOWE0+5vbMQehb4CGxGO
         qIC0u/comLrALciQ3dco7CrSsYjwBH3xEfBi3n+xCiDl7SA3Y55I6NODt31hhJlTEPcD
         vVXrDYJN7MsqGrJ6CJ1bOamLe188k2I/XkLUD1RNaeAY7vu71KXOfLtmQCB5kCLAjL6L
         alcw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state: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-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=/DaA2Fj1NJYcOh5l8jUoDkEZvqf+jUKe6KttuFDPlQo=;
        b=PouOupXLa0EYx2wV5o6j/jvtCQmDUtUJz2ShsMDJsskc1PtuCy4WqHlwvWsRj4i9wv
         hH7ATLzmq/b+GUQcTZxT80LOoDVaMKpX2Ji+uayM4bL/X+fO7wcodFIt5rvt2/Hnhhli
         LUM304RYsqn6ItLNHqNGavAvz67U7HtwLk9I/FdzK0Lyq/F8/caLcqByLXpVMnBFS4LS
         droaCrLJxlPrnUQ1SiG17Qaqz8fiths60SjPduxb9IEvD/f9cR1cOHyw9uS54rEn1H+T
         /xEnIqt6dPELw0UlaDvLIR+gFAxRXG1DTTTO7xXDYtSJGyu3lExl55HZq+xjWjOHa0h/
         a2kg==
X-Gm-Message-State: AKS2vOyJ2gqkOmveS7mLo0W27YUVKYDdaOctqadzqdMnGwjojNmfzk6/
	kgDXjSd5z59KAG9J
X-Received: by 10.107.202.7 with SMTP id a7mr9308317iog.9.1498734790052;
        Thu, 29 Jun 2017 04:13:10 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.67.20 with SMTP id s20ls633827itb.3.gmail; Thu, 29 Jun 2017
 04:13:08 -0700 (PDT)
X-Received: by 10.36.91.129 with SMTP id g123mr1373698itb.0.1498734788538;
        Thu, 29 Jun 2017 04:13:08 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1498734788; cv=none;
        d=google.com; s=arc-20160816;
        b=F62cZE1nCHgdsnJ7NHNPsc6zeWxA8jXT2xx/7wmYs9kmN6qPM27gTaklvgNnhEzujo
         9YlZh9wykCYcD8vSA/akwDG6pY0EIEHEkXU0p4JySEujdPULCZfmaNt0cM+3JdHfrZcp
         MZ5l8bFjOfu7o/ayxf9VEYNTSyHiuAsW2bIEA0C9WRy/8irVv7i9HKm3ko5b5khMtdUG
         roe/cm4YAOVIfw8AlreEycNdnt0k8p1PrTFFB+8H42msExmYZ8LpgbWluVqVkjUYGnO1
         IcWQJH0JlU/JEyQY34IKIumSOKx4gagOV9/4ke7tmFhFoMTPA+u9D929HaMMEcdvf3fC
         SwWQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=Ufpji71WnP6FJyKxrMDkqQbVTZK0IlGqw2G5TPSxnw4=;
        b=Ax9X35SsB+aOC8yt/0WtAgE0prtjb6SXwv5TYriGEABDzLnic9LJNAzCotlcgSFbjv
         J8w9IL5uNhhK6oHO4xyanx4Vhsz1DkbI3PjjizRudPpKdlGHa1mnFE5w/ql7GgKR30Ca
         mrzmcAf+ek7FIuvGFJIlagCC8gdf41A6ydGChdf7puaRIj01h6XyDa7tK7psCN8Zt/dM
         Cdc4sq0u31mJ77N/pcGtO8h0mktbeFzJleVuf8/0mbwJ4OJS2TYVuTvUaevvLXPtzWRc
         Fq+bDq9Yk2HGNEQhM7+zMRd+bSqn6qgxOC+SOLnl5OraA+146jrNMIKw7Pf0BgLvk1PV
         L7SQ==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=QAsEiTLi;
       spf=pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:4001:c06::236 as permitted sender) smtp.mailfrom=ville.voutilainen@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from mail-io0-x236.google.com (mail-io0-x236.google.com. [2607:f8b0:4001:c06::236])
        by mx.google.com with ESMTPS id k195si4206810iok.285.2017.06.29.04.13.08
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 29 Jun 2017 04:13:08 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:4001:c06::236 as permitted sender) client-ip=2607:f8b0:4001:c06::236;
Original-Received: by mail-io0-x236.google.com with SMTP id h134so4889443iof.2
        for <std-proposals@isocpp.org>; Thu, 29 Jun 2017 04:13:08 -0700 (PDT)
X-Received: by 10.107.175.161 with SMTP id p33mr18320580ioo.20.1498734788161;
 Thu, 29 Jun 2017 04:13:08 -0700 (PDT)
Original-Received: by 10.36.122.211 with HTTP; Thu, 29 Jun 2017 04:13:07 -0700 (PDT)
In-Reply-To: <730d0077-5a80-4dce-8250-19be62b1a23b@isocpp.org>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.b=QAsEiTLi;       spf=pass (google.com: domain of
 ville.voutilainen@gmail.com designates 2607:f8b0:4001:c06::236 as permitted
 sender) smtp.mailfrom=ville.voutilainen@gmail.com;       dmarc=pass (p=NONE
 sp=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: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:33023
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33023>

On 29 June 2017 at 14:09, Igor Baidiuk <target.san@gmail.com> wrote:
>> It has nothing to do with includes. Altering the definition of
>> optional to conditionally use
>> a trait would be remotely feasible, but it would also be an abi-breaking
>> change.
>>
>
> Maybe I didn't express it well enough. I meant the case when someone
> declares such "sentinel" locally for module, and then return that option to
> unit where sentinel is not known.
> Then I realized this is well-possible even if new optional would have trait
> parameter.

Right; multiple translation units must agree, which makes it an odr-problem, not
an include-problem. The trait-approach might still work, it just
requires that the trait
gives the same result in every TU, but injecting such a trait-approach
into the current
optional is an abi break.

Going for a separate type is safe from that abi break, which
automatically removes some
automatic opposition from the picture.

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFk2RUaVNMX9ktdTTTZywzmmOh6zJVShRcnL_ppJeFnFDpm0nw%40mail.gmail.com.

.
