220 8665 <3a3d55c0-20cb-40ff-ae46-84663d21f44d@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: gornishanov@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: string_view::is_null()
Date: Fri, 17 Jan 2014 15:10:41 -0800 (PST)
Lines: 54
Approved: news@gmane.org
Message-ID: <3a3d55c0-20cb-40ff-ae46-84663d21f44d@isocpp.org>
References: <8045a4d2-721d-4725-8bb7-7a91b6f53ec8@isocpp.org> <186E0927-C962-4E34-AED0-E7509DD1F0A0@gmail.com> <7aad44d8-6b4e-438a-b309-bd898b994b34@isocpp.org> <9C2C439F-7983-4224-B272-53CAD0E2E456@gmail.com> <CANh-dXnYg=1kmm1nJdSnTXmYyfBxbLTD9b+wecT+eZm5nPkf2A@mail.gmail.com> <CAGg_6+Pz0gQQcY_Vq6LTMFc-4iOJvVN1O3jc3gjh0J2egBTgGg@mail.gmail.com> <CANh-dX=Dr35_jvxadm2HWxNk6e87y8V+Dkyiw+syBfgfdTfobw@mail.gmail.com> <CAPOJ94O19N207rjm73tKJSc7K55kOzYxHbY9wtXquk=_uqqMsA@mail.gmail.com>
 <8E74B747-7450-41E0-8D1E-48C2D6F81535@gmail.com>
 <d17db29f-8da3-402f-834a-66b02e4d9621@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_112_8601933.1390000241866"
X-Trace: ger.gmane.org 1390000238 27575 80.91.229.3 (17 Jan 2014 23:10:38 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 17 Jan 2014 23:10:38 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC47RF4IW4GRB47Q42LAKGQESKMNT3I@isocpp.org Sat Jan 18 00:10:45 2014
Return-path: <std-proposals+bncBC47RF4IW4GRB47Q42LAKGQESKMNT3I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oa0-f72.google.com ([209.85.219.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC47RF4IW4GRB47Q42LAKGQESKMNT3I@isocpp.org>)
	id 1W4IYm-000190-V5
	for gclcip-std-proposals@m.gmane.org; Sat, 18 Jan 2014 00:10:45 +0100
Original-Received: by mail-oa0-f72.google.com with SMTP id o6sf17520434oag.7
        for <gclcip-std-proposals@m.gmane.org>; Fri, 17 Jan 2014 15:10:44 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=qp8wQqaNxhMwP57cizMU6I8O0kxBhGJmkXdj5rr7GGI=;
        b=0ekCJ3rgll8GUe4tJA6/c9DpBaVb0VYtvGS8uO47EXh30QHiLRovf54FlVDQaJUoia
         31hKEFgu7JUTKED5Zic4DP02WH+sSs6NSxY9R0AtAGTiqP5dttGTYqDwwRSxms6Yw9dK
         QrjUcJYbTWAgocTTr2pE3eOjSLTIotpYkLsI/JuG5VOjWfYJY+0zWNUEZF26UPvmfhm0
         6a7kdprMyybYP5R8PURchZ3EgX73i1mpZUWwfFYl/1Wg0q1a8MXMufYCiKDnk+LpTEAw
         EuSwPZ+NTy+Ku95pReTM5V7vIXJot7hHHM0HVS2oKoTbtUQpD2jIJz26ZWlvuNL6Jg+S
         UAIg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=qp8wQqaNxhMwP57cizMU6I8O0kxBhGJmkXdj5rr7GGI=;
        b=GnSah8gFnAw/CNIc/hy02bZsF2Orq6cIKHeWA5/eGm0z7jDQsaWAjpJ4PZ7vJkpcYn
         PgXx8lMV/gvzKOLiV652eGxyUqCWtNbVeOtkUWCjloE8cleGakEsxpcvhIYAOMFiMcMY
         Cx2UKwvkkcqC9nnUuKkt+EIH4emhIZBxXw7cGORC2eY7or5JUXYB/9uiM+2WTI3Yzhen
         Tf7jR7D9OvPmuS/VtaSJRB+m2POmA2+LOrVnGT5YO5NPZksTXCYetWF1nWukl+2tUvS2
         XKuKK7ZCKqU8YhIMkRKXJVQAkSJwRYK39DwSwhEONbXx548BJPYGwbCQuGGLvIvLHtJ0
         pkrA==
X-Gm-Message-State: ALoCoQmBzmVdAaA8Cr9mfqS4XMyY24wElYNE38cylGobNWjGGAeVv5JtPgEqVZmkLAnyQy8BilWp
X-Received: by 10.50.124.9 with SMTP id me9mr434281igb.4.1390000243938;
        Fri, 17 Jan 2014 15:10:43 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.176.193 with SMTP id ck1ls695179igc.22.gmail; Fri, 17 Jan
 2014 15:10:43 -0800 (PST)
X-Received: by 10.50.13.7 with SMTP id d7mr18879igc.16.1390000243179;
        Fri, 17 Jan 2014 15:10:43 -0800 (PST)
In-Reply-To: <d17db29f-8da3-402f-834a-66b02e4d9621@isocpp.org>
X-Original-Sender: gornishanov@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>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:8665
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8665>

------=_Part_112_8601933.1390000241866
Content-Type: text/plain; charset=UTF-8

What if string_view provides a specialization for optional<string_view<>>?

That way optional<string_view> can be implemented very efficiently by 
checking if sv.begin() == nullptr and does not consume any extra storage. 
An extra benefit is that we have clear distinction between nullable types 
(optional<T>) and regular types, int, vector, string_view, etc.

Will this solution satisfy the original poster?

>
>

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_112_8601933.1390000241866
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>What if string_view provides a specialization for opt=
ional&lt;string_view&lt;&gt;&gt;?</div><div><br></div><div>That way optiona=
l&lt;string_view&gt; can be implemented very efficiently by checking if sv.=
begin() =3D=3D nullptr and does not consume any extra storage. An extra ben=
efit is that we have clear distinction between nullable types (optional&lt;=
T&gt;) and regular types, int, vector, string_view, etc.</div><div><br></di=
v><div>Will this solution satisfy the original poster?<br></div><blockquote=
 class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1e=
x; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-le=
ft-style: solid;"><div dir=3D"ltr"><br></div></blockquote></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_112_8601933.1390000241866--

.
