220 36338 <cafca4af-400f-47f8-abab-48eef0727a99@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: mihailnajdenov@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Now that the std::forward alternative has been rejected
Date: Mon, 25 Dec 2017 01:27:09 -0800 (PST)
Lines: 538
Approved: news@gmane.org
Message-ID: <cafca4af-400f-47f8-abab-48eef0727a99@isocpp.org>
References: <ebc148fa-9b1f-4972-8a53-6f52c6ead259@isocpp.org>
 <e447b9dd-d8d1-4b73-b1f3-4a6a5ab295a5@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_14916_862137623.1514194029897"
X-Trace: blaine.gmane.org 1514193917 24853 195.159.176.226 (25 Dec 2017 09:25:17 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 25 Dec 2017 09:25:17 +0000 (UTC)
Cc: mihailnajdenov@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUJ3A7GRAPRB34IQPJAKGQEVI2EVFQ@isocpp.org Mon Dec 25 10:25:13 2017
Return-path: <std-proposals+bncBCUJ3A7GRAPRB34IQPJAKGQEVI2EVFQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f71.google.com ([209.85.213.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCUJ3A7GRAPRB34IQPJAKGQEVI2EVFQ@isocpp.org>)
	id 1eTP0Q-0005yh-1F
	for gclcip-std-proposals@m.gmane.org; Mon, 25 Dec 2017 10:25:10 +0100
Original-Received: by mail-vk0-f71.google.com with SMTP id i68sf17418883vkd.15
        for <gclcip-std-proposals@m.gmane.org>; Mon, 25 Dec 2017 01:27:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc: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;
        bh=A4GFtdHwlf58Q6DVQ2nW/5/gka4GzehEay75HtKWjv8=;
        b=WJKqc4XVDmciLWldJdzbu96eghySStIxkdLLCRs/EKpMIaZdQ42J4hDMCnU9v0f/Fm
         18APfilD9Jasi5w282CZFnB2cekDxo4kBirl6QH0ZH4dIF2KJjAuRNo7JvQHjA1yrM0J
         k5Zd9iyGo6J00jo07D4LcwvX2AjKB1V+0qsi90qxv+E30Hyo2zeF9GjEoZwcS8Jgbisi
         alCM+H1960A1raSCusLa4pYxZJUpQKY3yb8j5BdSK5M9KztedGLlHLTt286p362g+AS4
         e4DFZOHMwDLHGJz8sh+8GpuIuuzsuhRatK2iYqn+pAkcIFFv+aotT75eGeli2CsQAZtH
         nKBg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:cc: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;
        bh=A4GFtdHwlf58Q6DVQ2nW/5/gka4GzehEay75HtKWjv8=;
        b=WyibkmMdwOlajEcoRkuTRHJuR8LKaOVCisrlISUOGMSr4L3VR+ICliNyf1EVo6Cml9
         p2Jqzh6W0/4FckOUp5WwaEEaEG5paB9Eb8CbIwRabxTdtM91OqW3b6rN2K+1YGTFsuqO
         If5ocgAMoTnJX0LEoP5WTIPPOdMhIMkDeM80/XaTOi9AxQrcKBEz1qEnlMa/qYwWFx73
         485OgLaaaQVsuV7kwg5mMJqOvg5CZYh+IrsfeI3kL67575H1gGha6MDIBO2qH8GthH+q
         D88JjatTVh4CmNmTtwjBtjkmkG/S6PNFJ412ieiM60XFer3sOaVN5LzMak1y5cAeGt2M
         k+ig==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:x-original-sender:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=A4GFtdHwlf58Q6DVQ2nW/5/gka4GzehEay75HtKWjv8=;
        b=ruF+v/NnBujnMPoRlgCBO/NpRUwfptkLjwAZZ9rd+mRo+yVrOTqZbqp0M6oyHOtcBH
         HYvWFR4h8hcdTSH8opKJT6DD6q/xKkmtbGVo6ePyF6QdvgyXNKljp6Zn4+v+VQWSbEbN
         bTsWq3NvFmIiKax//oXcuA5lUXN/X4lHaz/VpXTEsLOT9PAdwaEzapnge2EE1XqURfC4
         /ckzF9AKcrqiy57+j0OnbOujhWFRvASwsaSohUjh4tdVWcqZKHfCwIMhRqcZFHlCUmNt
         SiaVZHl2sUsam0WV4X8YygrrLRDbipXXsryMlYZPc0o5DKa92CXo9OJuKOJi6ku3e5UO
         Lilg==
X-Gm-Message-State: AKGB3mK3fbKMxp4S5HDcQfMhVhIxGEK1tDxUX88/ch+htpZmRM+CRWxT
	b9WRl0CDd84tvqBM7GVlMFZahw==
X-Google-Smtp-Source: ACJfBouBZrkNuZ+jUaKCgq4ybMVSuUxPeyiZiR6bDUq52vR0QAWzlZ2szPXUUGI1eIU2xOiivM3/Iw==
X-Received: by 10.31.80.199 with SMTP id e190mr9786039vkb.22.1514194032449;
        Mon, 25 Dec 2017 01:27:12 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.31.3.68 with SMTP id 65ls2149767vkd.8.gmail; Mon, 25 Dec 2017
 01:27:10 -0800 (PST)
X-Received: by 10.31.94.215 with SMTP id s206mr2017690vkb.1.1514194030554;
        Mon, 25 Dec 2017 01:27:10 -0800 (PST)
In-Reply-To: <e447b9dd-d8d1-4b73-b1f3-4a6a5ab295a5@isocpp.org>
X-Original-Sender: MihailNajdenov@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:36338
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36338>

------=_Part_14916_862137623.1514194029897
Content-Type: multipart/alternative; 
	boundary="----=_Part_14917_1137661987.1514194029898"

------=_Part_14917_1137661987.1514194029898
Content-Type: text/plain; charset="UTF-8"


>
>
>>
>> template< class T = /*implementation defined*/>
>>
>> constexpr T&& forward( ... ) noexcept;
>>
>> There is no way to make this work and using C's var_args is the worst fix 
> imaginable.
> Retrieving a value from a C va_list is not constexpr.
> It requires a named argument.
> They are really slow.
>
>
O, boy, by all means I was not suggesting  var_args, I was lazy to type.

Here is the complete specification (modified from cppreference).

template< class T = /* IMPLEMENTATION DEFINED */>

constexpr T&& forward( typename std::remove_reference<T>::type& t ) noexcept;


template< class T =  /* IMPLEMENTATION DEFINED */>

constexpr T&& forward( typename std::remove_reference<T>::type&& t ) noexcept;



DONE. Old code still works, if the compiler can't deduce the argument it 
will be instructed to replace it with the result of decltype(t).


std::forward and std::move have symmetry as they are both *transfers* - one 
is transferring ownership, the other is transferring "whatever you give me" 
(constnes, ownership, whatever, I am hands off, move along). 

Their naming is also good, the fact that they are syntactically NOT casts 
is good design decision - might be implemented as cast, but semantically 
they are not. Good job there.

The problem is only the necessary param of forward - everyone will and does 
question why at some point.
And the answer is not an answer but an excuse - no new understanding is 
received, it does not make you a better programmer it only shows 
limitations of the implementation, nothing more.
Not unlike the pesky typename in template code (which is going away 
luckily, 20 years later)  


As for library writer only need forward. I don't see how is this the case. 
The moment you need to wrap any template code you need it.

template< class Container, class UnaryPredicate >

auto find_if(Container& c, UnaryPredicate&& val)

{

  using std::begin;
  using std::end; 

  return std::find_if(begin(c), end(c), std::forward<UnaryPredicate>(val));


}


You might argue, this is "library code", but It is the normal user who 
might and will write it.

As for "library solution" vs "language". Yes I agree move and forward are 
by nature language features, 
but is too late to implement them as such, and an operator is hardly 
"language level", just syntax sugar.

And if anyone is promoted to language, it is the wildly more popular move. 
And by promoted I mean compiler support in the lines present by Microsoft 
on the cppCon last year or may be it was the year before. 
Right now you can move/forward twice the same variable without even an 
warning, which is just a joke (aka Footgun).


P.S Marry Christmas, everyone!

-- 
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/cafca4af-400f-47f8-abab-48eef0727a99%40isocpp.org.

------=_Part_14917_1137661987.1514194029898
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;bor=
der-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #c=
cc solid;padding-left:1ex"><div dir=3D"ltr"><div style=3D"margin:0px;paddin=
g:0px;border:0px rgb(34,34,34);text-align:left;color:rgb(34,34,34);text-tra=
nsform:none;text-indent:0px;letter-spacing:normal;font-size:13px;font-varia=
nt:normal;word-spacing:0px;white-space:normal;background-color:transparent"=
><br></div><div style=3D"margin:0px;padding:0px;border:0px rgb(34,34,34);te=
xt-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;lette=
r-spacing:normal;font-size:13px;font-variant:normal;word-spacing:0px;white-=
space:normal;background-color:transparent"><br></div><div style=3D"margin:0=
px;padding:0px;border:0px rgb(34,34,34);text-align:left;color:rgb(34,34,34)=
;text-transform:none;text-indent:0px;letter-spacing:normal;font-size:13px;f=
ont-variant:normal;word-spacing:0px;white-space:normal;background-color:tra=
nsparent"><div style=3D"border:1px solid rgb(187,187,187);word-wrap:break-w=
ord;background-color:rgb(250,250,250)"><code><div><span><span style=3D"colo=
r:#008">template</span></span><span><span style=3D"color:#660">&lt;</span><=
/span><span style=3D"display:inline!important;float:none;background-color:t=
ransparent;color:rgb(0,0,0);font-family:DejaVuSansMono,&quot;DejaVu Sans Mo=
no&quot;,courier,monospace;font-size:12.8px;font-style:normal;font-variant:=
normal;font-weight:400;letter-spacing:normal;line-height:14.08px;text-align=
:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:=
nowrap;word-spacing:0px"><span style=3D"color:#000"> </span></span><span><s=
pan style=3D"color:#008">class</span></span><span style=3D"display:inline!i=
mportant;float:none;background-color:transparent;color:rgb(0,0,0);font-fami=
ly:DejaVuSansMono,&quot;DejaVu Sans Mono&quot;,courier,monospace;font-size:=
12.8px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing=
:normal;line-height:14.08px;text-align:left;text-decoration:none;text-inden=
t:0px;text-transform:none;white-space:nowrap;word-spacing:0px"><span style=
=3D"color:#000"> T </span><span style=3D"color:#660">=3D</span><span style=
=3D"color:#000"> </span><span style=3D"color:#800">/*implementation defined=
*/</span></span><span><span style=3D"color:#660">&gt;</span></span><span st=
yle=3D"color:#000"><br></span><span style=3D"display:inline!important;float=
:none;background-color:transparent;color:rgb(0,0,0);font-family:DejaVuSansM=
ono,&quot;DejaVu Sans Mono&quot;,courier,monospace;font-size:12.8px;font-st=
yle:normal;font-variant:normal;font-weight:400;letter-spacing:normal;line-h=
eight:14.08px;text-align:left;text-decoration:none;text-indent:0px;text-tra=
nsform:none;white-space:nowrap;word-spacing:0px"><span style=3D"color:#000"=
><br></span></span><span><span style=3D"color:#008">constexpr</span></span>=
<span style=3D"display:inline!important;float:none;background-color:transpa=
rent;color:rgb(0,0,0);font-family:DejaVuSansMono,&quot;DejaVu Sans Mono&quo=
t;,courier,monospace;font-size:12.8px;font-style:normal;font-variant:normal=
;font-weight:400;letter-spacing:normal;line-height:14.08px;text-align:left;=
text-decoration:none;text-indent:0px;text-transform:none;white-space:nowrap=
;word-spacing:0px"><span style=3D"color:#000"> T</span></span><span><span s=
tyle=3D"color:#660">&amp;&amp;</span></span><span style=3D"display:inline!i=
mportant;float:none;background-color:transparent;color:rgb(0,0,0);font-fami=
ly:DejaVuSansMono,&quot;DejaVu Sans Mono&quot;,courier,monospace;font-size:=
12.8px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing=
:normal;line-height:14.08px;text-align:left;text-decoration:none;text-inden=
t:0px;text-transform:none;white-space:nowrap;word-spacing:0px"><span style=
=3D"color:#000"> forward</span></span><span><span style=3D"color:#660">(</s=
pan></span><span style=3D"display:inline!important;float:none;background-co=
lor:transparent;color:rgb(0,0,0);font-family:DejaVuSansMono,&quot;DejaVu Sa=
ns Mono&quot;,courier,monospace;font-size:12.8px;font-style:normal;font-var=
iant:normal;font-weight:400;letter-spacing:normal;line-height:14.08px;text-=
align:left;text-decoration:none;text-indent:0px;text-transform:none;white-s=
pace:nowrap;word-spacing:0px"><span style=3D"color:#000"> </span></span><sp=
an><span style=3D"color:#660">...</span><span style=3D"color:#000"> </span>=
</span><span><span style=3D"color:#660">)</span></span><span style=3D"displ=
ay:inline!important;float:none;background-color:transparent;color:rgb(0,0,0=
);font-family:DejaVuSansMono,&quot;DejaVu Sans Mono&quot;,courier,monospace=
;font-size:12.8px;font-style:normal;font-variant:normal;font-weight:400;let=
ter-spacing:normal;line-height:14.08px;text-align:left;text-decoration:none=
;text-indent:0px;text-transform:none;white-space:nowrap;word-spacing:0px"><=
span style=3D"color:#000"> </span></span><span><span style=3D"color:#000">n=
oexcept</span></span><span><span style=3D"color:#660">;</span></span></div>=
</code></div><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><b=
r></div></div></blockquote><div>There is no way to make this work and using=
 C&#39;s var_args is the worst fix imaginable.</div><div>Retrieving a value=
 from a C va_list is not constexpr.</div><div>It requires a named argument.=
</div><div>They are really slow.</div><div><br></div></div></blockquote><di=
v><br></div><div>O, boy, by all means I was not suggesting=C2=A0=C2=A0<span=
 style=3D"display: inline !important; float: none; background-color: transp=
arent; color: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&quot;Helveti=
ca&quot;,sans-serif; font-size: 13px; font-style: normal; font-variant: nor=
mal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left=
; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-te=
xt-stroke-width: 0px; white-space: normal; word-spacing: 0px;">var_args, I =
was lazy to type.</span></div><div><span style=3D"display: inline !importan=
t; float: none; background-color: transparent; color: rgb(34, 34, 34); font=
-family: &quot;Arial&quot;,&quot;Helvetica&quot;,sans-serif; font-size: 13p=
x; font-style: normal; font-variant: normal; font-weight: 400; letter-spaci=
ng: normal; orphans: 2; text-align: left; text-decoration: none; text-inden=
t: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: =
normal; word-spacing: 0px;"><br></span></div><div><span style=3D"display: i=
nline !important; float: none; background-color: transparent; color: rgb(34=
, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvetica&quot;,sans-serif;=
 font-size: 13px; font-style: normal; font-variant: normal; font-weight: 40=
0; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: n=
one; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px=
; white-space: normal; word-spacing: 0px;">Here is the complete specificati=
on (modified from cppreference).</span></div><div><span style=3D"display: i=
nline !important; float: none; background-color: transparent; color: rgb(34=
, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvetica&quot;,sans-serif;=
 font-size: 13px; font-style: normal; font-variant: normal; font-weight: 40=
0; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: n=
one; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px=
; white-space: normal; word-spacing: 0px;"><br></span></div><span style=3D"=
display: inline !important; float: none; background-color: transparent; col=
or: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvetica&quot;,s=
ans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-=
weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-dec=
oration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-=
width: 0px; white-space: normal; word-spacing: 0px;"><div class=3D"prettypr=
int" style=3D"border: 1px solid rgb(187, 187, 187); word-wrap: break-word; =
background-color: rgb(250, 250, 250);"><code class=3D"prettyprint"><div cla=
ss=3D"subprettyprint"><span style=3D" color:#0000ff;"><span class=3D"styled=
-by-prettify" style=3D"color: #008;">template</span></span><span style=3D" =
color:#000000;"><span class=3D"styled-by-prettify" style=3D"color: #660;">&=
lt;</span></span><span style=3D" color:#c0c0c0;"><span class=3D"styled-by-p=
rettify" style=3D"color: #000;"> </span></span><span style=3D" color:#0000f=
f;"><span class=3D"styled-by-prettify" style=3D"color: #008;">class</span><=
/span><span style=3D" color:#c0c0c0;"><span class=3D"styled-by-prettify" st=
yle=3D"color: #000;"> </span></span><span style=3D" color:#00aaff;"><span c=
lass=3D"styled-by-prettify" style=3D"color: #000;">T</span></span><span sty=
le=3D" color:#c0c0c0;"><span class=3D"styled-by-prettify" style=3D"color: #=
000;"> </span><span class=3D"styled-by-prettify" style=3D"color: #660;">=3D=
</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> </span><s=
pan class=3D"styled-by-prettify" style=3D"color: #800;">/* IMPLEMENTATION D=
EFINED */</span></span><span style=3D" color:#000000;"><span class=3D"style=
d-by-prettify" style=3D"color: #660;">&gt;</span></span><span class=3D"styl=
ed-by-prettify" style=3D"color: #000;"><br></span><pre style=3D" margin-top=
:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-inden=
t:0; text-indent:0px;"><span style=3D" color:#0000ff;"><span class=3D"style=
d-by-prettify" style=3D"color: #008;">constexpr</span></span><span style=3D=
" color:#c0c0c0;"><span class=3D"styled-by-prettify" style=3D"color: #000;"=
> </span></span><span style=3D" color:#00aaff;"><span class=3D"styled-by-pr=
ettify" style=3D"color: #000;">T</span></span><span style=3D" color:#000000=
;"><span class=3D"styled-by-prettify" style=3D"color: #660;">&amp;&amp;</sp=
an></span><span style=3D" color:#c0c0c0;"><span class=3D"styled-by-prettify=
" style=3D"color: #000;"> </span></span><span style=3D" color:#000000;"><sp=
an class=3D"styled-by-prettify" style=3D"color: #000;">forward</span></span=
><span style=3D" color:#000000;"><span class=3D"styled-by-prettify" style=
=3D"color: #660;">(</span></span><span style=3D" color:#c0c0c0;"><span clas=
s=3D"styled-by-prettify" style=3D"color: #000;"> </span></span><span style=
=3D" color:#0000ff;"><span class=3D"styled-by-prettify" style=3D"color: #00=
8;">typename</span></span><span style=3D" color:#c0c0c0;"><span class=3D"st=
yled-by-prettify" style=3D"color: #000;"> </span></span><span style=3D" col=
or:#00aaff;"><span class=3D"styled-by-prettify" style=3D"color: #000;">std<=
/span></span><span style=3D" color:#000000;"><span class=3D"styled-by-prett=
ify" style=3D"color: #660;">::</span></span><span style=3D" color:#00aaff;"=
><span class=3D"styled-by-prettify" style=3D"color: #000;">remove_reference=
</span></span><span style=3D" color:#000000;"><span class=3D"styled-by-pret=
tify" style=3D"color: #660;">&lt;</span></span><span style=3D" color:#00aaf=
f;"><span class=3D"styled-by-prettify" style=3D"color: #000;">T</span></spa=
n><span style=3D" color:#000000;"><span class=3D"styled-by-prettify" style=
=3D"color: #660;">&gt;::</span></span><span style=3D" color:#00aaff;"><span=
 class=3D"styled-by-prettify" style=3D"color: #000;">type</span></span><spa=
n style=3D" color:#000000;"><span class=3D"styled-by-prettify" style=3D"col=
or: #660;">&amp;</span></span><span style=3D" color:#c0c0c0;"><span class=
=3D"styled-by-prettify" style=3D"color: #000;"> </span></span><span class=
=3D"styled-by-prettify" style=3D"color: #000;">t</span><span style=3D" colo=
r:#c0c0c0;"><span class=3D"styled-by-prettify" style=3D"color: #000;"> </sp=
an></span><span style=3D" color:#000000;"><span class=3D"styled-by-prettify=
" style=3D"color: #660;">)</span></span><span style=3D" color:#c0c0c0;"><sp=
an class=3D"styled-by-prettify" style=3D"color: #000;"> </span></span><span=
 style=3D" color:#0000ff;"><span class=3D"styled-by-prettify" style=3D"colo=
r: #000;">noexcept</span></span><span style=3D" color:#000000;"><span class=
=3D"styled-by-prettify" style=3D"color: #660;">;</span></span></pre><span c=
lass=3D"styled-by-prettify" style=3D"color: #000;"><br></span><pre style=3D=
" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt=
-block-indent:0; text-indent:0px;"><span style=3D" color:#0000ff;"><span cl=
ass=3D"styled-by-prettify" style=3D"color: #008;">template</span></span><sp=
an style=3D" color:#000000;"><span class=3D"styled-by-prettify" style=3D"co=
lor: #660;">&lt;</span></span><span style=3D" color:#c0c0c0;"><span class=
=3D"styled-by-prettify" style=3D"color: #000;"> </span></span><span style=
=3D" color:#0000ff;"><span class=3D"styled-by-prettify" style=3D"color: #00=
8;">class</span></span><span style=3D" color:#c0c0c0;"><span class=3D"style=
d-by-prettify" style=3D"color: #000;"> </span></span><span style=3D" color:=
#00aaff;"><span class=3D"styled-by-prettify" style=3D"color: #000;">T</span=
></span><span style=3D" color:#c0c0c0;"><span class=3D"styled-by-prettify" =
style=3D"color: #000;"> </span><span class=3D"styled-by-prettify" style=3D"=
color: #660;">=3D</span><span class=3D"styled-by-prettify" style=3D"color: =
#000;"> </span><span style=3D"background-color: transparent; border-bottom-=
color: rgb(192, 192, 192); border-bottom-style: none; border-bottom-width: =
0px; border-image-outset: 0; border-image-repeat: stretch; border-image-sli=
ce: 100%; border-image-source: none; border-image-width: 1; border-left-col=
or: rgb(192, 192, 192); border-left-style: none; border-left-width: 0px; bo=
rder-right-color: rgb(192, 192, 192); border-right-style: none; border-righ=
t-width: 0px; border-top-color: rgb(192, 192, 192); border-top-style: none;=
 border-top-width: 0px; color: rgb(192, 192, 192); font-family: &amp;quot;A=
rial&amp;quot;,&amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 13px; f=
ont-style: normal; font-variant: normal; font-weight: 400; letter-spacing: =
normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top=
: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0=
px; padding-top: 0px; text-align: left; text-decoration: none; text-indent:=
 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: no=
rmal; word-spacing: 0px;"><span class=3D"styled-by-prettify" style=3D"color=
: #000;">=C2=A0</span><span class=3D"styled-by-prettify" style=3D"color: #8=
00;">/* IMPLEMENTATION DEFINED */</span></span><span style=3D"background-co=
lor: transparent; border-bottom-color: rgb(0, 0, 0); border-bottom-style: n=
one; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat:=
 stretch; border-image-slice: 100%; border-image-source: none; border-image=
-width: 1; border-left-color: rgb(0, 0, 0); border-left-style: none; border=
-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: non=
e; border-right-width: 0px; border-top-color: rgb(0, 0, 0); border-top-styl=
e: none; border-top-width: 0px; color: rgb(0, 0, 0); font-family: &amp;quot=
;Arial&amp;quot;,&amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 13px;=
 font-style: normal; font-variant: normal; font-weight: 400; letter-spacing=
: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-t=
op: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right:=
 0px; padding-top: 0px; text-align: left; text-decoration: none; text-inden=
t: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: =
normal; word-spacing: 0px;"></span></span><span style=3D" color:#000000;"><=
span class=3D"styled-by-prettify" style=3D"color: #660;">&gt;</span></span>=
<span class=3D"styled-by-prettify" style=3D"color: #000;"><br></span></pre>=
<pre style=3D" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-r=
ight:0px; -qt-block-indent:0; text-indent:0px;"><span style=3D" color:#0000=
ff;"><span class=3D"styled-by-prettify" style=3D"color: #008;">constexpr</s=
pan></span><span style=3D" color:#c0c0c0;"><span class=3D"styled-by-prettif=
y" style=3D"color: #000;"> </span></span><span style=3D" color:#00aaff;"><s=
pan class=3D"styled-by-prettify" style=3D"color: #000;">T</span></span><spa=
n style=3D" color:#000000;"><span class=3D"styled-by-prettify" style=3D"col=
or: #660;">&amp;&amp;</span></span><span style=3D" color:#c0c0c0;"><span cl=
ass=3D"styled-by-prettify" style=3D"color: #000;"> </span></span><span styl=
e=3D" color:#000000;"><span class=3D"styled-by-prettify" style=3D"color: #0=
00;">forward</span></span><span style=3D" color:#000000;"><span class=3D"st=
yled-by-prettify" style=3D"color: #660;">(</span></span><span style=3D" col=
or:#c0c0c0;"><span class=3D"styled-by-prettify" style=3D"color: #000;"> </s=
pan></span><span style=3D" color:#0000ff;"><span class=3D"styled-by-prettif=
y" style=3D"color: #008;">typename</span></span><span style=3D" color:#c0c0=
c0;"><span class=3D"styled-by-prettify" style=3D"color: #000;"> </span></sp=
an><span style=3D" color:#00aaff;"><span class=3D"styled-by-prettify" style=
=3D"color: #000;">std</span></span><span style=3D" color:#000000;"><span cl=
ass=3D"styled-by-prettify" style=3D"color: #660;">::</span></span><span sty=
le=3D" color:#00aaff;"><span class=3D"styled-by-prettify" style=3D"color: #=
000;">remove_reference</span></span><span style=3D" color:#000000;"><span c=
lass=3D"styled-by-prettify" style=3D"color: #660;">&lt;</span></span><span =
style=3D" color:#00aaff;"><span class=3D"styled-by-prettify" style=3D"color=
: #000;">T</span></span><span style=3D" color:#000000;"><span class=3D"styl=
ed-by-prettify" style=3D"color: #660;">&gt;::</span></span><span style=3D" =
color:#00aaff;"><span class=3D"styled-by-prettify" style=3D"color: #000;">t=
ype</span></span><span style=3D" color:#000000;"><span class=3D"styled-by-p=
rettify" style=3D"color: #660;">&amp;&amp;</span></span><span style=3D" col=
or:#c0c0c0;"><span class=3D"styled-by-prettify" style=3D"color: #000;"> </s=
pan></span><span class=3D"styled-by-prettify" style=3D"color: #000;">t</spa=
n><span style=3D" color:#c0c0c0;"><span class=3D"styled-by-prettify" style=
=3D"color: #000;"> </span></span><span style=3D" color:#000000;"><span clas=
s=3D"styled-by-prettify" style=3D"color: #660;">)</span></span><span style=
=3D" color:#c0c0c0;"><span class=3D"styled-by-prettify" style=3D"color: #00=
0;"> </span></span><span style=3D" color:#0000ff;"><span class=3D"styled-by=
-prettify" style=3D"color: #000;">noexcept</span></span><span style=3D" col=
or:#000000;"><span class=3D"styled-by-prettify" style=3D"color: #660;">;</s=
pan></span></pre></div></code></div><div><b></b><i></i><u></u><sub></sub><s=
up></sup><strike><br></strike></div><div><br></div><div>DONE. Old code stil=
l works, if the compiler can&#39;t deduce the argument it will be instructe=
d to replace it with the result of decltype(t).</div><div><br></div><div><b=
r></div><div>std::forward and std::move have symmetry as they are both <i>t=
ransfers</i> - one is transferring ownership, the other is transferring &qu=
ot;whatever you give me&quot; (constnes, ownership, whatever, I am hands of=
f, move along). </div><div><br></div><div>Their naming is also good, the fa=
ct that they are syntactically NOT casts is good design decision - might be=
 implemented as cast, but semantically they are not. Good job there.</div><=
div><br></div><div>The problem is only the necessary param of forward - eve=
ryone will and does question why at some point.</div><div> And the answer i=
s not an answer but an excuse - no new understanding is received, it does n=
ot make you a better programmer it only shows limitations of the implementa=
tion, nothing more.</div><div>Not unlike the pesky typename in template cod=
e (which is going away luckily, 20 years later) =C2=A0</div><div><br></div>=
<div><br></div><div>As for library writer only need forward. I don&#39;t se=
e how is this the case. The moment you need to wrap any template code you n=
eed it.</div><div><br></div><div><div class=3D"prettyprint" style=3D"border=
: 1px solid rgb(187, 187, 187); word-wrap: break-word; background-color: rg=
b(250, 250, 250);"><div class=3D"subprettyprint"><code class=3D"prettyprint=
"><span style=3D" color:#0000ff;"><span class=3D"styled-by-prettify" style=
=3D"color: #008;">template</span></span><span style=3D" color:#000000;"><sp=
an class=3D"styled-by-prettify" style=3D"color: #660;">&lt;</span></span><s=
pan style=3D" color:#c0c0c0;"><span class=3D"styled-by-prettify" style=3D"c=
olor: #000;"> </span></span><span style=3D" color:#0000ff;"><span class=3D"=
styled-by-prettify" style=3D"color: #008;">class</span></span><span style=
=3D" color:#c0c0c0;"><span class=3D"styled-by-prettify" style=3D"color: #00=
0;"> </span></span><span style=3D" color:#00aaff;"><span class=3D"styled-by=
-prettify" style=3D"color: #606;">Container</span></span><span style=3D" co=
lor:#000000;"><span class=3D"styled-by-prettify" style=3D"color: #660;">,</=
span></span><span style=3D" color:#c0c0c0;"><span class=3D"styled-by-pretti=
fy" style=3D"color: #000;"> </span></span><span style=3D" color:#0000ff;"><=
span class=3D"styled-by-prettify" style=3D"color: #008;">class</span></span=
><span style=3D" color:#c0c0c0;"><span class=3D"styled-by-prettify" style=
=3D"color: #000;"> </span></span><span style=3D" color:#00aaff;"><span clas=
s=3D"styled-by-prettify" style=3D"color: #606;">UnaryPredicate</span></span=
><span style=3D" color:#c0c0c0;"><span class=3D"styled-by-prettify" style=
=3D"color: #000;"> </span></span><span style=3D" color:#000000;"><span clas=
s=3D"styled-by-prettify" style=3D"color: #660;">&gt;</span></span><span cla=
ss=3D"styled-by-prettify" style=3D"color: #000;"><br></span><pre style=3D" =
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-b=
lock-indent:0; text-indent:0px;"><span style=3D" color:#0000ff;"><span clas=
s=3D"styled-by-prettify" style=3D"color: #008;">auto</span></span><span sty=
le=3D" color:#c0c0c0;"><span class=3D"styled-by-prettify" style=3D"color: #=
000;"> </span></span><span style=3D" color:#000000;"><span class=3D"styled-=
by-prettify" style=3D"color: #000;">find_if</span></span><span style=3D" co=
lor:#000000;"><span class=3D"styled-by-prettify" style=3D"color: #660;">(</=
span></span><span style=3D" color:#00aaff;"><span class=3D"styled-by-pretti=
fy" style=3D"color: #606;">Container</span></span><span style=3D" color:#00=
0000;"><span class=3D"styled-by-prettify" style=3D"color: #660;">&amp;</spa=
n></span><span style=3D" color:#c0c0c0;"><span class=3D"styled-by-prettify"=
 style=3D"color: #000;"> </span></span><span style=3D" color:#000000;"><spa=
n class=3D"styled-by-prettify" style=3D"color: #000;">c</span></span><span =
style=3D" color:#000000;"><span class=3D"styled-by-prettify" style=3D"color=
: #660;">,</span></span><span style=3D" color:#c0c0c0;"><span class=3D"styl=
ed-by-prettify" style=3D"color: #000;"> </span></span><span style=3D" color=
:#00aaff;"><span class=3D"styled-by-prettify" style=3D"color: #606;">UnaryP=
redicate</span></span><span style=3D" color:#000000;"><span class=3D"styled=
-by-prettify" style=3D"color: #660;">&amp;&amp;</span></span><span style=3D=
" color:#c0c0c0;"><span class=3D"styled-by-prettify" style=3D"color: #000;"=
> </span></span><span style=3D" color:#000000;"><span class=3D"styled-by-pr=
ettify" style=3D"color: #000;">val</span><span class=3D"styled-by-prettify"=
 style=3D"color: #660;">)</span></span><span class=3D"styled-by-prettify" s=
tyle=3D"color: #000;"><br></span></pre><pre style=3D" margin-top:0px; margi=
n-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-i=
ndent:0px;"><span style=3D" color:#000000;"><span class=3D"styled-by-pretti=
fy" style=3D"color: #660;">{</span></span></pre><span class=3D"styled-by-pr=
ettify" style=3D"color: #000;">=C2=A0 </span><span class=3D"styled-by-prett=
ify" style=3D"color: #008;">using</span><span class=3D"styled-by-prettify" =
style=3D"color: #000;"> std</span><span class=3D"styled-by-prettify" style=
=3D"color: #660;">::</span><span class=3D"styled-by-prettify" style=3D"colo=
r: #008;">begin</span><span class=3D"styled-by-prettify" style=3D"color: #6=
60;">;</span><span class=3D"styled-by-prettify" style=3D"color: #000;"><br>=
=C2=A0 </span><span class=3D"styled-by-prettify" style=3D"color: #008;">usi=
ng</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> std</sp=
an><span class=3D"styled-by-prettify" style=3D"color: #660;">::</span><span=
 class=3D"styled-by-prettify" style=3D"color: #008;">end</span><span class=
=3D"styled-by-prettify" style=3D"color: #660;">;</span><span class=3D"style=
d-by-prettify" style=3D"color: #000;"> <br></span><pre style=3D" margin-top=
:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-inden=
t:0; text-indent:0px;"><span style=3D" color:#c0c0c0;"><span class=3D"style=
d-by-prettify" style=3D"color: #000;">=C2=A0 </span></span><span style=3D" =
color:#0000ff;"><span class=3D"styled-by-prettify" style=3D"color: #008;">r=
eturn</span></span><span style=3D" color:#c0c0c0;"><span class=3D"styled-by=
-prettify" style=3D"color: #000;"> </span></span><span style=3D" color:#00a=
aff;"><span class=3D"styled-by-prettify" style=3D"color: #000;">std</span><=
/span><span style=3D" color:#000000;"><span class=3D"styled-by-prettify" st=
yle=3D"color: #660;">::</span></span><span style=3D" color:#000000;"><span =
class=3D"styled-by-prettify" style=3D"color: #000;">find_if</span></span><s=
pan style=3D" color:#000000;"><span class=3D"styled-by-prettify" style=3D"c=
olor: #660;">(</span></span><span style=3D" color:#000000;"><span class=3D"=
styled-by-prettify" style=3D"color: #008;">begin</span></span><span style=
=3D" color:#000000;"><span class=3D"styled-by-prettify" style=3D"color: #66=
0;">(</span></span><span style=3D" color:#000000;"><span class=3D"styled-by=
-prettify" style=3D"color: #000;">c</span></span><span style=3D" color:#000=
000;"><span class=3D"styled-by-prettify" style=3D"color: #660;">),</span></=
span><span style=3D" color:#c0c0c0;"><span class=3D"styled-by-prettify" sty=
le=3D"color: #000;"> </span></span><span style=3D" color:#000000;"><span cl=
ass=3D"styled-by-prettify" style=3D"color: #008;">end</span></span><span st=
yle=3D" color:#000000;"><span class=3D"styled-by-prettify" style=3D"color: =
#660;">(</span></span><span style=3D" color:#000000;"><span class=3D"styled=
-by-prettify" style=3D"color: #000;">c</span></span><span style=3D" color:#=
000000;"><span class=3D"styled-by-prettify" style=3D"color: #660;">),</span=
></span><span style=3D" color:#c0c0c0;"><span class=3D"styled-by-prettify" =
style=3D"color: #000;"> </span></span><span style=3D" color:#00aaff;"><span=
 class=3D"styled-by-prettify" style=3D"color: #000;">std</span></span><span=
 style=3D" color:#000000;"><span class=3D"styled-by-prettify" style=3D"colo=
r: #660;">::</span></span><span style=3D" color:#000000;"><span class=3D"st=
yled-by-prettify" style=3D"color: #000;">forward</span></span><span style=
=3D" color:#000000;"><span class=3D"styled-by-prettify" style=3D"color: #66=
0;">&lt;</span></span><span class=3D"styled-by-prettify" style=3D"color: #6=
06;">UnaryPredicate</span><span style=3D" color:#000000;"><span class=3D"st=
yled-by-prettify" style=3D"color: #660;">&gt;(</span></span><span style=3D"=
 color:#000000;"><span class=3D"styled-by-prettify" style=3D"color: #000;">=
val</span></span><span style=3D" color:#000000;"><span class=3D"styled-by-p=
rettify" style=3D"color: #660;">));</span></span></pre><span class=3D"style=
d-by-prettify" style=3D"color: #000;"><br></span></code><pre style=3D" marg=
in-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block=
-indent:0; text-indent:0px;"><code class=3D"prettyprint"><span style=3D" co=
lor:#000000;"><span class=3D"styled-by-prettify" style=3D"color: #660;">}</=
span></span></code><br></pre></div></div></div></span><span style=3D"displa=
y: inline !important; float: none; background-color: transparent; color: rg=
b(34, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvetica&quot;,sans-se=
rif; font-size: 13px; font-style: normal; font-variant: normal; font-weight=
: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoratio=
n: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width:=
 0px; white-space: normal; word-spacing: 0px;"><div><br></div><div>You migh=
t argue, this is &quot;library code&quot;, but It is the normal user who mi=
ght and will write it.<br></div></span><div><span style=3D"display: inline =
!important; float: none; background-color: transparent; color: rgb(34, 34, =
34); font-family: &quot;Arial&quot;,&quot;Helvetica&quot;,sans-serif; font-=
size: 13px; font-style: normal; font-variant: normal; font-weight: 400; let=
ter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; t=
ext-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; whit=
e-space: normal; word-spacing: 0px;"><br></span></div><div><span style=3D"d=
isplay: inline !important; float: none; background-color: transparent; colo=
r: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvetica&quot;,sa=
ns-serif; font-size: 13px; font-style: normal; font-variant: normal; font-w=
eight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-deco=
ration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-w=
idth: 0px; white-space: normal; word-spacing: 0px;">As for &quot;library so=
lution&quot; vs &quot;language&quot;. Yes I agree move and forward are by n=
ature language features, </span></div><div><span style=3D"display: inline !=
important; float: none; background-color: transparent; color: rgb(34, 34, 3=
4); font-family: &quot;Arial&quot;,&quot;Helvetica&quot;,sans-serif; font-s=
ize: 13px; font-style: normal; font-variant: normal; font-weight: 400; lett=
er-spacing: normal; orphans: 2; text-align: left; text-decoration: none; te=
xt-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white=
-space: normal; word-spacing: 0px;">but is too late to implement them as su=
ch, and an operator is hardly &quot;language level&quot;, just syntax sugar=
..</span></div><div><span style=3D"display: inline !important; float: none; =
background-color: transparent; color: rgb(34, 34, 34); font-family: &quot;A=
rial&quot;,&quot;Helvetica&quot;,sans-serif; font-size: 13px; font-style: n=
ormal; font-variant: normal; font-weight: 400; letter-spacing: normal; orph=
ans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-tra=
nsform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spa=
cing: 0px;"><br></span></div><div>And if anyone is promoted to language, it=
 is the wildly more popular move. </div><div>And by promoted I mean compile=
r support in the lines present by Microsoft on the cppCon last year or may =
be it was the year before.=C2=A0</div><div>Right now you can move/forward t=
wice the same variable without even an warning, which is just a joke (aka F=
ootgun).</div><div><br></div><span style=3D"display: inline !important; flo=
at: none; background-color: transparent; color: rgb(34, 34, 34); font-famil=
y: &quot;Arial&quot;,&quot;Helvetica&quot;,sans-serif; font-size: 13px; fon=
t-style: normal; font-variant: normal; font-weight: 400; letter-spacing: no=
rmal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px=
; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal=
; word-spacing: 0px;"><div><br></div></span><div>P.S Marry Christmas, every=
one!</div><div><br></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/cafca4af-400f-47f8-abab-48eef0727a99%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/cafca4af-400f-47f8-abab-48eef0727a99=
%40isocpp.org</a>.<br />

------=_Part_14917_1137661987.1514194029898--

------=_Part_14916_862137623.1514194029897--

.
