220 31909 <CAF8PYMgR_=QtP094+ZyER=ymjZQ_TmtbU7eYYh9wLWDV-FmzJw@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Vitali Lovich <vlovich@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: This variable should not be named: an identifier
 (not) to remember
Date: Thu, 30 Mar 2017 21:40:03 +0000
Lines: 131
Approved: news@gmane.org
Message-ID: <CAF8PYMgR_=QtP094+ZyER=ymjZQ_TmtbU7eYYh9wLWDV-FmzJw@mail.gmail.com>
References: <985b9b2a-c734-45eb-95f4-db4dc0d309a1@isocpp.org>
 <2235919.4GAIbDEcRC@tjmaciei-mobl1> <CAF8PYMgi7mk_fHs=cyYhW4rQad6uDLXrFd7Ef2m7g8Q143p2eg@mail.gmail.com>
 <3760122.IY8cFr858X@tjmaciei-mobl1>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a11398d6ccc7b46054bf989df
X-Trace: blaine.gmane.org 1490910054 2735 195.159.176.226 (30 Mar 2017 21:40:54 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 30 Mar 2017 21:40:54 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCFIZX46Q4HRBXPW6XDAKGQEG6CPSIA@isocpp.org Thu Mar 30 23:40:49 2017
Return-path: <std-proposals+bncBCFIZX46Q4HRBXPW6XDAKGQEG6CPSIA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pg0-f72.google.com ([74.125.83.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCFIZX46Q4HRBXPW6XDAKGQEG6CPSIA@isocpp.org>)
	id 1ctho9-0007xe-9A
	for gclcip-std-proposals@m.gmane.org; Thu, 30 Mar 2017 23:40:41 +0200
Original-Received: by mail-pg0-f72.google.com with SMTP id 79sf59062512pgf.2
        for <gclcip-std-proposals@m.gmane.org>; Thu, 30 Mar 2017 14:40:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:references:in-reply-to: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=rHHb26mVOnwTwhe6IExPnaOe13TFmyA0jH3zDYjHrIg=;
        b=rbiKki5+kUfR8GUBipyAzwPeG0rYMfMkpky4lxee1DaW/iOZkwpkQaaTPtEk+gCI4h
         M2x1/hI43TNHf7piVsvpLn42DK+hfwuZTiB+nPQN1yGMecbtm3BGU0vQjqRZl8vWsm+h
         z8Iw1GUZNTQYJ4GaJmAfvozjI5+0Y+R0O0yLxoX9iWCksKAESl5Q2K+T7ySm2NKKRU79
         5tQlNE5V2FSF1k4uirUUhsAG33M4FKd6IPWYB7RGM9HmZDlXyAwPSXOF7TK0UBiXv1QJ
         +c6ohODZaRJC+drEoqdAp407wT3w8ZQCQL62Djzf4wRVwq4WT7TkL0+BnqloH5GA7Bgv
         M3yQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to: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=rHHb26mVOnwTwhe6IExPnaOe13TFmyA0jH3zDYjHrIg=;
        b=RbrJX3/GRVAUtT4lVPs71hcgLLKARtLkcEDhISMcvBnvsDO76drCu/YXam9JQ3Wbln
         TiQrSYL79YbLP5eVUwN+y6V3CvTBpvbGW/QdlpeOfXX8wlfpcswVt3jhQ3WUDKvzCnYm
         H40/2SO4J9YSMt279ECEP4RzlW7T1SQ2yukS7iBdlaiBPbUyBLh+n0sr0PREfcGNxJo/
         J5nMeuGfEjmtT4/qKy3gu43akmye3ATiC2QX6BwxMPQWsKNFWYOJ/m1adPk8e61QKUWJ
         co1zHQD/DjDOvEh0wAu4KYv6tKShCAkU5fKpQVMVUv5J2rzeAD3cRbC9bwljdUfAjalA
         61AA==
X-Gm-Message-State: AFeK/H2o/6zdff8uvaWjDenlnMM69fwtj9xf6pXD8qjow7EnBcRMuwX8O5bHRuaQaoMhoA==
X-Received: by 10.99.54.204 with SMTP id d195mr615814pga.120.1490910046428;
        Thu, 30 Mar 2017 14:40:46 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.19.61 with SMTP id f58ls1222193ote.36.gmail; Thu, 30 Mar
 2017 14:40:45 -0700 (PDT)
X-Received: by 10.157.35.107 with SMTP id k40mr1344931otd.129.1490910045676;
        Thu, 30 Mar 2017 14:40:45 -0700 (PDT)
Original-Received: from mail-oi0-x236.google.com (mail-oi0-x236.google.com. [2607:f8b0:4003:c06::236])
        by mx.google.com with ESMTPS id t45si1698236ote.64.2017.03.30.14.40.45
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 30 Mar 2017 14:40:45 -0700 (PDT)
Received-SPF: pass (google.com: domain of vlovich@gmail.com designates 2607:f8b0:4003:c06::236 as permitted sender) client-ip=2607:f8b0:4003:c06::236;
Original-Received: by mail-oi0-x236.google.com with SMTP id b187so44142763oif.0
        for <std-proposals@isocpp.org>; Thu, 30 Mar 2017 14:40:45 -0700 (PDT)
X-Received: by 10.157.46.84 with SMTP id c20mr1348434otd.190.1490910014370;
 Thu, 30 Mar 2017 14:40:14 -0700 (PDT)
In-Reply-To: <3760122.IY8cFr858X@tjmaciei-mobl1>
X-Original-Sender: vlovich@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of vlovich@gmail.com
 designates 2607:f8b0:4003:c06::236 as permitted sender) smtp.mailfrom=vlovich@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:31909
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31909>

--001a11398d6ccc7b46054bf989df
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

tuple<shared_ptr<string>, string_view> getstr()

The 2nd argument is a view into the string owned by shared_ptr.

The semantics of whether or not the string view points to owned memory
depends on the lifetime of the shared_ptr and my understanding of what you
were saying is that the lifetime changes depending on whether the get() is
done or ignored.

On Wed, Mar 29, 2017 at 9:12 PM Thiago Macieira <thiago@macieira.org> wrote=
:

> On quarta-feira, 29 de mar=C3=A7o de 2017 20:41:37 PDT Vitali Lovich wrot=
e:
> > > It does not, so it cannot have an observable effect.
> >
> > doesnt it? If a function returns a Shared_ptr of a string and string_vi=
ew
> > that references the string, if you do:
>
> Can you be more specific what this function returns? "A shared_ptr of a
> string
> and a string_view" does not make sense, since shared_ptr only takes one
> template parameter.
>
> I'll analyse the rest when you post your reply.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>    Software Architect - Intel Open Source Technology Center
>
> --
> 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/3760122.IY8c=
Fr858X%40tjmaciei-mobl1
> .
>

--=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/CAF8PYMgR_%3DQtP094%2BZyER%3DymjZQ_TmtbU7eYYh9wL=
WDV-FmzJw%40mail.gmail.com.

--001a11398d6ccc7b46054bf989df
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div>tuple&lt;shared_ptr&lt;string&gt;, string_view&gt; getstr()</div><div>=
<br></div><div>The 2nd argument is a view into the string owned by shared_p=
tr.</div><div><br></div><div>The semantics of whether or not the string vie=
w points to owned memory depends on the lifetime of the shared_ptr and my u=
nderstanding of what you were saying is that the lifetime changes depending=
 on whether the get() is done or ignored.</div><div><br><div class=3D"gmail=
_quote"><div>On Wed, Mar 29, 2017 at 9:12 PM Thiago Macieira &lt;<a href=3D=
"mailto:thiago@macieira.org">thiago@macieira.org</a>&gt; wrote:<br></div><b=
lockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px =
#ccc solid;padding-left:1ex">On quarta-feira, 29 de mar=C3=A7o de 2017 20:4=
1:37 PDT Vitali Lovich wrote:<br class=3D"gmail_msg">
&gt; &gt; It does not, so it cannot have an observable effect.<br class=3D"=
gmail_msg">
&gt;<br class=3D"gmail_msg">
&gt; doesnt it? If a function returns a Shared_ptr of a string and string_v=
iew<br class=3D"gmail_msg">
&gt; that references the string, if you do:<br class=3D"gmail_msg">
<br class=3D"gmail_msg">
Can you be more specific what this function returns? &quot;A shared_ptr of =
a string<br class=3D"gmail_msg">
and a string_view&quot; does not make sense, since shared_ptr only takes on=
e<br class=3D"gmail_msg">
template parameter.<br class=3D"gmail_msg">
<br class=3D"gmail_msg">
I&#39;ll analyse the rest when you post your reply.<br class=3D"gmail_msg">
<br class=3D"gmail_msg">
--<br class=3D"gmail_msg">
Thiago Macieira - thiago (AT) <a href=3D"http://macieira.info" rel=3D"noref=
errer" class=3D"gmail_msg" target=3D"_blank">macieira.info</a> - thiago (AT=
) <a href=3D"http://kde.org" rel=3D"noreferrer" class=3D"gmail_msg" target=
=3D"_blank">kde.org</a><br class=3D"gmail_msg">
=C2=A0 =C2=A0Software Architect - Intel Open Source Technology Center<br cl=
ass=3D"gmail_msg">
<br class=3D"gmail_msg">
--<br class=3D"gmail_msg">
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br class=3D"gmail_msg=
">
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org" class=3D"=
gmail_msg" target=3D"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br c=
lass=3D"gmail_msg">
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" class=3D"gmail_msg" target=3D"_blank">std-proposals@isocpp.org</a>.<b=
r class=3D"gmail_msg">
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/3760122.IY8cFr858X%40tjmaciei-mobl1" =
rel=3D"noreferrer" class=3D"gmail_msg" target=3D"_blank">https://groups.goo=
gle.com/a/isocpp.org/d/msgid/std-proposals/3760122.IY8cFr858X%40tjmaciei-mo=
bl1</a>.<br class=3D"gmail_msg">
</blockquote></div></div>

<p></p>

-- <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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAF8PYMgR_%3DQtP094%2BZyER%3DymjZQ_Tm=
tbU7eYYh9wLWDV-FmzJw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAF8PYMgR_%=
3DQtP094%2BZyER%3DymjZQ_TmtbU7eYYh9wLWDV-FmzJw%40mail.gmail.com</a>.<br />

--001a11398d6ccc7b46054bf989df--

.
