220 33024 <20170629111649.5132370.85419.32148@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Tony V E <tvaneerd@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: std::optional - support for sentinel values
Date: Thu, 29 Jun 2017 07:16:49 -0400
Lines: 59
Approved: news@gmane.org
Message-ID: <20170629111649.5132370.85419.32148@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>
 <CAFk2RUaVNMX9ktdTTTZywzmmOh6zJVShRcnL_ppJeFnFDpm0nw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1498735012 28730 195.159.176.226 (29 Jun 2017 11:16:52 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 29 Jun 2017 11:16:52 +0000 (UTC)
To: Ville Voutilainen <std-proposals@isocpp.org>, ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUZ5QWKNQIKHQ6TZICRUBFU5GRTY@isocpp.org Thu Jun 29 13:16:47 2017
Return-path: <std-proposals+bncBCUZ5QWKNQIKHQ6TZICRUBFU5GRTY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f197.google.com ([209.85.161.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCUZ5QWKNQIKHQ6TZICRUBFU5GRTY@isocpp.org>)
	id 1dQXRH-0007HJ-2e
	for gclcip-std-proposals@m.gmane.org; Thu, 29 Jun 2017 13:16:47 +0200
Original-Received: by mail-yw0-f197.google.com with SMTP id c13sf64855399ywa.13
        for <gclcip-std-proposals@m.gmane.org>; Thu, 29 Jun 2017 04:16:52 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1498735012; cv=pass;
        d=google.com; s=arc-20160816;
        b=aT1FR4Re8RMhVFankpI60UQyD9oOqmgX9u1ob59P9eqeH7G5QhVhLSp4HCPLEkh/+x
         k7pXMw8iU3abVy/nitMJ3dKQfdK+JCU7i3bxxKZhnQzxask4gBC1+QDqGrQtf0pl3IDX
         MdDZHMcHoruGG3o/WrHxK35PX6Zi+2k609iQSxedr+XUObGi7DGSqA1UmjPR+2cbsMQg
         jUcV7lePNbCKhbZa1wYi89o2PPYvZs1QXYVtyFKIWNPSsoZW/OlOpe35EUbXZdf9SRR6
         ZQEiUMUaMIu8qozkZc+yCT3obWPAL53zw4etMnbLW2sIxbCK9jLnhmPSRuw+H1Iz78xj
         +VKQ==
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:references:in-reply-to
         :from:subject:date:message-id:content-transfer-encoding:mime-version
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=aSRqhyZBtB+T8mQY43BezmMu4PcIBI4fWUeojtbMX6A=;
        b=Leq1A6vdTxoRUGQ9d/07cLhBncJAwZL6qfFNh1aQHyZyo7sPRLpZesvSZcVBYvoUQU
         JHwD+Awku1mCXPzCKkj6kmCczTUUeOBs8lh9OkELO7kE3MAWTa7nfHWQ7yJNWGAXqy+s
         A4nq4TPG729vYe6JchmjXyD1Gt3gewKYMfak8CzPpdcsCFsbK9KGfrtqK/e8cttRb5tG
         OraQCFipEBFr6EkLV7WOrXWz/tvb2jgv3tPHcqN86vBlBTHd8EsvvCs/9DROtKUzauA7
         RPimPvqM/DJ8QchjJj/t2TP0zX7gGF6xpHq7DSOImnXEeYUmmsnyx4vUJ5gDGmM37ymo
         tvPg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=BVMRkftX;
       spf=pass (google.com: domain of tvaneerd@gmail.com designates 2607:f8b0:4001:c06::241 as permitted sender) smtp.mailfrom=tvaneerd@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:content-transfer-encoding:message-id:date:subject:from
         :in-reply-to:references: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=aSRqhyZBtB+T8mQY43BezmMu4PcIBI4fWUeojtbMX6A=;
        b=RvTlQfd6uMHrwC9Op/MihOnQtFiIqLwfeioOJ+MOmkdkGX1RtJe3WDqtmr04XKfBD/
         3ED++msxxHJ2RB0WMtBuIL0OJboL27UhaPelgcOxfVxjq23LFSJVDBaRLSrcp6KEyMWI
         /lYZwvsFGu407l83gpJMu7OR2lNNMT0FPNurwH9g3LrAJfUdidjD/9nYv2/arURS0sGW
         o/GEAOFhL+fhDN3bT2tz+MhRJd2yhMV9TVWs1sTgvIWp5N0vWndCR8esw835oHbKNssf
         W3SQMrIfTNcZikaZfvSagFietczDilZQTEplLEWHNiRnxX4/aa4Ry85+G7lel8fo+Fls
         nTOw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:content-transfer-encoding
         :message-id:date:subject:from:in-reply-to:references: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=aSRqhyZBtB+T8mQY43BezmMu4PcIBI4fWUeojtbMX6A=;
        b=N0YvCXrJxWuY8P4pddRCq6AAE0ZosvsRMEAcowTi1SPqhLOzJa8iVgNlsg9VTA5ve+
         B3/PVZJgM1pd7/j4ehKBQhshR4CAswpRwiK1sMmSpZCdSYA4cGEFZP1YtbTITR8UBzPe
         wH22Ko2/pHNqxa4FTS82VupaJftojFMpuCvcUQ5ZDA2mYbeRyGvrmYilyvWF9HsP0EJk
         wwjA+CSjYAy1RaHGh2IQiPPV/b03mPPSk5SHYo/Ar0pFFuLMZjqUh+O75C5potdzzUQP
         0SpGref3jXDTwsQ78L43+o4Zgw/5Zd6VBYY5YtJTE5qKEdW/THEHJiqzuRhYPDsm9LPv
         jCZ 
X-Gm-Message-State: AKS2vOxHvGUaoPm8ajXNzaE4a8e/oDZEUG2OCNypK3cTWz3PhsyaODHw
	IMT2NFoHK168nhko
X-Received: by 10.129.129.131 with SMTP id r125mr6975397ywf.97.1498735012300;
        Thu, 29 Jun 2017 04:16:52 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.39.68 with SMTP id n65ls556775ion.18.gmail; Thu, 29 Jun
 2017 04:16:51 -0700 (PDT)
X-Received: by 10.107.137.224 with SMTP id t93mr15480676ioi.215.1498735011178;
        Thu, 29 Jun 2017 04:16:51 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1498735011; cv=none;
        d=google.com; s=arc-20160816;
        b=gVr9g1xB1ySlxCPF6eRD3ZvJkPLVxZp4j+ufUwbdM9oVxflwOhyJ9bC2+RLDIhm7BP
         ybNUptRMagzTwVIFOpp7bZdqHJ5OnSpvaRFoJhat79rAWvQwNkEDZWkjqhY0952gk4pB
         0ZN75LfR7LjCppxAFdTE/UgfPUte2Uj9bycdQaQJRIdhwt4BCM38jRep1tH6W82fbLBs
         9Q8mKl0VHoCyr7ajMm+RiGycUp76KelF7dht3b2VwTfTkOVxi/YFzCkuEzZrptxJINyJ
         97m96lRNNLXcK9UqLh+guMGjzpKluwJowQC/JFunWSh/THIqcJt6HRs8LGI43gHgjYYj
         Ba4A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:references:in-reply-to:from:subject:date:message-id
         :content-transfer-encoding:mime-version:dkim-signature
         :arc-authentication-results;
        bh=RPkoNjcr92iL2WzIB7T7+tbcKpuRyb7ICDn5P9FTqwQ=;
        b=WWbbBl6IeBLbfxC9BkLbI9p7am5aHDBNZFFC2nyAinhdD3MWcELm9vxt85NPIq1j4H
         QQzR9+Y8ul5kUFpNWrq2qXaFn2DXEhePWDlq7o9FKj+dK7r9T1fokGnn/NLq8QIIy4Bp
         R64FiJ2SEbOikyhnFlRs47vb0Y238pmSa56+d+ZWEny/IgNMNirLoIvomAnQydBNQ7Vr
         9xR48pjg3YAFw+lO5G9hJTbq9gut64n6X7CYuR57jiYeVN7Rr6RJcubnR8WjaRWnU07C
         2UXfs2bqeUcmd4Z4Pfgi9eCiw7ljkJB7t+2FyaExXpuWxsUE4pu4iAXAfnADIcUgnSXc
         qZNQ==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=BVMRkftX;
       spf=pass (google.com: domain of tvaneerd@gmail.com designates 2607:f8b0:4001:c06::241 as permitted sender) smtp.mailfrom=tvaneerd@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from mail-io0-x241.google.com (mail-io0-x241.google.com. [2607:f8b0:4001:c06::241])
        by mx.google.com with ESMTPS id m201si3384548itg.24.2017.06.29.04.16.51
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 29 Jun 2017 04:16:51 -0700 (PDT)
Received-SPF: pass (google.com: domain of tvaneerd@gmail.com designates 2607:f8b0:4001:c06::241 as permitted sender) client-ip=2607:f8b0:4001:c06::241;
Original-Received: by mail-io0-x241.google.com with SMTP id 84so704438iop.2
        for <std-proposals@isocpp.org>; Thu, 29 Jun 2017 04:16:51 -0700 (PDT)
X-Received: by 10.107.8.215 with SMTP id h84mr16145475ioi.69.1498735010670;
        Thu, 29 Jun 2017 04:16:50 -0700 (PDT)
Original-Received: from [127.0.0.1] (glphon2233w-lp140-01-174-95-157-190.dsl.bell.ca. [174.95.157.190])
        by smtp.gmail.com with ESMTPSA id 125sm4397326itz.7.2017.06.29.04.16.49
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
        Thu, 29 Jun 2017 04:16:49 -0700 (PDT)
X-Mailer: BlackBerry Email (10.3.3.2205)
In-Reply-To: <CAFk2RUaVNMX9ktdTTTZywzmmOh6zJVShRcnL_ppJeFnFDpm0nw@mail.gmail.com>
X-Original-Sender: tvaneerd@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.b=BVMRkftX;       spf=pass (google.com: domain of
 tvaneerd@gmail.com designates 2607:f8b0:4001:c06::241 as permitted sender)
 smtp.mailfrom=tvaneerd@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:33024
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33024>

std::optional<std::opt_sentineled<int,-1>>



Sent=C2=A0from=C2=A0my=C2=A0BlackBerry=C2=A0portable=C2=A0Babbage=C2=A0Devi=
ce
=C2=A0 Original Message =C2=A0
From: Ville Voutilainen
Sent: Thursday, June 29, 2017 7:13 AM
To: ISO C++ Standard - Future Proposals
Reply To: std-proposals@isocpp.org
Subject: Re: [std-proposals] std::optional - support for sentinel values

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 tra=
it
> 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.

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAFk2RUaVNMX9ktdTTTZywzmmOh6zJVShRcnL_ppJeFnFDpm=
0nw%40mail.gmail.com.

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/20170629111649.5132370.85419.32148%40gmail.com.

.
