Topic: Removing forward references ("universal" references)
Author: Denis Kotov <redradist@gmail.com>
Date: Sat, 25 Feb 2017 23:43:16 -0800 (PST)
Raw View
------=_Part_100_1208225446.1488094996428
Content-Type: multipart/alternative;
boundary="----=_Part_101_1830207983.1488094996428"
------=_Part_101_1830207983.1488094996428
Content-Type: text/plain; charset=UTF-8
Hi All,
My proposal is very simple. Just remove completely forward references
because of confusion that it makes until it is not too late !!
Basically if we have the following example:
template<typename T>
void setItem(T && t)
{
...
// T can be *lvalue *or *rvalue *reference as all of you know
}
But it confuses ( I think ) all of us.
Actually it even violates *SOLID *principale (S - Single responsibility). I
should use one function only for *rvalue *references or for *lvalue *references.
Mixing together handling of both references is bad practice.
What do you think ?
--
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/f4a47328-5397-4e93-9453-ddb978256627%40isocpp.org.
------=_Part_101_1830207983.1488094996428
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Hi All,</div><div><br></div><div>My proposal is very =
simple. Just remove completely=C2=A0forward references because of confusion=
that it makes until it is not too late !!</div><div>Basically if we have t=
he following example:</div><div><br></div><div>=C2=A0 =C2=A0 template<ty=
pename T></div><div>=C2=A0 =C2=A0 void setItem(T && t)</div><div=
>=C2=A0 =C2=A0 {</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ...</div><div>=C2=A0=
=C2=A0 =C2=A0 =C2=A0 // T can be <b>lvalue </b>or <b>rvalue </b>reference =
as all of you know =C2=A0 =C2=A0 =C2=A0 =C2=A0</div><div>=C2=A0 =C2=A0 }</d=
iv><div><br></div><div>But it confuses ( I think ) all of us.</div><div>Act=
ually it even violates <b>SOLID </b>principale (S - Single responsibility).=
I should use one function only for <b>rvalue </b>references or for <b>lval=
ue </b>references. Mixing together handling of both references is bad pract=
ice.</div><div><br></div><div>What do you think ?</div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/f4a47328-5397-4e93-9453-ddb978256627%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/f4a47328-5397-4e93-9453-ddb978256627=
%40isocpp.org</a>.<br />
------=_Part_101_1830207983.1488094996428--
------=_Part_100_1208225446.1488094996428--
.