Topic: A completely new take on Extension Methods
Author: mihailnajdenov@gmail.com
Date: Sun, 5 Aug 2018 10:10:12 -0700 (PDT)
Raw View
------=_Part_1128_841495297.1533489012091
Content-Type: multipart/alternative;
boundary="----=_Part_1129_1912525662.1533489012093"
------=_Part_1129_1912525662.1533489012093
Content-Type: text/plain; charset="UTF-8"
There are two schools of thought regarding the ability to call functions
using the dot notation.
One is to go UFCS (Uniform Function Call Syntax), where x.f(y) is the same
as f(x, y)
The other is to have extension methods either by having a free function
with an argument named "this" or to extend (reopen) existing class.
Both of these have a side effect, which can be considered a downside - they
hardcode what happens when the extended object receives the same function
as part of its declaration.
The hardcoded rules are hard to agree upon.
Here is another take - *we let the user decide*:
// given
namespace ns{
class Foo {};
void func(Foo& f, int);
*// syntax below is subject of change*
class Foo using
{
func; *//< User-Option 1, add ns::func as a fallback, if no member
function is present (same as range-for logic today)*
using func; *//< User-Option 2, add ns::func to member function
overloading resolution set (same as operator overloading logic today)*
}
}//< ns
*// usage*
void f(ns::Foo& foo)
{
func(foo, 5); *//< error (d'oh)*
foo.func(5); *//< error*
ns::func(foo, 5); *//< ok *(d'oh)
foo.ns::func(5) *//< ok*
using ns::func;
func(foo, 5) *//< ok, call depends on the presence of other func,
callable without qualification *(d'oh)
foo.func(5);* //< ok, call depends on the user-option selected *
}
Option 1 is great for things like string.starts_with(), where it is
absolutely clear the class can do a better implementation and it will be
correct. The code never breaks, even if the call is not qualified, but
there can be observable changes in the implementation.
Option 2 is arguably the most expected behavior - one adds up public member
functions, the same way one adds up free functions. If the call is not
qualified, the code can break because of redeclaration.
In order to *always* use the user code path and never break, never change
implementation, one must use qualification, not unlike today.
In other words.
If a function is called as free function, and it is not qualified, then it
is in competition with other free functions (imported via using or declared
in current scope), but not with member functions. (As always)
If a function is called as member, and is not qualified, it is in
competition with other member functions, but not with free functions.
If the user does not want competition, he must accept the class
implementation, which might be slightly different.
The user is not allowed Option 3, to hide class member functions.
More examples
template<class T>
class Foo {};
template<class T>
class Foo using
{
std::swap;
}
using std::swap;
Foo<int> fint;
fint.swap(...); //< std::swap
template<>
class Foo<std::string>
{
void swap(Foo&) {}
};
Foo<std::string> fing;
fing.swap(...); //< member
// --- --- --- --- --- ---
template<class T, class F>
std::vector sorted(std::vector<T> v, F&& f)
{
std::sort(v.begin(), v.end(), std::forward<F>(f));
return v;
}
template<class T, class F>
Magic serialize(const std::vector<T>& v) { return sparkles; }
template<class T>
class std::vector using
{
sorted; *//< if ever vector has a better implementation, use it*
using serialize*; //< *** never, ever let some other implementation kick
in, even if someone forgets to qualify! *
}
// user
const std::vector<int> vec{. . .};
lovesSorted(vec.sorted());
auto package = vec.sorted([]{ return ...; }).serialize();
And so on, you get the general idea - Extension Methods have using
semantics, they allow (for the current scope/TU) the dot notation, they
also allow the user to pick how are future changes to the extended class
coalesced.
--
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/b7850973-43d8-4521-9f62-b9696ee7e76c%40isocpp.org.
------=_Part_1129_1912525662.1533489012093
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div><br></div><div>There are two schools of thought regar=
ding the ability to call functions using the dot notation.</div><div><br></=
div><div>One is to go UFCS (Uniform Function Call Syntax), where <font face=
=3D"courier new,monospace">x.f(y) </font>is the same as<font face=3D"courie=
r new,monospace"> f(x, y)</font></div><div><font face=3D"arial,sans-serif">=
The other is to have extension methods either by having a free function wit=
h an argument named "this" or to extend=C2=A0 (reopen) existing c=
lass.</font></div><div><font face=3D"arial,sans-serif"><br></font></div><di=
v><br></div><div>Both of these have a side effect, which can be considered =
a downside - they hardcode what happens when the extended object receives t=
he same function as part of its declaration.</div><div><br></div><div>The h=
ardcoded rules are hard to agree upon.</div><div><br></div><div>Here is ano=
ther take - <i>we let the user decide</i>:<i></i><br></div><div><i></i><fon=
t face=3D"courier new,monospace"></font><br></div><div><font face=3D"courie=
r new,monospace">// given</font></div><div><font face=3D"courier new,monosp=
ace"><br></font></div><div><font face=3D"courier new,monospace">namespace n=
s{</font></div><div><font face=3D"courier new,monospace"><br></font></div><=
div><font face=3D"courier new,monospace">class Foo {};</font></div><div><fo=
nt face=3D"courier new,monospace"></font><br></div><div><font face=3D"couri=
er new,monospace">void func(Foo& f, int);</font><br></div><div><font fa=
ce=3D"courier new,monospace"></font><br></div><div><br></div><div><font fac=
e=3D"courier new,monospace"><i>// <span style=3D"text-align: left; color: r=
gb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: nor=
mal; font-size: 13px; font-variant: normal; font-weight: 400; text-decorati=
on: none; word-spacing: 0px; display: inline !important; white-space: norma=
l; orphans: 2; float: none; -webkit-text-stroke-width: 0px; background-colo=
r: transparent;">syntax below is subject of change</span></i></font><span s=
tyle=3D"text-align: left; color: rgb(34, 34, 34); text-transform: none; tex=
t-indent: 0px; letter-spacing: normal; font-size: 13px; font-variant: norma=
l; font-weight: 400; text-decoration: none; word-spacing: 0px; display: inl=
ine !important; white-space: normal; orphans: 2; float: none; -webkit-text-=
stroke-width: 0px; background-color: transparent;"><br></span></div><div><s=
pan style=3D"text-align: left; color: rgb(34, 34, 34); text-transform: none=
; text-indent: 0px; letter-spacing: normal; font-size: 13px; font-style: no=
rmal; font-variant: normal; font-weight: 400; text-decoration: none; word-s=
pacing: 0px; display: inline !important; white-space: normal; orphans: 2; f=
loat: none; -webkit-text-stroke-width: 0px; background-color: transparent;"=
><font face=3D"courier new,monospace"></font><i></i><br></span></div><div><=
span style=3D"text-align: left; color: rgb(34, 34, 34); text-transform: non=
e; text-indent: 0px; letter-spacing: normal; font-size: 13px; font-style: n=
ormal; font-variant: normal; font-weight: 400; text-decoration: none; word-=
spacing: 0px; display: inline !important; white-space: normal; orphans: 2; =
float: none; -webkit-text-stroke-width: 0px; background-color: transparent;=
"><br></span></div><div><span style=3D"text-align: left; color: rgb(34, 34,=
34); text-transform: none; text-indent: 0px; letter-spacing: normal; font-=
size: 13px; font-style: normal; font-variant: normal; font-weight: 400; tex=
t-decoration: none; word-spacing: 0px; display: inline !important; white-sp=
ace: normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; backg=
round-color: transparent;"><font face=3D"courier new,monospace">class Foo u=
sing</font></span></div><div><span style=3D"text-align: left; color: rgb(34=
, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; =
font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400=
; text-decoration: none; word-spacing: 0px; display: inline !important; whi=
te-space: normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; =
background-color: transparent;"><font face=3D"courier new,monospace">{</fon=
t></span><span style=3D"text-align: left; color: rgb(34, 34, 34); text-tran=
sform: none; text-indent: 0px; letter-spacing: normal; font-size: 13px; fon=
t-style: normal; font-variant: normal; font-weight: 400; text-decoration: n=
one; word-spacing: 0px; display: inline !important; white-space: normal; or=
phans: 2; float: none; -webkit-text-stroke-width: 0px; background-color: tr=
ansparent;"><font face=3D"courier new,monospace"><br></font></span></div><d=
iv><font face=3D"courier new,monospace">=C2=A0 <span style=3D"text-align: l=
eft; color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter=
-spacing: normal; font-size: 13px; font-style: normal; font-variant: normal=
; font-weight: 400; text-decoration: none; word-spacing: 0px; display: inli=
ne !important; white-space: normal; orphans: 2; float: none; -webkit-text-s=
troke-width: 0px; background-color: transparent;">func; <i>//< User-Opti=
on 1, <span style=3D"text-align: left; color: rgb(34, 34, 34); text-transfo=
rm: none; text-indent: 0px; letter-spacing: normal; font-family: courier ne=
w,monospace; font-size: 13px; font-variant: normal; font-weight: 400; text-=
decoration: none; word-spacing: 0px; display: inline !important; white-spac=
e: normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; backgro=
und-color: transparent;">add ns::func as a fallback, if no member function =
is present (same as range-for logic today)</span></i></span></font></div><d=
iv><span style=3D"text-align: left; color: rgb(34, 34, 34); text-transform:=
none; text-indent: 0px; letter-spacing: normal; font-size: 13px; font-styl=
e: normal; font-variant: normal; font-weight: 400; text-decoration: none; w=
ord-spacing: 0px; display: inline !important; white-space: normal; orphans:=
2; float: none; -webkit-text-stroke-width: 0px; background-color: transpar=
ent;"><font face=3D"courier new,monospace">=C2=A0=C2=A0</font></span></div>=
<div><span style=3D"text-align: left; color: rgb(34, 34, 34); text-transfor=
m: none; text-indent: 0px; letter-spacing: normal; font-size: 13px; font-st=
yle: normal; font-variant: normal; font-weight: 400; text-decoration: none;=
word-spacing: 0px; display: inline !important; white-space: normal; orphan=
s: 2; float: none; -webkit-text-stroke-width: 0px; background-color: transp=
arent;"><font face=3D"courier new,monospace">=C2=A0 using func; <i>//<=
=C2=A0 User-O<span style=3D"text-align: left; color: rgb(34, 34, 34); text-=
transform: none; text-indent: 0px; letter-spacing: normal; font-family: cou=
rier new,monospace; font-size: 13px; font-variant: normal; font-weight: 400=
; text-decoration: none; word-spacing: 0px; display: inline !important; whi=
te-space: normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; =
background-color: transparent;">ption 2, add ns::func to member function ov=
erloading resolution set (same as operator overloading logic today)</span><=
/i></font></span></div><div><span style=3D"text-align: left; color: rgb(34,=
34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; f=
ont-size: 13px; font-style: normal; font-variant: normal; font-weight: 400;=
text-decoration: none; word-spacing: 0px; display: inline !important; whit=
e-space: normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; b=
ackground-color: transparent;"><font face=3D"courier new,monospace">}</font=
></span></div><div><span style=3D"text-align: left; color: rgb(34, 34, 34);=
text-transform: none; text-indent: 0px; letter-spacing: normal; font-size:=
13px; font-style: normal; font-variant: normal; font-weight: 400; text-dec=
oration: none; word-spacing: 0px; display: inline !important; white-space: =
normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; background=
-color: transparent;"><font face=3D"courier new,monospace"><br></font></spa=
n></div><div><span style=3D"text-align: left; color: rgb(34, 34, 34); text-=
transform: none; text-indent: 0px; letter-spacing: normal; font-size: 13px;=
font-variant: normal; word-spacing: 0px; display: inline !important; white=
-space: normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; ba=
ckground-color: transparent;"><font face=3D"courier new,monospace"><span st=
yle=3D"display: inline !important; float: none; background-color: transpare=
nt; color: rgb(34, 34, 34); font-family: courier new,monospace; font-size: =
13px; font-style: normal; font-variant: normal; font-weight: 400; letter-sp=
acing: normal; orphans: 2; text-align: left; text-decoration: none; text-in=
dent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-spac=
e: normal; word-spacing: 0px;">}//< ns</span><b></b><i></i><u></u><sub><=
/sub><sup></sup><strike></strike><br></font></span></div><div><b></b><i></i=
><u></u><sub></sub><sup></sup><strike></strike><font face=3D"courier new,mo=
nospace"></font><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike=
><br></div><div><font face=3D"courier new,monospace"><i>// usage</i></font>=
</div><div><font face=3D"courier new,monospace"><i></i><br></font></div><di=
v><font face=3D"courier new,monospace">void f(ns::Foo& foo)</font></div=
><div><font face=3D"courier new,monospace">{</font></div><div><font face=3D=
"courier new,monospace">=C2=A0 func(foo, 5); <i>//< error (d'oh)</i>=
</font></div><div><font face=3D"courier new,monospace">=C2=A0 foo.func(5); =
<i>//< error</i></font></div><div><font face=3D"courier new,monospace"><=
i></i><br></font></div><div><font face=3D"courier new,monospace">=C2=A0 ns:=
:func(foo, 5); <i>//< ok=C2=A0</i><span style=3D"display: inline !import=
ant; float: none; background-color: transparent; color: rgb(34, 34, 34); fo=
nt-family: courier new,monospace; font-size: 13px; font-style: italic; font=
-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; tex=
t-align: left; text-decoration: none; text-indent: 0px; text-transform: non=
e; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"=
>(d'oh)</span></font></div><div><font face=3D"courier new,monospace">=
=C2=A0 foo.ns::func(5) <i>//< ok</i></font></div><div><font face=3D"cour=
ier new,monospace"><i></i><br></font></div><div><font face=3D"courier new,m=
onospace">=C2=A0 using ns::func;</font></div><div><font face=3D"courier new=
,monospace"></font><font face=3D"courier new,monospace"><font face=3D"couri=
er new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34); border-bot=
tom-style: none; border-bottom-width: 0px; border-image-outset: 0; border-i=
mage-repeat: stretch; border-image-slice: 100%; border-image-source: none; =
border-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-styl=
e: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); borde=
r-right-style: none; border-right-width: 0px; border-top-color: rgb(34, 34,=
34); border-top-style: none; border-top-width: 0px; margin-bottom: 0px; ma=
rgin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; pa=
dding-left: 0px; padding-right: 0px; padding-top: 0px;"><br></font></font><=
/div><div><font face=3D"courier new,monospace"><font face=3D"courier new,mo=
nospace" style=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-style=
: none; border-bottom-width: 0px; border-image-outset: 0; border-image-repe=
at: stretch; border-image-slice: 100%; border-image-source: none; border-im=
age-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; =
border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-s=
tyle: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); bor=
der-top-style: none; border-top-width: 0px; margin-bottom: 0px; margin-left=
: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-lef=
t: 0px; padding-right: 0px; padding-top: 0px;">=C2=A0 func(foo, 5) <i>//<=
; ok, call depends on the presence of other func, callable without qualific=
ation=C2=A0</i><span style=3D"display: inline !important; float: none; back=
ground-color: transparent; color: rgb(34, 34, 34); font-family: courier new=
,monospace; font-size: 13px; font-style: italic; font-variant: normal; font=
-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-de=
coration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke=
-width: 0px; white-space: normal; word-spacing: 0px;">(d'oh)</span></fo=
nt></font></div><div><font face=3D"courier new,monospace"><div style=3D"bac=
kground-color: transparent; border-bottom-color: rgb(34, 34, 34); border-bo=
ttom-style: none; 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(34, 34, 34); border-left-sty=
le: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); bord=
er-right-style: none; border-right-width: 0px; border-top-color: rgb(34, 34=
, 34); border-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34=
); font-family: &quot;Arial&quot;,&quot;Helvetica&quot;,san=
s-serif; font-size: 13px; font-style: normal; font-variant: normal; font-we=
ight: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px; ma=
rgin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-=
left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-dec=
oration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-=
width: 0px; white-space: normal; word-spacing: 0px;"><font face=3D"courier =
new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34); border-bottom=
-style: none; border-bottom-width: 0px; border-image-outset: 0; border-imag=
e-repeat: stretch; border-image-slice: 100%; border-image-source: none; bor=
der-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: =
none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-r=
ight-style: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34=
); border-top-style: none; border-top-width: 0px; margin-bottom: 0px; margi=
n-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; paddi=
ng-left: 0px; padding-right: 0px; padding-top: 0px;">=C2=A0 foo.func(5);<i>=
//< ok, call depends on the user-option selected=C2=A0</i></font></div>=
<div style=3D"background-color: transparent; border-bottom-color: rgb(34, 3=
4, 34); border-bottom-style: none; border-bottom-width: 0px; border-image-o=
utset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-im=
age-source: none; border-image-width: 1; border-left-color: rgb(34, 34, 34)=
; border-left-style: none; border-left-width: 0px; border-right-color: rgb(=
34, 34, 34); border-right-style: none; border-right-width: 0px; border-top-=
color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; colo=
r: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvet=
ica&quot;,sans-serif; font-size: 13px; font-style: normal; font-variant=
: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; mar=
gin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bott=
om: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-alig=
n: left; text-decoration: none; text-indent: 0px; text-transform: none; -we=
bkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><font=
face=3D"courier new,monospace" style=3D"border-bottom-color: rgb(34, 34, 3=
4); border-bottom-style: none; border-bottom-width: 0px; border-image-outse=
t: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-=
source: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); bo=
rder-left-style: none; border-left-width: 0px; border-right-color: rgb(34, =
34, 34); border-right-style: none; border-right-width: 0px; border-top-colo=
r: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; margin-b=
ottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-b=
ottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">}</fo=
nt></div><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br></=
font></div><div><br></div><div>Option 1 is great for things like<font face=
=3D"courier new,monospace"> string.starts_with()</font>, where it is absolu=
tely clear the class can do a better implementation and it will be correct.=
The code never breaks, even if the call is not qualified, but there can be=
observable changes in the implementation.=C2=A0</div><div><br></div><div>O=
ption 2 is arguably the most expected behavior - one adds up public member =
functions, the same way one adds up free functions. If the call is not qual=
ified, the code can break because of redeclaration. =C2=A0</div><div><br></=
div><div>In order to <i>always</i> use the user code path and never break, =
never change implementation, one must use qualification, not unlike today.<=
/div><div><br></div><div>In other words.</div><div><span style=3D"display: =
inline !important; float: none; background-color: transparent; color: rgb(3=
4, 34, 34); font-family: "Arial","Helvetica",sans-serif=
; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 4=
00; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: =
none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0p=
x; white-space: normal; word-spacing: 0px;">If a function is called as free=
function, and it is not qualified, then </span><span style=3D"background-c=
olor: transparent; border-bottom-color: rgb(34, 34, 34); border-bottom-styl=
e: none; border-bottom-width: 0px; border-image-outset: 0; border-image-rep=
eat: stretch; border-image-slice: 100%; border-image-source: none; border-i=
mage-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: none;=
border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-=
style: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); bo=
rder-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); displa=
y: inline; float: none; font-family: &quot;Arial&quot;,&quot;He=
lvetica&quot;,sans-serif; font-size: 13px; font-style: normal; font-var=
iant: 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: 0px; padding-top: 0px; text-=
align: left; text-decoration: none; text-indent: 0px; text-transform: none;=
-webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">i=
t is in competition with other free functions (imported via <font face=3D"c=
ourier new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34); border=
-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; bord=
er-image-repeat: stretch; border-image-slice: 100%; border-image-source: no=
ne; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-=
style: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); b=
order-right-style: none; border-right-width: 0px; border-top-color: rgb(34,=
34, 34); border-top-style: none; border-top-width: 0px; margin-bottom: 0px=
; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px=
; padding-left: 0px; padding-right: 0px; padding-top: 0px;">using <font fac=
e=3D"arial,sans-serif">or declared in current scope</font>)</font>, but not=
with member functions. (As always)</span><span style=3D"background-color: =
transparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: non=
e; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: s=
tretch; border-image-slice: 100%; border-image-source: none; border-image-w=
idth: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; borde=
r-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style:=
none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-t=
op-style: none; border-top-width: 0px; color: rgb(34, 34, 34); display: inl=
ine; float: none; font-family: &quot;Arial&quot;,&quot;Helvetic=
a&quot;,sans-serif; font-size: 13px; font-style: normal; font-variant: =
normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; margi=
n-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom=
: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align:=
left; text-decoration: none; text-indent: 0px; text-transform: none; -webk=
it-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><br sty=
le=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; bord=
er-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(34, 34, 34); border-left-style: none; border-left-=
width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none; =
border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-styl=
e: none; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margi=
n-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padd=
ing-right: 0px; padding-top: 0px;">I</span>f a function is called as member=
, and is not qualified, it is in competition with other member functions, b=
ut not with free functions.=C2=A0<span style=3D"display: inline !important;=
float: none; background-color: transparent; color: rgb(34, 34, 34); font-f=
amily: "Arial","Helvetica",sans-serif; font-size: 13px;=
font-style: normal; font-variant: normal; font-weight: 400; letter-spacing=
: normal; orphans: 2; text-align: left; text-decoration: none; text-indent:=
0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: no=
rmal; word-spacing: 0px;"><br></span></div><div><span style=3D"display: inl=
ine !important; float: none; background-color: transparent; color: rgb(34, =
34, 34); font-family: "Arial","Helvetica",sans-serif; f=
ont-size: 13px; font-style: normal; font-variant: normal; font-weight: 400;=
letter-spacing: normal; orphans: 2; text-align: left; text-decoration: non=
e; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; =
white-space: normal; word-spacing: 0px;">If the user does not want competit=
ion, he must accept the class implementation, which might be slightly diffe=
rent.</span><span style=3D"display: inline !important; float: none; backgro=
und-color: transparent; color: rgb(34, 34, 34); font-family: "Arial&qu=
ot;,"Helvetica",sans-serif; font-size: 13px; font-style: normal; =
font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2;=
text-align: left; text-decoration: none; text-indent: 0px; text-transform:=
none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0=
px;"><br></span></div><div><span style=3D"display: inline !important; float=
: none; background-color: transparent; color: rgb(34, 34, 34); font-family:=
"Arial","Helvetica",sans-serif; font-size: 13px; font-=
style: normal; font-variant: normal; font-weight: 400; letter-spacing: norm=
al; 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;">The user is not allowed Option 3, to hide class member =
functions.</span></div><div><span style=3D"display: inline !important; floa=
t: none; background-color: transparent; color: rgb(34, 34, 34); font-family=
: "Arial","Helvetica",sans-serif; font-size: 13px; font=
-style: normal; font-variant: normal; font-weight: 400; letter-spacing: nor=
mal; 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;"><br></span></div><div><span style=3D"display: inline !=
important; float: none; background-color: transparent; color: rgb(34, 34, 3=
4); font-family: "Arial","Helvetica",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;"><br></span></div><div>More examples</di=
v><div><br></div><div><div style=3D"background-color: transparent; border-b=
ottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-widt=
h: 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(34, 34, 34); border-left-style: none; border-left-width: 0px; bo=
rder-right-color: rgb(34, 34, 34); border-right-style: none; border-right-w=
idth: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; borde=
r-top-width: 0px; 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; letter-spacing: normal; m=
argin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; or=
phans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; paddi=
ng-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; tex=
t-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; wor=
d-spacing: 0px;"><span style=3D"background-color: transparent; border-botto=
m-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0=
px; border-image-outset: 0; border-image-repeat: stretch; border-image-slic=
e: 100%; border-image-source: none; border-image-width: 1; border-left-colo=
r: rgb(34, 34, 34); border-left-style: none; border-left-width: 0px; border=
-right-color: rgb(34, 34, 34); border-right-style: none; border-right-width=
: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; border-to=
p-width: 0px; color: rgb(34, 34, 34); display: inline; float: none; font-si=
ze: 13px; font-style: normal; font-variant: normal; font-weight: 400; lette=
r-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px;=
margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; paddi=
ng-right: 0px; padding-top: 0px; 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;"><font face=3D"courier new,monospace" s=
tyle=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; bo=
rder-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretc=
h; border-image-slice: 100%; border-image-source: none; border-image-width:=
1; border-left-color: rgb(34, 34, 34); border-left-style: none; border-lef=
t-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none=
; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-st=
yle: none; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; mar=
gin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; pa=
dding-right: 0px; padding-top: 0px;">template<class T></font></span><=
/div><div style=3D"background-color: transparent; border-bottom-color: rgb(=
34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; border-im=
age-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; bord=
er-image-source: none; border-image-width: 1; border-left-color: rgb(34, 34=
, 34); border-left-style: none; border-left-width: 0px; border-right-color:=
rgb(34, 34, 34); border-right-style: none; border-right-width: 0px; border=
-top-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px;=
color: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&quot;H=
elvetica&quot;,sans-serif; font-size: 13px; font-style: normal; font-va=
riant: 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: 0px; padding-top: 0px; text=
-align: left; text-decoration: none; text-indent: 0px; text-transform: none=
; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">=
<span style=3D"background-color: transparent; border-bottom-color: rgb(34, =
34, 34); border-bottom-style: none; border-bottom-width: 0px; border-image-=
outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-i=
mage-source: none; border-image-width: 1; border-left-color: rgb(34, 34, 34=
); border-left-style: none; border-left-width: 0px; border-right-color: rgb=
(34, 34, 34); border-right-style: none; border-right-width: 0px; border-top=
-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; col=
or: rgb(34, 34, 34); display: inline; float: none; font-size: 13px; font-st=
yle: 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: 0px; pa=
dding-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; =
text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; =
word-spacing: 0px;"><font face=3D"courier new,monospace" style=3D"border-bo=
ttom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width=
: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-s=
lice: 100%; border-image-source: none; border-image-width: 1; border-left-c=
olor: rgb(34, 34, 34); border-left-style: none; border-left-width: 0px; bor=
der-right-color: rgb(34, 34, 34); border-right-style: none; border-right-wi=
dth: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; border=
-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; m=
argin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;=
padding-top: 0px;">class Foo {};</font></span></div><div style=3D"backgrou=
nd-color: transparent; border-bottom-color: rgb(34, 34, 34); border-bottom-=
style: none; border-bottom-width: 0px; border-image-outset: 0; border-image=
-repeat: stretch; border-image-slice: 100%; border-image-source: none; bord=
er-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: n=
one; border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-ri=
ght-style: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34)=
; border-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); fo=
nt-family: &quot;Arial&quot;,&quot;Helvetica&quot;,sans-ser=
if; 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-top: 0px; orphans: 2; padding-bottom: 0px; padding-left:=
0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decorati=
on: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width=
: 0px; white-space: normal; word-spacing: 0px;"><span style=3D"background-c=
olor: transparent; border-bottom-color: rgb(34, 34, 34); border-bottom-styl=
e: none; border-bottom-width: 0px; border-image-outset: 0; border-image-rep=
eat: stretch; border-image-slice: 100%; border-image-source: none; border-i=
mage-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: none;=
border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-=
style: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); bo=
rder-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); displa=
y: inline; float: none; font-size: 13px; font-style: normal; font-variant: =
normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; margi=
n-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom=
: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align:=
left; text-decoration: none; text-indent: 0px; text-transform: none; -webk=
it-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><font f=
ace=3D"courier new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34)=
; border-bottom-style: none; border-bottom-width: 0px; border-image-outset:=
0; border-image-repeat: stretch; border-image-slice: 100%; border-image-so=
urce: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); bord=
er-left-style: none; border-left-width: 0px; border-right-color: rgb(34, 34=
, 34); border-right-style: none; border-right-width: 0px; border-top-color:=
rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; margin-bot=
tom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bot=
tom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"><br></f=
ont></span></div><div style=3D"margin: 0px; padding: 0px; border: 0px rgb(3=
4, 34, 34); border-image: none; text-align: left; color: rgb(34, 34, 34); t=
ext-transform: none; text-indent: 0px; letter-spacing: normal; font-size: 1=
3px; font-variant: normal; word-spacing: 0px; white-space: normal; orphans:=
2; -webkit-text-stroke-width: 0px; background-color: transparent;"><span s=
tyle=3D"margin: 0px; padding: 0px; border: 0px rgb(34, 34, 34); border-imag=
e: none; text-align: left; color: rgb(34, 34, 34); text-transform: none; te=
xt-indent: 0px; letter-spacing: normal; font-size: 13px; font-variant: norm=
al; word-spacing: 0px; display: inline; white-space: normal; orphans: 2; fl=
oat: none; -webkit-text-stroke-width: 0px; background-color: transparent;">=
<font face=3D"courier new,monospace" style=3D"border-bottom-color: rgb(34, =
34, 34); border-bottom-style: none; border-bottom-width: 0px; border-image-=
outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-i=
mage-source: none; border-image-width: 1; border-left-color: rgb(34, 34, 34=
); border-left-style: none; border-left-width: 0px; border-right-color: rgb=
(34, 34, 34); border-right-style: none; border-right-width: 0px; border-top=
-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; mar=
gin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padd=
ing-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">=
<div style=3D"background-color: transparent; border-bottom-color: rgb(34, 3=
4, 34); border-bottom-style: none; border-bottom-width: 0px; border-image-o=
utset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-im=
age-source: none; border-image-width: 1; border-left-color: rgb(34, 34, 34)=
; border-left-style: none; border-left-width: 0px; border-right-color: rgb(=
34, 34, 34); border-right-style: none; border-right-width: 0px; border-top-=
color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; colo=
r: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvet=
ica&quot;,sans-serif; font-size: 13px; font-style: normal; font-variant=
: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; mar=
gin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bott=
om: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-alig=
n: left; text-decoration: none; text-indent: 0px; text-transform: none; -we=
bkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><div =
style=3D"background-color: transparent; border-bottom-color: rgb(34, 34, 34=
); border-bottom-style: none; border-bottom-width: 0px; border-image-outset=
: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-s=
ource: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); bor=
der-left-style: none; border-left-width: 0px; border-right-color: rgb(34, 3=
4, 34); border-right-style: none; border-right-width: 0px; border-top-color=
: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; color: rg=
b(34, 34, 34); font-size: 13px; font-style: normal; font-variant: normal; f=
ont-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0=
px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; pa=
dding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; te=
xt-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-s=
troke-width: 0px; white-space: normal; word-spacing: 0px;"><span style=3D"b=
ackground-color: transparent; border-bottom-color: rgb(34, 34, 34); border-=
bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; borde=
r-image-repeat: stretch; border-image-slice: 100%; border-image-source: non=
e; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-s=
tyle: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); bo=
rder-right-style: none; border-right-width: 0px; border-top-color: rgb(34, =
34, 34); border-top-style: none; border-top-width: 0px; color: rgb(34, 34, =
34); display: inline; float: none; font-size: 13px; font-style: normal; fon=
t-variant: normal; font-weight: 400; letter-spacing: normal; margin-bottom:=
0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; pad=
ding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; =
text-align: left; text-decoration: none; text-indent: 0px; text-transform: =
none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0p=
x;"><font face=3D"courier new,monospace" style=3D"border-bottom-color: rgb(=
34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; border-im=
age-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; bord=
er-image-source: none; border-image-width: 1; border-left-color: rgb(34, 34=
, 34); border-left-style: none; border-left-width: 0px; border-right-color:=
rgb(34, 34, 34); border-right-style: none; border-right-width: 0px; border=
-top-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px;=
margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; =
padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0p=
x;">template<class T></font></span></div><div style=3D"background-col=
or: transparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style:=
none; border-bottom-width: 0px; border-image-outset: 0; border-image-repea=
t: stretch; border-image-slice: 100%; border-image-source: none; border-ima=
ge-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; b=
order-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-st=
yle: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); bord=
er-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-siz=
e: 13px; font-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; paddin=
g-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; te=
xt-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white=
-space: normal; word-spacing: 0px;"><span style=3D"background-color: transp=
arent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; bor=
der-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(34, 34, 34); border-left-style: none; border-left=
-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none;=
border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-sty=
le: none; border-top-width: 0px; color: rgb(34, 34, 34); display: inline; f=
loat: none; 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-top: 0px; orphans: 2; padding-bottom: 0px; paddi=
ng-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-=
decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stro=
ke-width: 0px; white-space: normal; word-spacing: 0px;"><font face=3D"couri=
er new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34); border-bot=
tom-style: none; border-bottom-width: 0px; border-image-outset: 0; border-i=
mage-repeat: stretch; border-image-slice: 100%; border-image-source: none; =
border-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-styl=
e: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); borde=
r-right-style: none; border-right-width: 0px; border-top-color: rgb(34, 34,=
34); border-top-style: none; border-top-width: 0px; margin-bottom: 0px; ma=
rgin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; pa=
dding-left: 0px; padding-right: 0px; padding-top: 0px;">class Foo using</fo=
nt></span></div><b style=3D"background-attachment: scroll; background-clip:=
border-box; background-color: transparent; background-image: none; backgro=
und-origin: padding-box; background-position-x: 0%; background-position-y: =
0%; background-repeat: repeat; background-size: auto; border-bottom-color: =
rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; borde=
r-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; =
border-image-source: none; border-image-width: 1; border-left-color: rgb(34=
, 34, 34); border-left-style: none; border-left-width: 0px; border-right-co=
lor: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px; bo=
rder-top-color: rgb(34, 34, 34); border-top-style: none; border-top-width: =
0px; color: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&qu=
ot;Helvetica&quot;,sans-serif; font-size: 13px; height: auto; margin-bo=
ttom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-width:=
0px; overflow: visible; overflow-x: visible; overflow-y: visible; padding-=
bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"></b>=
<i style=3D"background-attachment: scroll; background-clip: border-box; bac=
kground-color: transparent; background-image: none; background-origin: padd=
ing-box; background-position-x: 0%; background-position-y: 0%; background-r=
epeat: repeat; background-size: auto; border-bottom-color: rgb(34, 34, 34);=
border-bottom-style: none; border-bottom-width: 0px; border-image-outset: =
0; border-image-repeat: stretch; border-image-slice: 100%; border-image-sou=
rce: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); borde=
r-left-style: none; border-left-width: 0px; border-right-color: rgb(34, 34,=
34); border-right-style: none; border-right-width: 0px; border-top-color: =
rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; color: rgb(=
34, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvetica&=
;quot;,sans-serif; font-size: 13px; height: auto; margin-bottom: 0px; margi=
n-left: 0px; margin-right: 0px; margin-top: 0px; min-width: 0px; overflow: =
visible; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; pad=
ding-left: 0px; padding-right: 0px; padding-top: 0px;"></i><u style=3D"back=
ground-attachment: scroll; background-clip: border-box; background-color: t=
ransparent; background-image: none; background-origin: padding-box; backgro=
und-position-x: 0%; background-position-y: 0%; background-repeat: repeat; b=
ackground-size: auto; border-bottom-color: rgb(34, 34, 34); border-bottom-s=
tyle: none; border-bottom-width: 0px; border-image-outset: 0; border-image-=
repeat: stretch; border-image-slice: 100%; border-image-source: none; borde=
r-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: no=
ne; border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-rig=
ht-style: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34);=
border-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); fon=
t-family: &quot;Arial&quot;,&quot;Helvetica&quot;,sans-seri=
f; font-size: 13px; height: auto; margin-bottom: 0px; margin-left: 0px; mar=
gin-right: 0px; margin-top: 0px; min-width: 0px; overflow: visible; overflo=
w-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; =
padding-right: 0px; padding-top: 0px;"></u><sub style=3D"border-bottom-colo=
r: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; bo=
rder-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100=
%; border-image-source: none; border-image-width: 1; border-left-color: rgb=
(34, 34, 34); border-left-style: none; border-left-width: 0px; border-right=
-color: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px;=
border-top-color: rgb(34, 34, 34); border-top-style: none; border-top-widt=
h: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top=
: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-=
top: 0px;"></sub><sup style=3D"border-bottom-color: rgb(34, 34, 34); border=
-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; bord=
er-image-repeat: stretch; border-image-slice: 100%; border-image-source: no=
ne; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-=
style: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); b=
order-right-style: none; border-right-width: 0px; border-top-color: rgb(34,=
34, 34); border-top-style: none; border-top-width: 0px; margin-bottom: 0px=
; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px=
; padding-left: 0px; padding-right: 0px; padding-top: 0px;"></sup><strike s=
tyle=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; bo=
rder-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretc=
h; border-image-slice: 100%; border-image-source: none; border-image-width:=
1; border-left-color: rgb(34, 34, 34); border-left-style: none; border-lef=
t-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none=
; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-st=
yle: none; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; mar=
gin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; pa=
dding-right: 0px; padding-top: 0px;"></strike><font face=3D"courier new,mon=
ospace" style=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-style:=
none; border-bottom-width: 0px; border-image-outset: 0; border-image-repea=
t: stretch; border-image-slice: 100%; border-image-source: none; border-ima=
ge-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; b=
order-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-st=
yle: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); bord=
er-top-style: none; border-top-width: 0px; margin-bottom: 0px; margin-left:=
0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left=
: 0px; padding-right: 0px; padding-top: 0px;">{=C2=A0</font></div><div styl=
e=3D"background-color: transparent; border-bottom-color: rgb(34, 34, 34); b=
order-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0;=
border-image-repeat: stretch; border-image-slice: 100%; border-image-sourc=
e: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-=
left-style: none; border-left-width: 0px; border-right-color: rgb(34, 34, 3=
4); border-right-style: none; border-right-width: 0px; border-top-color: rg=
b(34, 34, 34); border-top-style: none; border-top-width: 0px; color: rgb(34=
, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvetica&q=
uot;,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-top: 0px; orphans: 2; padding-bottom: 0px; =
padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; =
text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text=
-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><font face=3D"=
courier new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34); borde=
r-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; bor=
der-image-repeat: stretch; border-image-slice: 100%; border-image-source: n=
one; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-left=
-style: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); =
border-right-style: none; border-right-width: 0px; border-top-color: rgb(34=
, 34, 34); border-top-style: none; border-top-width: 0px; margin-bottom: 0p=
x; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0p=
x; padding-left: 0px; padding-right: 0px; padding-top: 0px;">=C2=A0 std::sw=
ap;=C2=A0</font></div><div style=3D"background-color: transparent; border-b=
ottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-widt=
h: 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(34, 34, 34); border-left-style: none; border-left-width: 0px; bo=
rder-right-color: rgb(34, 34, 34); border-right-style: none; border-right-w=
idth: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; borde=
r-top-width: 0px; 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; letter-spacing: normal; m=
argin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; or=
phans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; paddi=
ng-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; tex=
t-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; wor=
d-spacing: 0px;"><font face=3D"courier new,monospace" style=3D"border-botto=
m-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0=
px; border-image-outset: 0; border-image-repeat: stretch; border-image-slic=
e: 100%; border-image-source: none; border-image-width: 1; border-left-colo=
r: rgb(34, 34, 34); border-left-style: none; border-left-width: 0px; border=
-right-color: rgb(34, 34, 34); border-right-style: none; border-right-width=
: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; border-to=
p-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; marg=
in-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; pa=
dding-top: 0px;">}</font></div><div style=3D"background-color: transparent;=
border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bo=
ttom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; bord=
er-image-slice: 100%; border-image-source: none; border-image-width: 1; bor=
der-left-color: rgb(34, 34, 34); border-left-style: none; border-left-width=
: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none; borde=
r-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: no=
ne; border-top-width: 0px; color: rgb(34, 34, 34); font-family: &quot;A=
rial&quot;,&quot;Helvetica&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;"><font face=3D"courier new,monospace" style=3D"bor=
der-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom=
-width: 0px; border-image-outset: 0; border-image-repeat: stretch; border-i=
mage-slice: 100%; border-image-source: none; border-image-width: 1; border-=
left-color: rgb(34, 34, 34); border-left-style: none; border-left-width: 0p=
x; border-right-color: rgb(34, 34, 34); border-right-style: none; border-ri=
ght-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; =
border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: =
0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right=
: 0px; padding-top: 0px;"></font><br style=3D"background-attachment: scroll=
; background-clip: border-box; background-color: transparent; background-im=
age: none; background-origin: padding-box; background-position-x: 0%; backg=
round-position-y: 0%; background-repeat: repeat; background-size: auto; bor=
der-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom=
-width: 0px; border-image-outset: 0; border-image-repeat: stretch; border-i=
mage-slice: 100%; border-image-source: none; border-image-width: 1; border-=
left-color: rgb(34, 34, 34); border-left-style: none; border-left-width: 0p=
x; border-right-color: rgb(34, 34, 34); border-right-style: none; border-ri=
ght-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; =
border-top-width: 0px; color: rgb(34, 34, 34); font-family: &quot;Arial=
&quot;,&quot;Helvetica&quot;,sans-serif; font-size: 13px; heigh=
t: auto; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-to=
p: 0px; min-width: 0px; overflow: visible; overflow-x: visible; overflow-y:=
visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; paddi=
ng-top: 0px;"></div><div style=3D"background-color: transparent; border-bot=
tom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width:=
0px; border-image-outset: 0; border-image-repeat: stretch; border-image-sl=
ice: 100%; border-image-source: none; border-image-width: 1; border-left-co=
lor: rgb(34, 34, 34); border-left-style: none; border-left-width: 0px; bord=
er-right-color: rgb(34, 34, 34); border-right-style: none; border-right-wid=
th: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; border-=
top-width: 0px; color: rgb(34, 34, 34); font-family: &quot;Arial&qu=
ot;,&quot;Helvetica&quot;,sans-serif; font-size: 13px; font-style: =
normal; font-variant: normal; font-weight: 400; letter-spacing: normal; mar=
gin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orph=
ans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding=
-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-=
transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-=
spacing: 0px;"><span style=3D"background-color: transparent; border-bottom-=
color: rgb(34, 34, 34); border-bottom-style: none; 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(34, 34, 34); border-left-style: none; border-left-width: 0px; border-r=
ight-color: rgb(34, 34, 34); border-right-style: none; border-right-width: =
0px; border-top-color: rgb(34, 34, 34); border-top-style: none; border-top-=
width: 0px; color: rgb(34, 34, 34); display: inline; float: none; font-fami=
ly: courier new,monospace; font-size: 13px; font-style: normal; font-varian=
t: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; ma=
rgin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bot=
tom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-ali=
gn: left; text-decoration: none; text-indent: 0px; text-transform: none; -w=
ebkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">usin=
g std::swap;</span><b style=3D"background-attachment: scroll; background-cl=
ip: border-box; background-color: transparent; background-image: none; back=
ground-origin: padding-box; background-position-x: 0%; background-position-=
y: 0%; background-repeat: repeat; background-size: auto; border-bottom-colo=
r: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; bo=
rder-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100=
%; border-image-source: none; border-image-width: 1; border-left-color: rgb=
(34, 34, 34); border-left-style: none; border-left-width: 0px; border-right=
-color: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px;=
border-top-color: rgb(34, 34, 34); border-top-style: none; border-top-widt=
h: 0px; color: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&=
;quot;Helvetica&quot;,sans-serif; font-size: 13px; height: auto; margin=
-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-wid=
th: 0px; overflow: visible; overflow-x: visible; overflow-y: visible; paddi=
ng-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"><=
/b><i style=3D"background-attachment: scroll; background-clip: border-box; =
background-color: transparent; background-image: none; background-origin: p=
adding-box; background-position-x: 0%; background-position-y: 0%; backgroun=
d-repeat: repeat; background-size: auto; border-bottom-color: rgb(34, 34, 3=
4); border-bottom-style: none; border-bottom-width: 0px; border-image-outse=
t: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-=
source: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); bo=
rder-left-style: none; border-left-width: 0px; border-right-color: rgb(34, =
34, 34); border-right-style: none; border-right-width: 0px; border-top-colo=
r: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; color: r=
gb(34, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvetica&=
amp;quot;,sans-serif; font-size: 13px; height: auto; margin-bottom: 0px; ma=
rgin-left: 0px; margin-right: 0px; margin-top: 0px; min-width: 0px; overflo=
w: visible; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; =
padding-left: 0px; padding-right: 0px; padding-top: 0px;"></i><u style=3D"b=
ackground-attachment: scroll; background-clip: border-box; background-color=
: transparent; background-image: none; background-origin: padding-box; back=
ground-position-x: 0%; background-position-y: 0%; background-repeat: repeat=
; background-size: auto; border-bottom-color: rgb(34, 34, 34); border-botto=
m-style: none; border-bottom-width: 0px; border-image-outset: 0; border-ima=
ge-repeat: stretch; border-image-slice: 100%; border-image-source: none; bo=
rder-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-style:=
none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-=
right-style: none; border-right-width: 0px; border-top-color: rgb(34, 34, 3=
4); border-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); =
font-family: &quot;Arial&quot;,&quot;Helvetica&quot;,sans-s=
erif; font-size: 13px; height: auto; margin-bottom: 0px; margin-left: 0px; =
margin-right: 0px; margin-top: 0px; min-width: 0px; overflow: visible; over=
flow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0p=
x; padding-right: 0px; padding-top: 0px;"></u><sub style=3D"border-bottom-c=
olor: rgb(34, 34, 34); border-bottom-style: none; 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(34, 34, 34); border-left-style: none; border-left-width: 0px; border-ri=
ght-color: rgb(34, 34, 34); border-right-style: none; border-right-width: 0=
px; border-top-color: rgb(34, 34, 34); border-top-style: none; border-top-w=
idth: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-=
top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; paddi=
ng-top: 0px;"></sub><sup style=3D"border-bottom-color: rgb(34, 34, 34); bor=
der-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; b=
order-image-repeat: stretch; border-image-slice: 100%; border-image-source:=
none; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-le=
ft-style: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34)=
; border-right-style: none; border-right-width: 0px; border-top-color: rgb(=
34, 34, 34); border-top-style: none; border-top-width: 0px; margin-bottom: =
0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: =
0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"></sup><strik=
e style=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-style: none;=
border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: str=
etch; border-image-slice: 100%; border-image-source: none; border-image-wid=
th: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; border-=
left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: n=
one; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top=
-style: none; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; =
margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px;=
padding-right: 0px; padding-top: 0px;"></strike><br style=3D"background-at=
tachment: scroll; background-clip: border-box; background-color: transparen=
t; background-image: none; background-origin: padding-box; background-posit=
ion-x: 0%; background-position-y: 0%; background-repeat: repeat; background=
-size: auto; border-bottom-color: rgb(34, 34, 34); border-bottom-style: non=
e; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: s=
tretch; border-image-slice: 100%; border-image-source: none; border-image-w=
idth: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; borde=
r-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style:=
none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-t=
op-style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-family:=
&quot;Arial&quot;,&quot;Helvetica&quot;,sans-serif; font-s=
ize: 13px; height: auto; margin-bottom: 0px; margin-left: 0px; margin-right=
: 0px; margin-top: 0px; min-width: 0px; overflow: visible; overflow-x: visi=
ble; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-r=
ight: 0px; padding-top: 0px;"></div><div style=3D"background-color: transpa=
rent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; bord=
er-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(34, 34, 34); border-left-style: none; border-left-=
width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none; =
border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-styl=
e: none; border-top-width: 0px; color: rgb(34, 34, 34); font-family: &q=
uot;Arial&quot;,&quot;Helvetica&quot;,sans-serif; font-size: 13=
px; font-style: normal; font-variant: normal; font-weight: 400; letter-spac=
ing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margi=
n-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-rig=
ht: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-in=
dent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-spac=
e: normal; word-spacing: 0px;"><b style=3D"background-attachment: scroll; b=
ackground-clip: border-box; background-color: transparent; background-image=
: none; background-origin: padding-box; background-position-x: 0%; backgrou=
nd-position-y: 0%; background-repeat: repeat; background-size: auto; border=
-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-wi=
dth: 0px; border-image-outset: 0; border-image-repeat: stretch; border-imag=
e-slice: 100%; border-image-source: none; border-image-width: 1; border-lef=
t-color: rgb(34, 34, 34); border-left-style: none; border-left-width: 0px; =
border-right-color: rgb(34, 34, 34); border-right-style: none; border-right=
-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; bor=
der-top-width: 0px; color: rgb(34, 34, 34); font-family: &quot;Arial&am=
p;quot;,&quot;Helvetica&quot;,sans-serif; font-size: 13px; height: =
auto; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: =
0px; min-width: 0px; overflow: visible; overflow-x: visible; overflow-y: vi=
sible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-=
top: 0px;"></b><i style=3D"background-attachment: scroll; background-clip: =
border-box; background-color: transparent; background-image: none; backgrou=
nd-origin: padding-box; background-position-x: 0%; background-position-y: 0=
%; background-repeat: repeat; background-size: auto; border-bottom-color: r=
gb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; border=
-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; b=
order-image-source: none; border-image-width: 1; border-left-color: rgb(34,=
34, 34); border-left-style: none; border-left-width: 0px; border-right-col=
or: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px; bor=
der-top-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0=
px; color: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&quo=
t;Helvetica&quot;,sans-serif; font-size: 13px; height: auto; margin-bot=
tom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-width: =
0px; overflow: visible; overflow-x: visible; overflow-y: visible; padding-b=
ottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"></i><=
u style=3D"background-attachment: scroll; background-clip: border-box; back=
ground-color: transparent; background-image: none; background-origin: paddi=
ng-box; background-position-x: 0%; background-position-y: 0%; background-re=
peat: repeat; background-size: auto; border-bottom-color: rgb(34, 34, 34); =
border-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0=
; border-image-repeat: stretch; border-image-slice: 100%; border-image-sour=
ce: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); border=
-left-style: none; border-left-width: 0px; border-right-color: rgb(34, 34, =
34); border-right-style: none; border-right-width: 0px; border-top-color: r=
gb(34, 34, 34); border-top-style: none; border-top-width: 0px; color: rgb(3=
4, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvetica&=
quot;,sans-serif; font-size: 13px; height: auto; margin-bottom: 0px; margin=
-left: 0px; margin-right: 0px; margin-top: 0px; min-width: 0px; overflow: v=
isible; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padd=
ing-left: 0px; padding-right: 0px; padding-top: 0px;"></u><sub style=3D"bor=
der-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom=
-width: 0px; border-image-outset: 0; border-image-repeat: stretch; border-i=
mage-slice: 100%; border-image-source: none; border-image-width: 1; border-=
left-color: rgb(34, 34, 34); border-left-style: none; border-left-width: 0p=
x; border-right-color: rgb(34, 34, 34); border-right-style: none; border-ri=
ght-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; =
border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: =
0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right=
: 0px; padding-top: 0px;"></sub><sup style=3D"border-bottom-color: rgb(34, =
34, 34); border-bottom-style: none; border-bottom-width: 0px; border-image-=
outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-i=
mage-source: none; border-image-width: 1; border-left-color: rgb(34, 34, 34=
); border-left-style: none; border-left-width: 0px; border-right-color: rgb=
(34, 34, 34); border-right-style: none; border-right-width: 0px; border-top=
-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; mar=
gin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padd=
ing-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">=
</sup><strike style=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-=
style: none; border-bottom-width: 0px; border-image-outset: 0; border-image=
-repeat: stretch; border-image-slice: 100%; border-image-source: none; bord=
er-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: n=
one; border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-ri=
ght-style: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34)=
; border-top-style: none; border-top-width: 0px; margin-bottom: 0px; margin=
-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; paddin=
g-left: 0px; padding-right: 0px; padding-top: 0px;"></strike><br style=3D"b=
ackground-attachment: scroll; background-clip: border-box; background-color=
: transparent; background-image: none; background-origin: padding-box; back=
ground-position-x: 0%; background-position-y: 0%; background-repeat: repeat=
; background-size: auto; border-bottom-color: rgb(34, 34, 34); border-botto=
m-style: none; border-bottom-width: 0px; border-image-outset: 0; border-ima=
ge-repeat: stretch; border-image-slice: 100%; border-image-source: none; bo=
rder-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-style:=
none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-=
right-style: none; border-right-width: 0px; border-top-color: rgb(34, 34, 3=
4); border-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); =
font-family: &quot;Arial&quot;,&quot;Helvetica&quot;,sans-s=
erif; font-size: 13px; height: auto; margin-bottom: 0px; margin-left: 0px; =
margin-right: 0px; margin-top: 0px; min-width: 0px; overflow: visible; over=
flow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0p=
x; padding-right: 0px; padding-top: 0px;"></div><div style=3D"background-co=
lor: transparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style=
: none; border-bottom-width: 0px; border-image-outset: 0; border-image-repe=
at: stretch; border-image-slice: 100%; border-image-source: none; border-im=
age-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; =
border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-s=
tyle: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); bor=
der-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-fa=
mily: &quot;Arial&quot;,&quot;Helvetica&quot;,sans-serif; f=
ont-size: 13px; font-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: 0px; padding-top: 0px; text-align: left; text-decoration: n=
one; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px=
; white-space: normal; word-spacing: 0px;"><font face=3D"courier new,monosp=
ace" style=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-style: no=
ne; 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(34, 34, 34); border-left-style: none; bord=
er-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style=
: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-=
top-style: none; border-top-width: 0px; margin-bottom: 0px; margin-left: 0p=
x; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0=
px; padding-right: 0px; padding-top: 0px;">Foo<int> fint;</font></div=
><div style=3D"background-color: transparent; border-bottom-color: rgb(34, =
34, 34); border-bottom-style: none; border-bottom-width: 0px; border-image-=
outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-i=
mage-source: none; border-image-width: 1; border-left-color: rgb(34, 34, 34=
); border-left-style: none; border-left-width: 0px; border-right-color: rgb=
(34, 34, 34); border-right-style: none; border-right-width: 0px; border-top=
-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; col=
or: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&quot;Helve=
tica&quot;,sans-serif; font-size: 13px; font-style: normal; font-varian=
t: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; ma=
rgin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bot=
tom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-ali=
gn: left; text-decoration: none; text-indent: 0px; text-transform: none; -w=
ebkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><br =
style=3D"background-attachment: scroll; background-clip: border-box; backgr=
ound-color: transparent; background-image: none; background-origin: padding=
-box; background-position-x: 0%; background-position-y: 0%; background-repe=
at: repeat; background-size: auto; border-bottom-color: rgb(34, 34, 34); bo=
rder-bottom-style: none; 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(34, 34, 34); border-l=
eft-style: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34=
); border-right-style: none; border-right-width: 0px; border-top-color: rgb=
(34, 34, 34); border-top-style: none; border-top-width: 0px; color: rgb(34,=
34, 34); font-family: &quot;Arial&quot;,&quot;Helvetica&qu=
ot;,sans-serif; font-size: 13px; height: auto; margin-bottom: 0px; margin-l=
eft: 0px; margin-right: 0px; margin-top: 0px; min-width: 0px; overflow: vis=
ible; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; paddin=
g-left: 0px; padding-right: 0px; padding-top: 0px;"></div><div style=3D"bac=
kground-color: transparent; border-bottom-color: rgb(34, 34, 34); border-bo=
ttom-style: none; 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(34, 34, 34); border-left-sty=
le: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); bord=
er-right-style: none; border-right-width: 0px; border-top-color: rgb(34, 34=
, 34); border-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34=
); font-family: &quot;Arial&quot;,&quot;Helvetica&quot;,san=
s-serif; font-size: 13px; font-style: normal; font-variant: normal; font-we=
ight: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px; ma=
rgin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-=
left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-dec=
oration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-=
width: 0px; white-space: normal; word-spacing: 0px;"><font face=3D"courier =
new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34); border-bottom=
-style: none; border-bottom-width: 0px; border-image-outset: 0; border-imag=
e-repeat: stretch; border-image-slice: 100%; border-image-source: none; bor=
der-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: =
none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-r=
ight-style: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34=
); border-top-style: none; border-top-width: 0px; margin-bottom: 0px; margi=
n-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; paddi=
ng-left: 0px; padding-right: 0px; padding-top: 0px;">fint.swap(...); //<=
std::swap</font></div><div><b></b><i></i><u></u><sub></sub><sup></sup><str=
ike></strike><br></div><div><br></div></font></span></div><div style=3D"mar=
gin: 0px; padding: 0px; border: 0px rgb(34, 34, 34); border-image: none; te=
xt-align: left; color: rgb(34, 34, 34); text-transform: none; text-indent: =
0px; letter-spacing: normal; font-size: 13px; font-variant: normal; word-sp=
acing: 0px; white-space: normal; orphans: 2; -webkit-text-stroke-width: 0px=
; background-color: transparent;"><span style=3D"margin: 0px; padding: 0px;=
border: 0px rgb(34, 34, 34); border-image: none; text-align: left; color: =
rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: no=
rmal; font-size: 13px; font-variant: normal; word-spacing: 0px; display: in=
line; white-space: normal; orphans: 2; float: none; -webkit-text-stroke-wid=
th: 0px; background-color: transparent;"><font face=3D"courier new,monospac=
e" style=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-style: none=
; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: st=
retch; border-image-slice: 100%; border-image-source: none; border-image-wi=
dth: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; border=
-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: =
none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-to=
p-style: none; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px;=
margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px=
; padding-right: 0px; padding-top: 0px;"><div style=3D"background-color: tr=
ansparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none;=
border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: str=
etch; border-image-slice: 100%; border-image-source: none; border-image-wid=
th: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; border-=
left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: n=
one; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top=
-style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-family: &=
amp;quot;Arial&quot;,&quot;Helvetica&quot;,sans-serif; font-siz=
e: 13px; font-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; paddin=
g-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; te=
xt-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white=
-space: normal; word-spacing: 0px;"><span style=3D"background-color: transp=
arent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; bor=
der-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(34, 34, 34); border-left-style: none; border-left=
-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none;=
border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-sty=
le: none; border-top-width: 0px; color: rgb(34, 34, 34); display: inline; f=
loat: none; 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-top: 0px; orphans: 2; padding-bottom: 0px; paddi=
ng-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-=
decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stro=
ke-width: 0px; white-space: normal; word-spacing: 0px;"><font face=3D"couri=
er new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34); border-bot=
tom-style: none; border-bottom-width: 0px; border-image-outset: 0; border-i=
mage-repeat: stretch; border-image-slice: 100%; border-image-source: none; =
border-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-styl=
e: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); borde=
r-right-style: none; border-right-width: 0px; border-top-color: rgb(34, 34,=
34); border-top-style: none; border-top-width: 0px; margin-bottom: 0px; ma=
rgin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; pa=
dding-left: 0px; padding-right: 0px; padding-top: 0px;">template<></f=
ont></span></div><div style=3D"background-color: transparent; border-bottom=
-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0p=
x; border-image-outset: 0; border-image-repeat: stretch; border-image-slice=
: 100%; border-image-source: none; border-image-width: 1; border-left-color=
: rgb(34, 34, 34); border-left-style: none; border-left-width: 0px; border-=
right-color: rgb(34, 34, 34); border-right-style: none; border-right-width:=
0px; border-top-color: rgb(34, 34, 34); border-top-style: none; border-top=
-width: 0px; color: rgb(34, 34, 34); font-family: &quot;Arial&quot;=
,&quot;Helvetica&quot;,sans-serif; font-size: 13px; font-style: nor=
mal; 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: 0px; padding-to=
p: 0px; 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;"><span style=3D"background-color: transparent; border-bottom-col=
or: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; b=
order-image-outset: 0; border-image-repeat: stretch; border-image-slice: 10=
0%; border-image-source: none; border-image-width: 1; border-left-color: rg=
b(34, 34, 34); border-left-style: none; border-left-width: 0px; border-righ=
t-color: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px=
; border-top-color: rgb(34, 34, 34); border-top-style: none; border-top-wid=
th: 0px; color: rgb(34, 34, 34); display: inline; float: none; font-size: 1=
3px; font-style: normal; font-variant: normal; font-weight: 400; letter-spa=
cing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; marg=
in-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-ri=
ght: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-i=
ndent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-spa=
ce: normal; word-spacing: 0px;"><font face=3D"courier new,monospace" style=
=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border=
-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; b=
order-image-slice: 100%; border-image-source: none; border-image-width: 1; =
border-left-color: rgb(34, 34, 34); border-left-style: none; border-left-wi=
dth: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none; bo=
rder-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style:=
none; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-=
right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; paddin=
g-right: 0px; padding-top: 0px;">class Foo<std::string></font></span>=
</div><div style=3D"background-color: transparent; border-bottom-color: rgb=
(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; border-i=
mage-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; bor=
der-image-source: none; border-image-width: 1; border-left-color: rgb(34, 3=
4, 34); border-left-style: none; border-left-width: 0px; border-right-color=
: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px; borde=
r-top-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px=
; color: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&quot;=
Helvetica&quot;,sans-serif; font-size: 13px; font-style: normal; font-v=
ariant: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0p=
x; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; paddin=
g-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; tex=
t-align: left; text-decoration: none; text-indent: 0px; text-transform: non=
e; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"=
><span style=3D"background-color: transparent; border-bottom-color: rgb(34,=
34, 34); border-bottom-style: none; 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(34, 34, 3=
4); border-left-style: none; border-left-width: 0px; border-right-color: rg=
b(34, 34, 34); border-right-style: none; border-right-width: 0px; border-to=
p-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; co=
lor: rgb(34, 34, 34); display: inline; float: none; font-size: 13px; font-s=
tyle: normal; font-variant: normal; font-weight: 400; letter-spacing: norma=
l; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px=
; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; p=
adding-top: 0px; text-align: left; text-decoration: none; text-indent: 0px;=
text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal;=
word-spacing: 0px;"><font face=3D"courier new,monospace" style=3D"border-b=
ottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-widt=
h: 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(34, 34, 34); border-left-style: none; border-left-width: 0px; bo=
rder-right-color: rgb(34, 34, 34); border-right-style: none; border-right-w=
idth: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; borde=
r-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; =
margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px=
; padding-top: 0px;">{</font></span></div><div style=3D"background-color: t=
ransparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none=
; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: st=
retch; border-image-slice: 100%; border-image-source: none; border-image-wi=
dth: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; border=
-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: =
none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-to=
p-style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-family: =
&quot;Arial&quot;,&quot;Helvetica&quot;,sans-serif; font-si=
ze: 13px; font-style: normal; font-variant: normal; font-weight: 400; lette=
r-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px;=
margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; paddi=
ng-right: 0px; padding-top: 0px; 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;">=C2=A0 <span style=3D"background-color=
: transparent; border-bottom-color: rgb(34, 34, 34); 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(34, 34, 34); border-left-style: none; bor=
der-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-styl=
e: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border=
-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); display: i=
nline; float: none; font-size: 13px; font-style: normal; font-variant: norm=
al; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin-le=
ft: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0p=
x; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: lef=
t; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-t=
ext-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><font face=
=3D"courier new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34); b=
order-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0;=
border-image-repeat: stretch; border-image-slice: 100%; border-image-sourc=
e: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-=
left-style: none; border-left-width: 0px; border-right-color: rgb(34, 34, 3=
4); border-right-style: none; border-right-width: 0px; border-top-color: rg=
b(34, 34, 34); border-top-style: none; border-top-width: 0px; margin-bottom=
: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom=
: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">void swap(=
Foo&) {}</font></span></div></font></span><div style=3D"background-colo=
r: transparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: =
none; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat=
: stretch; border-image-slice: 100%; border-image-source: none; border-imag=
e-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; bo=
rder-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-sty=
le: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); borde=
r-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-fami=
ly: &quot;Arial&quot;,&quot;Helvetica&quot;,sans-serif; fon=
t-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; l=
etter-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: =
0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; p=
adding-right: 0px; padding-top: 0px; text-align: left; text-decoration: non=
e; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; =
white-space: normal; word-spacing: 0px;"><span style=3D"margin: 0px; paddin=
g: 0px; border: 0px rgb(34, 34, 34); border-image: none; text-align: left; =
color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spac=
ing: normal; font-size: 13px; font-variant: normal; word-spacing: 0px; disp=
lay: inline; white-space: normal; orphans: 2; float: none; -webkit-text-str=
oke-width: 0px; background-color: transparent;"><font face=3D"courier new,m=
onospace" style=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-styl=
e: none; border-bottom-width: 0px; border-image-outset: 0; border-image-rep=
eat: stretch; border-image-slice: 100%; border-image-source: none; border-i=
mage-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: none;=
border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-=
style: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); bo=
rder-top-style: none; border-top-width: 0px; margin-bottom: 0px; margin-lef=
t: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-le=
ft: 0px; padding-right: 0px; padding-top: 0px;"><span style=3D"background-c=
olor: transparent; border-bottom-color: rgb(34, 34, 34); border-bottom-styl=
e: none; border-bottom-width: 0px; border-image-outset: 0; border-image-rep=
eat: stretch; border-image-slice: 100%; border-image-source: none; border-i=
mage-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: none;=
border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-=
style: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); bo=
rder-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); displa=
y: inline; float: none; font-size: 13px; font-style: normal; font-variant: =
normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; margi=
n-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom=
: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align:=
left; text-decoration: none; text-indent: 0px; text-transform: none; -webk=
it-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><font f=
ace=3D"courier new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34)=
; border-bottom-style: none; border-bottom-width: 0px; border-image-outset:=
0; border-image-repeat: stretch; border-image-slice: 100%; border-image-so=
urce: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); bord=
er-left-style: none; border-left-width: 0px; border-right-color: rgb(34, 34=
, 34); border-right-style: none; border-right-width: 0px; border-top-color:=
rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; margin-bot=
tom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bot=
tom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">};</fon=
t></span></font></span><br></div></div></div><div><font face=3D"courier new=
,monospace"></font><br></div><div><font face=3D"courier new,monospace"><spa=
n style=3D"text-align: left; color: rgb(34, 34, 34); text-transform: none; =
text-indent: 0px; letter-spacing: normal; font-size: 13px; font-style: norm=
al; font-variant: normal; font-weight: 400; text-decoration: none; word-spa=
cing: 0px; display: inline !important; white-space: normal; orphans: 2; flo=
at: none; -webkit-text-stroke-width: 0px; background-color: transparent;">F=
oo<std::string> fing;</span>=C2=A0</font></div><div><font face=3D"cou=
rier new,monospace"><br></font></div><div><font face=3D"courier new,monospa=
ce">fing.swap(...); //< member</font></div><div><font face=3D"courier ne=
w,monospace"></font><br></div><div><b></b><i></i><u></u><sub></sub><sup></s=
up><strike></strike><br></div><div>// --- --- --- --- --- ---=C2=A0</div><d=
iv><br></div><div><font face=3D"courier new,monospace">template<class T,=
class F></font></div><div><font face=3D"courier new,monospace">std::vec=
tor sorted(std::vector<T> v, F&& f)</font></div><div><font fa=
ce=3D"courier new,monospace">{</font></div><div><font face=3D"courier new,m=
onospace">=C2=A0 std::sort(v.begin(), v.end(), std::forward<F>(f));</=
font></div><div><font face=3D"courier new,monospace"></font><br></div><div>=
<font face=3D"courier new,monospace">=C2=A0 return v;</font></div><div><fon=
t face=3D"courier new,monospace">}</font></div><div><font face=3D"courier n=
ew,monospace"></font><br></div><div><div style=3D"background-color: transpa=
rent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; bord=
er-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(34, 34, 34); border-left-style: none; border-left-=
width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none; =
border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-styl=
e: none; border-top-width: 0px; color: rgb(34, 34, 34); font-family: &q=
uot;Arial&quot;,&quot;Helvetica&quot;,sans-serif; font-size: 13=
px; font-style: normal; font-variant: normal; font-weight: 400; letter-spac=
ing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margi=
n-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-rig=
ht: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-in=
dent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-spac=
e: normal; word-spacing: 0px;"><font face=3D"courier new,monospace" style=
=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border=
-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; b=
order-image-slice: 100%; border-image-source: none; border-image-width: 1; =
border-left-color: rgb(34, 34, 34); border-left-style: none; border-left-wi=
dth: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none; bo=
rder-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style:=
none; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-=
right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; paddin=
g-right: 0px; padding-top: 0px;">template<class T, class F></font><fo=
nt face=3D"courier new,monospace"><br></font></div><font face=3D"courier ne=
w,monospace">Magic serialize(const std::vector<T>& v) { return sp=
arkles; }</font></div><div><font face=3D"courier new,monospace"></font><fon=
t face=3D"courier new,monospace"></font><b></b><i></i><u></u><sub></sub><su=
p></sup><strike></strike><font face=3D"courier new,monospace"></font><br></=
div><div><div style=3D"margin: 0px; padding: 0px; border: 0px rgb(34, 34, 3=
4); border-image: none; text-align: left; color: rgb(34, 34, 34); text-tran=
sform: none; text-indent: 0px; letter-spacing: normal; font-size: 13px; fon=
t-style: normal; font-variant: normal; font-weight: 400; text-decoration: n=
one; word-spacing: 0px; white-space: normal; orphans: 2; -webkit-text-strok=
e-width: 0px; background-color: transparent;"><span style=3D"background-col=
or: transparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style:=
none; border-bottom-width: 0px; border-image-outset: 0; border-image-repea=
t: stretch; border-image-slice: 100%; border-image-source: none; border-ima=
ge-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; b=
order-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-st=
yle: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); bord=
er-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); display:=
inline; float: none; font-size: 13px; font-style: normal; font-variant: no=
rmal; 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: 0px; padding-top: 0px; text-align: l=
eft; text-decoration: none; text-indent: 0px; text-transform: none; -webkit=
-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><font fac=
e=3D"courier new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34); =
border-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0=
; border-image-repeat: stretch; border-image-slice: 100%; border-image-sour=
ce: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); border=
-left-style: none; border-left-width: 0px; border-right-color: rgb(34, 34, =
34); border-right-style: none; border-right-width: 0px; border-top-color: r=
gb(34, 34, 34); border-top-style: none; border-top-width: 0px; margin-botto=
m: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-botto=
m: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">template&=
lt;class T></font></span></div><div style=3D"margin: 0px; padding: 0px; =
border: 0px rgb(34, 34, 34); border-image: none; text-align: left; color: r=
gb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: nor=
mal; font-size: 13px; font-style: normal; font-variant: normal; font-weight=
: 400; text-decoration: none; word-spacing: 0px; white-space: normal; orpha=
ns: 2; -webkit-text-stroke-width: 0px; background-color: transparent;"><spa=
n style=3D"background-color: transparent; border-bottom-color: rgb(34, 34, =
34); border-bottom-style: none; border-bottom-width: 0px; border-image-outs=
et: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image=
-source: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); b=
order-left-style: none; border-left-width: 0px; border-right-color: rgb(34,=
34, 34); border-right-style: none; border-right-width: 0px; border-top-col=
or: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; color: =
rgb(34, 34, 34); display: inline; float: none; font-size: 13px; font-style:=
normal; font-variant: normal; font-weight: 400; letter-spacing: normal; ma=
rgin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orp=
hans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; paddin=
g-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; text=
-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word=
-spacing: 0px;"><font face=3D"courier new,monospace" style=3D"border-bottom=
-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0p=
x; border-image-outset: 0; border-image-repeat: stretch; border-image-slice=
: 100%; border-image-source: none; border-image-width: 1; border-left-color=
: rgb(34, 34, 34); border-left-style: none; border-left-width: 0px; border-=
right-color: rgb(34, 34, 34); border-right-style: none; border-right-width:=
0px; border-top-color: rgb(34, 34, 34); border-top-style: none; border-top=
-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margi=
n-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; pad=
ding-top: 0px;">class std::vector using=C2=A0</font></span></div><div style=
=3D"margin: 0px; padding: 0px; border: 0px rgb(34, 34, 34); border-image: n=
one; text-align: left; color: rgb(34, 34, 34); text-transform: none; text-i=
ndent: 0px; letter-spacing: normal; font-size: 13px; font-style: normal; fo=
nt-variant: normal; font-weight: 400; text-decoration: none; word-spacing: =
0px; white-space: normal; orphans: 2; -webkit-text-stroke-width: 0px; backg=
round-color: transparent;"><span style=3D"background-color: transparent; bo=
rder-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-botto=
m-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(34, 34, 34); border-left-style: none; border-left-width: 0=
px; border-right-color: rgb(34, 34, 34); border-right-style: none; border-r=
ight-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none;=
border-top-width: 0px; color: rgb(34, 34, 34); display: inline; float: non=
e; font-size: 13px; font-style: normal; font-variant: normal; font-weight: =
400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-r=
ight: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: =
0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decoratio=
n: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width:=
0px; white-space: normal; word-spacing: 0px;"><font face=3D"courier new,mo=
nospace" style=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-style=
: none; border-bottom-width: 0px; border-image-outset: 0; border-image-repe=
at: stretch; border-image-slice: 100%; border-image-source: none; border-im=
age-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; =
border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-s=
tyle: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); bor=
der-top-style: none; border-top-width: 0px; margin-bottom: 0px; margin-left=
: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-lef=
t: 0px; padding-right: 0px; padding-top: 0px;">{</font></span></div><div st=
yle=3D"margin: 0px; padding: 0px; border: 0px rgb(34, 34, 34); border-image=
: none; text-align: left; color: rgb(34, 34, 34); text-transform: none; tex=
t-indent: 0px; letter-spacing: normal; font-size: 13px; font-style: normal;=
font-variant: normal; font-weight: 400; text-decoration: none; word-spacin=
g: 0px; white-space: normal; orphans: 2; -webkit-text-stroke-width: 0px; ba=
ckground-color: transparent;"><span style=3D"background-color: transparent;=
border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bo=
ttom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; bord=
er-image-slice: 100%; border-image-source: none; border-image-width: 1; bor=
der-left-color: rgb(34, 34, 34); border-left-style: none; border-left-width=
: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none; borde=
r-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: no=
ne; border-top-width: 0px; color: rgb(34, 34, 34); display: inline; float: =
none; font-size: 13px; font-style: normal; font-variant: normal; font-weigh=
t: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px; margi=
n-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-lef=
t: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decora=
tion: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-wid=
th: 0px; white-space: normal; word-spacing: 0px;"><font face=3D"courier new=
,monospace" style=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-st=
yle: none; border-bottom-width: 0px; border-image-outset: 0; border-image-r=
epeat: stretch; border-image-slice: 100%; border-image-source: none; border=
-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: non=
e; border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-righ=
t-style: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); =
border-top-style: none; border-top-width: 0px; margin-bottom: 0px; margin-l=
eft: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-=
left: 0px; padding-right: 0px; padding-top: 0px;">=C2=A0 sorted; <i>//< =
if ever vector has a better implementation, use it</i></font></span></div><=
div style=3D"margin: 0px; padding: 0px; border: 0px rgb(34, 34, 34); border=
-image: none; text-align: left; color: rgb(34, 34, 34); text-transform: non=
e; text-indent: 0px; letter-spacing: normal; font-size: 13px; font-variant:=
normal; font-weight: 400; text-decoration: none; word-spacing: 0px; white-=
space: normal; orphans: 2; -webkit-text-stroke-width: 0px; background-color=
: transparent;"><span style=3D"margin: 0px; padding: 0px; border: 0px rgb(3=
4, 34, 34); border-image: none; text-align: left; color: rgb(34, 34, 34); t=
ext-transform: none; text-indent: 0px; letter-spacing: normal; font-size: 1=
3px; font-variant: normal; font-weight: 400; text-decoration: none; word-sp=
acing: 0px; display: inline; white-space: normal; orphans: 2; float: none; =
-webkit-text-stroke-width: 0px; background-color: transparent;"><font face=
=3D"courier new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34); b=
order-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0;=
border-image-repeat: stretch; border-image-slice: 100%; border-image-sourc=
e: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-=
left-style: none; border-left-width: 0px; border-right-color: rgb(34, 34, 3=
4); border-right-style: none; border-right-width: 0px; border-top-color: rg=
b(34, 34, 34); border-top-style: none; border-top-width: 0px; margin-bottom=
: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom=
: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"><i>=C2=A0 =
</i>using serialize<i>; //< *** never, ever let some other implementatio=
n kick in, even if someone forgets to qualify!=C2=A0</i></font></span></div=
><div style=3D"margin: 0px; padding: 0px; border: 0px rgb(34, 34, 34); bord=
er-image: none; text-align: left; color: rgb(34, 34, 34); text-transform: n=
one; text-indent: 0px; letter-spacing: normal; font-size: 13px; font-style:=
normal; font-variant: normal; font-weight: 400; text-decoration: none; wor=
d-spacing: 0px; white-space: normal; orphans: 2; -webkit-text-stroke-width:=
0px; background-color: transparent;"><span style=3D"background-color: tran=
sparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; b=
order-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stret=
ch; border-image-slice: 100%; border-image-source: none; border-image-width=
: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; border-le=
ft-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: non=
e; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-s=
tyle: none; border-top-width: 0px; color: rgb(34, 34, 34); display: inline;=
float: none; font-size: 13px; font-style: normal; font-variant: normal; fo=
nt-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0p=
x; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; pad=
ding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; tex=
t-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-st=
roke-width: 0px; white-space: normal; word-spacing: 0px;"><font face=3D"cou=
rier new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34); border-b=
ottom-style: none; 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(34, 34, 34); border-left-st=
yle: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); bor=
der-right-style: none; border-right-width: 0px; border-top-color: rgb(34, 3=
4, 34); border-top-style: none; border-top-width: 0px; margin-bottom: 0px; =
margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; =
padding-left: 0px; padding-right: 0px; padding-top: 0px;">}</font></span></=
div><div style=3D"margin: 0px; padding: 0px; border: 0px rgb(34, 34, 34); b=
order-image: none; text-align: left; color: rgb(34, 34, 34); text-transform=
: none; text-indent: 0px; letter-spacing: normal; font-size: 13px; font-sty=
le: normal; font-variant: normal; font-weight: 400; text-decoration: none; =
word-spacing: 0px; white-space: normal; orphans: 2; -webkit-text-stroke-wid=
th: 0px; background-color: transparent;"><span style=3D"background-color: t=
ransparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none=
; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: st=
retch; border-image-slice: 100%; border-image-source: none; border-image-wi=
dth: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; border=
-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: =
none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-to=
p-style: none; border-top-width: 0px; color: rgb(34, 34, 34); display: inli=
ne; float: none; 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-top: 0px; orphans: 2; padding-bottom: 0px; =
padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; =
text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text=
-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><font style=3D=
"border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bo=
ttom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; bord=
er-image-slice: 100%; border-image-source: none; border-image-width: 1; bor=
der-left-color: rgb(34, 34, 34); border-left-style: none; border-left-width=
: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none; borde=
r-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: no=
ne; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-rig=
ht: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-r=
ight: 0px; padding-top: 0px;"><font face=3D"courier new,monospace"></font><=
br></font></span></div><div style=3D"margin: 0px; padding: 0px; border: 0px=
rgb(34, 34, 34); border-image: none; text-align: left; color: rgb(34, 34, =
34); text-transform: none; text-indent: 0px; letter-spacing: normal; font-s=
ize: 13px; font-style: normal; font-variant: normal; font-weight: 400; text=
-decoration: none; word-spacing: 0px; white-space: normal; orphans: 2; -web=
kit-text-stroke-width: 0px; background-color: transparent;"><span style=3D"=
background-color: transparent; border-bottom-color: rgb(34, 34, 34); border=
-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; bord=
er-image-repeat: stretch; border-image-slice: 100%; border-image-source: no=
ne; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-=
style: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); b=
order-right-style: none; border-right-width: 0px; border-top-color: rgb(34,=
34, 34); border-top-style: none; border-top-width: 0px; color: rgb(34, 34,=
34); display: inline; float: none; font-size: 13px; font-style: normal; fo=
nt-variant: normal; font-weight: 400; letter-spacing: normal; margin-bottom=
: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; pa=
dding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;=
text-align: left; text-decoration: none; text-indent: 0px; text-transform:=
none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0=
px;"><font face=3D"courier new,monospace" style=3D"border-bottom-color: rgb=
(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; border-i=
mage-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; bor=
der-image-source: none; border-image-width: 1; border-left-color: rgb(34, 3=
4, 34); border-left-style: none; border-left-width: 0px; border-right-color=
: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px; borde=
r-top-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px=
; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;=
padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0=
px;">// user</font></span></div><div style=3D"margin: 0px; padding: 0px; bo=
rder: 0px rgb(34, 34, 34); border-image: none; text-align: left; color: rgb=
(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: norma=
l; font-size: 13px; font-style: normal; font-variant: normal; font-weight: =
400; text-decoration: none; word-spacing: 0px; white-space: normal; orphans=
: 2; -webkit-text-stroke-width: 0px; background-color: transparent;"><span =
style=3D"background-color: transparent; border-bottom-color: rgb(34, 34, 34=
); border-bottom-style: none; border-bottom-width: 0px; border-image-outset=
: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-s=
ource: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); bor=
der-left-style: none; border-left-width: 0px; border-right-color: rgb(34, 3=
4, 34); border-right-style: none; border-right-width: 0px; border-top-color=
: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; color: rg=
b(34, 34, 34); display: inline; float: none; font-size: 13px; font-style: n=
ormal; font-variant: normal; font-weight: 400; letter-spacing: normal; marg=
in-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orpha=
ns: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-=
top: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-t=
ransform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-s=
pacing: 0px;"><font style=3D"border-bottom-color: rgb(34, 34, 34); border-b=
ottom-style: none; 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(34, 34, 34); border-left-st=
yle: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); bor=
der-right-style: none; border-right-width: 0px; border-top-color: rgb(34, 3=
4, 34); border-top-style: none; border-top-width: 0px; margin-bottom: 0px; =
margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; =
padding-left: 0px; padding-right: 0px; padding-top: 0px;"><br></font></span=
></div><div style=3D"margin: 0px; padding: 0px; border: 0px rgb(34, 34, 34)=
; border-image: none; text-align: left; color: rgb(34, 34, 34); text-transf=
orm: none; text-indent: 0px; letter-spacing: normal; font-size: 13px; font-=
style: normal; font-variant: normal; font-weight: 400; text-decoration: non=
e; word-spacing: 0px; white-space: normal; orphans: 2; -webkit-text-stroke-=
width: 0px; background-color: transparent;"><span style=3D"background-color=
: transparent; border-bottom-color: rgb(34, 34, 34); 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(34, 34, 34); border-left-style: none; bor=
der-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-styl=
e: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border=
-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); display: i=
nline; float: none; font-size: 13px; font-style: normal; font-variant: norm=
al; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin-le=
ft: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0p=
x; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: lef=
t; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-t=
ext-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><font face=
=3D"courier new,monospace" style=3D"border-bottom-color: rgb(34, 34, 34); b=
order-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0;=
border-image-repeat: stretch; border-image-slice: 100%; border-image-sourc=
e: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-=
left-style: none; border-left-width: 0px; border-right-color: rgb(34, 34, 3=
4); border-right-style: none; border-right-width: 0px; border-top-color: rg=
b(34, 34, 34); border-top-style: none; border-top-width: 0px; margin-bottom=
: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom=
: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">const std:=
:vector<int> vec{. . .};</font></span></div><div style=3D"margin: 0px=
; padding: 0px; border: 0px rgb(34, 34, 34); border-image: none; text-align=
: left; color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; let=
ter-spacing: normal; font-size: 13px; font-style: normal; font-variant: nor=
mal; font-weight: 400; text-decoration: none; word-spacing: 0px; white-spac=
e: normal; orphans: 2; -webkit-text-stroke-width: 0px; background-color: tr=
ansparent;"><span style=3D"background-color: transparent; border-bottom-col=
or: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; b=
order-image-outset: 0; border-image-repeat: stretch; border-image-slice: 10=
0%; border-image-source: none; border-image-width: 1; border-left-color: rg=
b(34, 34, 34); border-left-style: none; border-left-width: 0px; border-righ=
t-color: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px=
; border-top-color: rgb(34, 34, 34); border-top-style: none; border-top-wid=
th: 0px; color: rgb(34, 34, 34); display: inline; float: none; font-size: 1=
3px; font-style: normal; font-variant: normal; font-weight: 400; letter-spa=
cing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; marg=
in-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-ri=
ght: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-i=
ndent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-spa=
ce: normal; word-spacing: 0px;"><font face=3D"courier new,monospace" style=
=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border=
-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; b=
order-image-slice: 100%; border-image-source: none; border-image-width: 1; =
border-left-color: rgb(34, 34, 34); border-left-style: none; border-left-wi=
dth: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none; bo=
rder-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style:=
none; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-=
right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; paddin=
g-right: 0px; padding-top: 0px;"><br></font></span></div><div style=3D"marg=
in: 0px; padding: 0px; border: 0px rgb(34, 34, 34); border-image: none; tex=
t-align: left; color: rgb(34, 34, 34); text-transform: none; text-indent: 0=
px; letter-spacing: normal; font-size: 13px; font-style: normal; font-varia=
nt: normal; font-weight: 400; text-decoration: none; word-spacing: 0px; whi=
te-space: normal; orphans: 2; -webkit-text-stroke-width: 0px; background-co=
lor: transparent;"><span style=3D"background-color: transparent; border-bot=
tom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width:=
0px; border-image-outset: 0; border-image-repeat: stretch; border-image-sl=
ice: 100%; border-image-source: none; border-image-width: 1; border-left-co=
lor: rgb(34, 34, 34); border-left-style: none; border-left-width: 0px; bord=
er-right-color: rgb(34, 34, 34); border-right-style: none; border-right-wid=
th: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; border-=
top-width: 0px; color: rgb(34, 34, 34); display: inline; float: none; font-=
size: 13px; font-style: normal; font-variant: normal; font-weight: 400; let=
ter-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0p=
x; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; pad=
ding-right: 0px; padding-top: 0px; text-align: left; text-decoration: none;=
text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; wh=
ite-space: normal; word-spacing: 0px;"><font face=3D"courier new,monospace"=
style=3D"border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; =
border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stre=
tch; border-image-slice: 100%; border-image-source: none; border-image-widt=
h: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; border-l=
eft-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: no=
ne; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-=
style: none; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; m=
argin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; =
padding-right: 0px; padding-top: 0px;">lovesSorted(vec.sorted());</font></s=
pan></div><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><font=
face=3D"courier new,monospace"></font><font face=3D"courier new,monospace"=
></font><br></div><div><span style=3D"display: inline !important; float: no=
ne; background-color: transparent; color: rgb(34, 34, 34); font-family: cou=
rier new,monospace; font-size: 13px; font-style: normal; font-variant: norm=
al; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left;=
text-decoration: none; text-indent: 0px; text-transform: none; -webkit-tex=
t-stroke-width: 0px; white-space: normal; word-spacing: 0px;">auto package =
=3D vec.sorted([]{ return ...; }).<span style=3D"display: inline !important=
; float: none; background-color: transparent; color: rgb(34, 34, 34); font-=
family: courier new,monospace; font-size: 13px; font-style: normal; font-va=
riant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-a=
lign: left; text-decoration: none; text-indent: 0px; text-transform: none; =
-webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">se=
rialize</span><i style=3D"background-color: transparent; border-bottom-colo=
r: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; bo=
rder-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100=
%; border-image-source: none; border-image-width: 1; border-left-color: rgb=
(34, 34, 34); border-left-style: none; border-left-width: 0px; border-right=
-color: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px;=
border-top-color: rgb(34, 34, 34); border-top-style: none; border-top-widt=
h: 0px; color: rgb(34, 34, 34); font-family: courier new,monospace; font-si=
ze: 13px; font-style: italic; font-variant: normal; font-weight: 400; lette=
r-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px;=
margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; paddi=
ng-right: 0px; padding-top: 0px; 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;"></i>();=C2=A0</span></div><div><br></d=
iv><div><br></div><div>And so on, you get the general idea - Extension Meth=
ods have using semantics, they allow (for the current scope/TU) the dot not=
ation, they also allow the user to pick how are future changes to the exten=
ded class coalesced.</div><div><br></div><div><br></div><div><br></div><div=
><br></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/b7850973-43d8-4521-9f62-b9696ee7e76c%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/b7850973-43d8-4521-9f62-b9696ee7e76c=
%40isocpp.org</a>.<br />
------=_Part_1129_1912525662.1533489012093--
------=_Part_1128_841495297.1533489012091--
.
Author: mihailnajdenov@gmail.com
Date: Mon, 6 Aug 2018 08:01:23 -0700 (PDT)
Raw View
------=_Part_189_131851894.1533567683861
Content-Type: multipart/alternative;
boundary="----=_Part_190_197136998.1533567683861"
------=_Part_190_197136998.1533567683861
Content-Type: text/plain; charset="UTF-8"
Forgot to mention the elephant in the room - this does not solve the
fundamental issue, how do we define concept requirements for a class, is it
in terms of member functions or in terms of free-standing ones.
However, this can be a stepping stone towards UCS - after a period of time
we could make one of the two options the default.
It will be a non-breaking change, after which the syntax will be used to
let the user override the default behavior.
Of course going full UCS introduces the mirror set of
vulnerability-to-change problems. If we can call members using free
standing, then these are either in competition or there is a preferred
call.
If there is a completion there is potential code break or code change if
suddenly the member is the better match, if there is a preferred call,
there is a potential silent code change.
Silent code change is not so silent as it is not by the class author but by
the client code, introducing a free function can *hide* a class member
function, called as free function.
Seems to me this is unavoidable, as other options, are either breaking
(overloading) or still code changing (pick member always) and almost
certainly more surprising, yet hides like this are something new.
Comments are welcome, I might write a proposal to give this feature another
go.
I personally can't decide for myself if I want full UFC or just a way to
call functions using member access syntax.
--
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/dd460620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org.
------=_Part_190_197136998.1533567683861
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Forgot to mention the elephant in the room - this doe=
s not solve the fundamental issue, how do we define concept requirements fo=
r a class, is it in terms of member functions or in terms of free-standing =
ones.</div><div><br></div><div>However, this can be a stepping stone toward=
s UCS - after a period of time we could make one of the two options the def=
ault.=C2=A0</div><div><span style=3D"display: inline !important; float: non=
e; background-color: transparent; color: rgb(34, 34, 34); font-family: &quo=
t;Arial","Helvetica",sans-serif; font-size: 13px; font-style=
: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; o=
rphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-=
transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-=
spacing: 0px;">It will be a non-breaking change, a</span>fter which the syn=
tax will be used to let the user override the default behavior. =C2=A0</div=
><div><br></div><div>Of course going full UCS introduces the mirror set of =
vulnerability-to-change problems. If we can call members using free standin=
g, then these are either in competition or there is a preferred call.=C2=A0=
</div><div>If there is a completion there is potential code break or code c=
hange if suddenly the member is the better match, if there is a preferred c=
all, there is a potential silent code change.</div><div><br></div><div>Sile=
nt code change is not so silent as it is not by the class author but by the=
client code, introducing a free function can <i>hide</i> a class member fu=
nction, called as free function.</div><div>Seems to me this is unavoidable,=
as other options, are either breaking (overloading) or still code changing=
(pick member always) and almost certainly more surprising, yet hides like =
this are something new.</div><div><br></div><div><br></div><div>Comments ar=
e welcome, I might write a proposal to give this feature another go.</div><=
div>I personally can't decide for myself if I want full UFC or just a w=
ay to call functions using member access syntax.</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/dd460620-2bc7-47fd-8e39-68a85003d9be%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be=
%40isocpp.org</a>.<br />
------=_Part_190_197136998.1533567683861--
------=_Part_189_131851894.1533567683861--
.
Author: Olanrewaju Adetula <jsphadetula@gmail.com>
Date: Mon, 6 Aug 2018 16:14:28 +0100
Raw View
--000000000000d171850572c5bb3d
Content-Type: text/plain; charset="UTF-8"
>
> Of course going full UCS introduces the mirror set of
> vulnerability-to-change problems. If we can call members using free
> standing, then these are either in competition or there is a preferred
> call.
> If there is a completion there is potential code break or code change if
> suddenly the member is the better match, if there is a preferred call,
> there is a potential silent code change.
Or the type author can define one and the language synthesizes the other
via opt-in. With that, it won't matter anymore which syntax is used to
invoke the function and any attempt to define any other will error as a
result of redeclaration.
On Mon, Aug 6, 2018 at 4:01 PM, <mihailnajdenov@gmail.com> wrote:
> Forgot to mention the elephant in the room - this does not solve the
> fundamental issue, how do we define concept requirements for a class, is it
> in terms of member functions or in terms of free-standing ones.
>
> However, this can be a stepping stone towards UCS - after a period of time
> we could make one of the two options the default.
> It will be a non-breaking change, after which the syntax will be used to
> let the user override the default behavior.
>
> Of course going full UCS introduces the mirror set of
> vulnerability-to-change problems. If we can call members using free
> standing, then these are either in competition or there is a preferred
> call.
> If there is a completion there is potential code break or code change if
> suddenly the member is the better match, if there is a preferred call,
> there is a potential silent code change.
>
> Silent code change is not so silent as it is not by the class author but
> by the client code, introducing a free function can *hide* a class member
> function, called as free function.
> Seems to me this is unavoidable, as other options, are either breaking
> (overloading) or still code changing (pick member always) and almost
> certainly more surprising, yet hides like this are something new.
>
>
> Comments are welcome, I might write a proposal to give this feature
> another go.
> I personally can't decide for myself if I want full UFC or just a way to
> call functions using member access syntax.
>
> --
> 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/dd460620-2bc7-47fd-
> 8e39-68a85003d9be%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>
--
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/CAARi%2BPN0rH0CbZcjcV9wmykvqbStqoyJNOHWn0SRFdYHKkrbow%40mail.gmail.com.
--000000000000d171850572c5bb3d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">
<blockquote style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204=
,204,204);padding-left:1ex" class=3D"gmail_quote">Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0<br>If there is a completion there is potentia=
l code break or code change if suddenly the member is the better match, if =
there is a preferred call, there is a potential silent code change.</blockq=
uote>
Or the type author can define one and the language synthesizes the other vi=
a opt-in. With that, it won't matter anymore which syntax is used to in=
voke the function and any attempt to define any other will error as a resul=
t of redeclaration.<div><br></div></div><div class=3D"gmail_extra"><br><div=
class=3D"gmail_quote">On Mon, Aug 6, 2018 at 4:01 PM, <span dir=3D"ltr">&=
lt;<a href=3D"mailto:mihailnajdenov@gmail.com" target=3D"_blank">mihailnajd=
enov@gmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div=
dir=3D"ltr"><div>Forgot to mention the elephant in the room - this does no=
t solve the fundamental issue, how do we define concept requirements for a =
class, is it in terms of member functions or in terms of free-standing ones=
..</div><div><br></div><div>However, this can be a stepping stone towards UC=
S - after a period of time we could make one of the two options the default=
..=C2=A0</div><div><span style=3D"display:inline!important;float:none;backgr=
ound-color:transparent;color:rgb(34,34,34);font-family:"Arial",&q=
uot;Helvetica",sans-serif;font-size:13px;font-style:normal;font-varian=
t:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decorat=
ion:none;text-indent:0px;text-transform:none;white-space:normal;word-spacin=
g:0px">It will be a non-breaking change, a</span>fter which the syntax will=
be used to let the user override the default behavior. =C2=A0</div><div><b=
r></div><div>Of course going full UCS introduces the mirror set of vulnerab=
ility-to-change problems. If we can call members using free standing, then =
these are either in competition or there is a preferred call.=C2=A0</div><d=
iv>If there is a completion there is potential code break or code change if=
suddenly the member is the better match, if there is a preferred call, the=
re is a potential silent code change.</div><div><br></div><div>Silent code =
change is not so silent as it is not by the class author but by the client =
code, introducing a free function can <i>hide</i> a class member function, =
called as free function.</div><div>Seems to me this is unavoidable, as othe=
r options, are either breaking (overloading) or still code changing (pick m=
ember always) and almost certainly more surprising, yet hides like this are=
something new.</div><div><br></div><div><br></div><div>Comments are welcom=
e, I might write a proposal to give this feature another go.</div><div>I pe=
rsonally can't decide for myself if I want full UFC or just a way to ca=
ll functions using member access syntax.</div></div><span class=3D"HOEnZb">=
<font color=3D"#888888">
<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" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/dd460620-2bc7-47fd-8e39-68a85003d9be%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/dd46=
0620-2bc7-47fd-<wbr>8e39-68a85003d9be%40isocpp.org</a><wbr>.<br>
</font></span></blockquote></div><br></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/CAARi%2BPN0rH0CbZcjcV9wmykvqbStqoyJNO=
HWn0SRFdYHKkrbow%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAARi%2BPN0rH0C=
bZcjcV9wmykvqbStqoyJNOHWn0SRFdYHKkrbow%40mail.gmail.com</a>.<br />
--000000000000d171850572c5bb3d--
.
Author: mihailnajdenov@gmail.com
Date: Mon, 6 Aug 2018 08:26:55 -0700 (PDT)
Raw View
------=_Part_1357_1827580971.1533569216041
Content-Type: multipart/alternative;
boundary="----=_Part_1358_243180023.1533569216042"
------=_Part_1358_243180023.1533569216042
Content-Type: text/plain; charset="UTF-8"
On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula wrote:
>
> Of course going full UCS introduces the mirror set of
>> vulnerability-to-change problems. If we can call members using free
>> standing, then these are either in competition or there is a preferred
>> call.
>> If there is a completion there is potential code break or code change if
>> suddenly the member is the better match, if there is a preferred call,
>> there is a potential silent code change.
>
> Or the type author can define one and the language synthesizes the other
> via opt-in. With that, it won't matter anymore which syntax is used to
> invoke the function and any attempt to define any other will error as a
> result of redeclaration.
>
>
Can you elaborate?
>
> On Mon, Aug 6, 2018 at 4:01 PM, <mihailn...@gmail.com <javascript:>>
> wrote:
>
>> Forgot to mention the elephant in the room - this does not solve the
>> fundamental issue, how do we define concept requirements for a class, is it
>> in terms of member functions or in terms of free-standing ones.
>>
>> However, this can be a stepping stone towards UCS - after a period of
>> time we could make one of the two options the default.
>> It will be a non-breaking change, after which the syntax will be used to
>> let the user override the default behavior.
>>
>> Of course going full UCS introduces the mirror set of
>> vulnerability-to-change problems. If we can call members using free
>> standing, then these are either in competition or there is a preferred
>> call.
>> If there is a completion there is potential code break or code change if
>> suddenly the member is the better match, if there is a preferred call,
>> there is a potential silent code change.
>>
>> Silent code change is not so silent as it is not by the class author but
>> by the client code, introducing a free function can *hide* a class
>> member function, called as free function.
>> Seems to me this is unavoidable, as other options, are either breaking
>> (overloading) or still code changing (pick member always) and almost
>> certainly more surprising, yet hides like this are something new.
>>
>>
>> Comments are welcome, I might write a proposal to give this feature
>> another go.
>> I personally can't decide for myself if I want full UFC or just a way to
>> call functions using member access syntax.
>>
>> --
>> 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-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=email&utm_source=footer>
>> .
>>
>
>
--
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/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org.
------=_Part_1358_243180023.1533569216042
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Ola=
nrewaju Adetula wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;=
margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr">
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0<br>If there is a completion there is potentia=
l code break or code change if suddenly the member is the better match, if =
there is a preferred call, there is a potential silent code change.</blockq=
uote>
Or the type author can define one and the language synthesizes the other vi=
a opt-in. With that, it won't matter anymore which syntax is used to in=
voke the function and any attempt to define any other will error as a resul=
t of redeclaration.<div><br></div></div></blockquote><div><br></div><div>Ca=
n you elaborate?=C2=A0</div><div>=C2=A0</div><blockquote class=3D"gmail_quo=
te" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;paddi=
ng-left: 1ex;"><div dir=3D"ltr"><div></div></div><div><br><div class=3D"gma=
il_quote">On Mon, Aug 6, 2018 at 4:01 PM, <span dir=3D"ltr"><<a onmouse=
down=3D"this.href=3D'javascript:';return true;" onclick=3D"this.hre=
f=3D'javascript:';return true;" href=3D"javascript:" target=3D"_bla=
nk" rel=3D"nofollow" gdf-obfuscated-mailto=3D"i-1H1wRbDgAJ">mihailn...@gmai=
l.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"l=
tr"><div>Forgot to mention the elephant in the room - this does not solve t=
he fundamental issue, how do we define concept requirements for a class, is=
it in terms of member functions or in terms of free-standing ones.</div><d=
iv><br></div><div>However, this can be a stepping stone towards UCS - after=
a period of time we could make one of the two options the default.=C2=A0</=
div><div><span style=3D"display:inline!important;float:none;background-colo=
r:transparent;color:rgb(34,34,34);font-family:"Arial","Helve=
tica",sans-serif;font-size:13px;font-style:normal;font-variant:normal;=
font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;=
text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">It=
will be a non-breaking change, a</span>fter which the syntax will be used =
to let the user override the default behavior. =C2=A0</div><div><br></div><=
div>Of course going full UCS introduces the mirror set of vulnerability-to-=
change problems. If we can call members using free standing, then these are=
either in competition or there is a preferred call.=C2=A0</div><div>If the=
re is a completion there is potential code break or code change if suddenly=
the member is the better match, if there is a preferred call, there is a p=
otential silent code change.</div><div><br></div><div>Silent code change is=
not so silent as it is not by the class author but by the client code, int=
roducing a free function can <i>hide</i> a class member function, called as=
free function.</div><div>Seems to me this is unavoidable, as other options=
, are either breaking (overloading) or still code changing (pick member alw=
ays) and almost certainly more surprising, yet hides like this are somethin=
g new.</div><div><br></div><div><br></div><div>Comments are welcome, I migh=
t write a proposal to give this feature another go.</div><div>I personally =
can't decide for myself if I want full UFC or just a way to call functi=
ons using member access syntax.</div></div><span><font color=3D"#888888">
<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 onmousedown=3D"this.href=3D'javascript:';return true;" o=
nclick=3D"this.href=3D'javascript:';return true;" href=3D"javascrip=
t:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"i-1H1wRbDgA=
J">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a onmousedown=3D"this.href=3D'jav=
ascript:';return true;" onclick=3D"this.href=3D'javascript:';re=
turn true;" href=3D"javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obf=
uscated-mailto=3D"i-1H1wRbDgAJ">std-pr...@isocpp.org</a>.<br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7=
-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd46=
0620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/dd460620-2bc7-47fd-<wbr>8e39-=
68a85003d9be%40isocpp.org</a><wbr>.<br>
</font></span></blockquote></div><br></div>
</blockquote></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/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17=
%40isocpp.org</a>.<br />
------=_Part_1358_243180023.1533569216042--
------=_Part_1357_1827580971.1533569216041--
.
Author: Olanrewaju Adetula <jsphadetula@gmail.com>
Date: Mon, 6 Aug 2018 16:31:48 +0100
Raw View
--000000000000da54710572c5f9a8
Content-Type: text/plain; charset="UTF-8"
If by defining member function for example, an associated free function can
be synthesized by the compiler or vice-versa, then we can call such
function using either syntax.
On Mon, Aug 6, 2018 at 4:26 PM, <mihailnajdenov@gmail.com> wrote:
>
>
> On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula wrote:
>>
>> Of course going full UCS introduces the mirror set of
>>> vulnerability-to-change problems. If we can call members using free
>>> standing, then these are either in competition or there is a preferred
>>> call.
>>> If there is a completion there is potential code break or code change if
>>> suddenly the member is the better match, if there is a preferred call,
>>> there is a potential silent code change.
>>
>> Or the type author can define one and the language synthesizes the other
>> via opt-in. With that, it won't matter anymore which syntax is used to
>> invoke the function and any attempt to define any other will error as a
>> result of redeclaration.
>>
>>
> Can you elaborate?
>
>
>>
>> On Mon, Aug 6, 2018 at 4:01 PM, <mihailn...@gmail.com> wrote:
>>
>>> Forgot to mention the elephant in the room - this does not solve the
>>> fundamental issue, how do we define concept requirements for a class, is it
>>> in terms of member functions or in terms of free-standing ones.
>>>
>>> However, this can be a stepping stone towards UCS - after a period of
>>> time we could make one of the two options the default.
>>> It will be a non-breaking change, after which the syntax will be used
>>> to let the user override the default behavior.
>>>
>>> Of course going full UCS introduces the mirror set of
>>> vulnerability-to-change problems. If we can call members using free
>>> standing, then these are either in competition or there is a preferred
>>> call.
>>> If there is a completion there is potential code break or code change if
>>> suddenly the member is the better match, if there is a preferred call,
>>> there is a potential silent code change.
>>>
>>> Silent code change is not so silent as it is not by the class author but
>>> by the client code, introducing a free function can *hide* a class
>>> member function, called as free function.
>>> Seems to me this is unavoidable, as other options, are either breaking
>>> (overloading) or still code changing (pick member always) and almost
>>> certainly more surprising, yet hides like this are something new.
>>>
>>>
>>> Comments are welcome, I might write a proposal to give this feature
>>> another go.
>>> I personally can't decide for myself if I want full UFC or just a way to
>>> call functions using member access syntax.
>>>
>>> --
>>> 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-proposal...@isocpp.org.
>>> To post to this group, send email to std-pr...@isocpp.org.
>>> To view this discussion on the web visit https://groups.google.com/a/is
>>> ocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-
>>> 68a85003d9be%40isocpp.org
>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>> --
> 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/734bc99d-2aa3-4af6-
> b0b6-fb3ec3452d17%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>
--
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/CAARi%2BPPxDke7Eq1Zf7GHU%3D1F_gZ6PFyU--8krHN2ac_oGsmcNA%40mail.gmail.com.
--000000000000da54710572c5f9a8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">If by defining member function for example, an associated =
free function can be synthesized by the compiler or vice-versa, then we can=
call such function using either syntax.</div><div class=3D"gmail_extra"><b=
r><div class=3D"gmail_quote">On Mon, Aug 6, 2018 at 4:26 PM, <span dir=3D"=
ltr"><<a href=3D"mailto:mihailnajdenov@gmail.com" target=3D"_blank">miha=
ilnajdenov@gmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex=
"><div dir=3D"ltr"><span class=3D""><br><br>On Monday, August 6, 2018 at 6:=
14:30 PM UTC+3, Olanrewaju Adetula wrote:<blockquote class=3D"gmail_quote" =
style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left=
:1ex"><div dir=3D"ltr">
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0<br>If there is a completion there is potentia=
l code break or code change if suddenly the member is the better match, if =
there is a preferred call, there is a potential silent code change.</blockq=
uote>
Or the type author can define one and the language synthesizes the other vi=
a opt-in. With that, it won't matter anymore which syntax is used to in=
voke the function and any attempt to define any other will error as a resul=
t of redeclaration.<div><br></div></div></blockquote><div><br></div></span>=
<div>Can you elaborate?=C2=A0</div><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr"><div></div></div><div><br><div class=3D"g=
mail_quote"><span class=3D"">On Mon, Aug 6, 2018 at 4:01 PM, <span dir=3D"=
ltr"><<a rel=3D"nofollow">mihailn...@gmail.com</a>></span> wrote:<br>=
</span><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-=
left:1px #ccc solid;padding-left:1ex"><span class=3D""><div dir=3D"ltr"><di=
v>Forgot to mention the elephant in the room - this does not solve the fund=
amental issue, how do we define concept requirements for a class, is it in =
terms of member functions or in terms of free-standing ones.</div><div><br>=
</div><div>However, this can be a stepping stone towards UCS - after a peri=
od of time we could make one of the two options the default.=C2=A0</div><di=
v><span style=3D"display:inline!important;float:none;background-color:trans=
parent;color:rgb(34,34,34);font-family:"Arial","Helvetica&qu=
ot;,sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-we=
ight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-in=
dent:0px;text-transform:none;white-space:normal;word-spacing:0px">It will b=
e a non-breaking change, a</span>fter which the syntax will be used to let =
the user override the default behavior. =C2=A0</div><div><br></div><div>Of =
course going full UCS introduces the mirror set of vulnerability-to-change =
problems. If we can call members using free standing, then these are either=
in competition or there is a preferred call.=C2=A0</div><div>If there is a=
completion there is potential code break or code change if suddenly the me=
mber is the better match, if there is a preferred call, there is a potentia=
l silent code change.</div><div><br></div><div>Silent code change is not so=
silent as it is not by the class author but by the client code, introducin=
g a free function can <i>hide</i> a class member function, called as free f=
unction.</div><div>Seems to me this is unavoidable, as other options, are e=
ither breaking (overloading) or still code changing (pick member always) an=
d almost certainly more surprising, yet hides like this are something new.<=
/div><div><br></div><div><br></div><div>Comments are welcome, I might write=
a proposal to give this feature another go.</div><div>I personally can'=
;t decide for myself if I want full UFC or just a way to call functions usi=
ng member access syntax.</div></div></span><span><font color=3D"#888888"><s=
pan class=3D"">
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span class=3D""><br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/is<wbr>ocpp.org/d/msgid/std-pr=
oposals<wbr>/dd460620-2bc7-47fd-8e39-<wbr>68a85003d9be%40isocpp.org</a>.<br=
>
</span></font></span></blockquote></div><br></div>
</blockquote></div><span class=3D"">
<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" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/734b=
c99d-2aa3-4af6-<wbr>b0b6-fb3ec3452d17%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></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/CAARi%2BPPxDke7Eq1Zf7GHU%3D1F_gZ6PFyU=
--8krHN2ac_oGsmcNA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAARi%2BPPxDk=
e7Eq1Zf7GHU%3D1F_gZ6PFyU--8krHN2ac_oGsmcNA%40mail.gmail.com</a>.<br />
--000000000000da54710572c5f9a8--
.
Author: mihailnajdenov@gmail.com
Date: Thu, 9 Aug 2018 01:05:03 -0700 (PDT)
Raw View
------=_Part_228_352970088.1533801903351
Content-Type: multipart/alternative;
boundary="----=_Part_229_2021135911.1533801903352"
------=_Part_229_2021135911.1533801903352
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Wednesday, August 8, 2018 at 4:41:58 PM UTC+3, Olanrewaju Adetula wrote:
>
> If by defining member function for example, an associated free function=
=20
> can be synthesized by the compiler or vice-versa, then we can call such=
=20
> function using either syntax.
>
>
I see, note however that if this is enabled it will be a breaking change.
=20
> On Mon, Aug 6, 2018 at 4:26 PM, <mihailn...@gmail.com <javascript:>>=20
> wrote:
>
>>
>>
>> On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula wrote:
>>>
>>> Of course going full UCS introduces the mirror set of=20
>>>> vulnerability-to-change problems. If we can call members using free=20
>>>> standing, then these are either in competition or there is a preferred=
=20
>>>> call.=20
>>>> If there is a completion there is potential code break or code change=
=20
>>>> if suddenly the member is the better match, if there is a preferred ca=
ll,=20
>>>> there is a potential silent code change.
>>>
>>> Or the type author can define one and the language synthesizes the othe=
r=20
>>> via opt-in. With that, it won't matter anymore which syntax is used to=
=20
>>> invoke the function and any attempt to define any other will error as a=
=20
>>> result of redeclaration.
>>>
>>>
>> Can you elaborate?=20
>> =20
>>
>>>
>>> On Mon, Aug 6, 2018 at 4:01 PM, <mihailn...@gmail.com> wrote:
>>>
>>>> Forgot to mention the elephant in the room - this does not solve the=
=20
>>>> fundamental issue, how do we define concept requirements for a class, =
is it=20
>>>> in terms of member functions or in terms of free-standing ones.
>>>>
>>>> However, this can be a stepping stone towards UCS - after a period of=
=20
>>>> time we could make one of the two options the default.=20
>>>> It will be a non-breaking change, after which the syntax will be used=
=20
>>>> to let the user override the default behavior. =20
>>>>
>>>> Of course going full UCS introduces the mirror set of=20
>>>> vulnerability-to-change problems. If we can call members using free=20
>>>> standing, then these are either in competition or there is a preferred=
=20
>>>> call.=20
>>>> If there is a completion there is potential code break or code change=
=20
>>>> if suddenly the member is the better match, if there is a preferred ca=
ll,=20
>>>> there is a potential silent code change.
>>>>
>>>> Silent code change is not so silent as it is not by the class author=
=20
>>>> but by the client code, introducing a free function can *hide* a class=
=20
>>>> member function, called as free function.
>>>> Seems to me this is unavoidable, as other options, are either breaking=
=20
>>>> (overloading) or still code changing (pick member always) and almost=
=20
>>>> certainly more surprising, yet hides like this are something new.
>>>>
>>>>
>>>> Comments are welcome, I might write a proposal to give this feature=20
>>>> another go.
>>>> I personally can't decide for myself if I want full UFC or just a way=
=20
>>>> to call functions using member access syntax.
>>>>
>>>> --=20
>>>> You received this message because you are subscribed to the Google=20
>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send=
=20
>>>> an email to std-proposal...@isocpp.org.
>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>> To view this discussion on the web visit=20
>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460620-=
2bc7-47fd-8e39-68a85003d9be%40isocpp.org=20
>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460620=
-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_source=3Df=
ooter>
>>>> .
>>>>
>>>
>>> --=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit=20
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99d-2a=
a3-4af6-b0b6-fb3ec3452d17%40isocpp.org=20
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99d-2=
aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoo=
ter>
>> .
>>
>
>
In any case, I investigated the UFCS situation further and, to my surprise,=
=20
it turned out, in its last stages only f(x,y) calling x.f(y) was considered=
..
I wonder, were all the people asking for UFCS at CppConn last year even=20
aware of that! One can read more here=20
<https://isocpp.org/blog/2016/02/a-bit-of-background-for-the-unified-call-p=
roposal>=20
and here <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/n4586.pdf=
>=20
(n4586, search down for "unified").
Aside from the fact literally no one has ever requested f(x,y) calling=20
x.f(y), for obvious reasons, and the only people to whom it is useful are=
=20
library writers, I am not surprised at all that even that was not accepted.
Hell, even Bjarne says=20
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0131r0.pdf> *"Peo=
ple=20
who fear side effects from generalization might then prefer x.f(y) [to=20
generalize] because it is more restrictive".*
Indeed, the possibility tor trivially hide a class member function, is not=
=20
pretty indeed.=20
With all that said, I still believe there is hope. In n4586, it is noted*=
=20
"Spicer liked the goal of the proposal, but wanted opt-in which would then=
=20
consider members and non-members equally in an overload set."*
and *"Yasskin said he=E2=80=99d feel more comfortable being able to see the=
feature=20
in use for a long period of time, and would feel more comfortable seeing it=
=20
in a TS. "*
These are doable. We introduce UFCS as a scoped, user-side opt-in which=20
will bring both free and member functions into one overloading set.
struct C
{
void func(double) {}
};
// user
void f(C& c)
{
using C::func; //< bring func into the overloading set=20
func(c, -1);
}
Now, if someone adds=20
void func(C&, size_t);
By the current rules=20
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0301r0.html> this=
=20
will *hide* the member function, but now the condition is an error as the=
=20
call to func is ambiguous.
(Needless to say, the above could be used in the future not to *enable* UFC=
S,=20
but to *override* the rules.)
In n4586 it says *"...Some people wanted additional opt-in mechanisms to=20
enable the new behavior, which was discussed in great detail, but rejected"=
*
What were those opt-ins? Was something like this considered, or the opt-ins=
=20
were on the declaration side (be it on the member/class or function) or on=
=20
the call site?
--=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/7464c9ca-3079-4619-9db0-c993dba7a8b6%40isocpp.or=
g.
------=_Part_229_2021135911.1533801903352
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Wednesday, August 8, 2018 at 4:41:58 PM UTC+3, =
Olanrewaju Adetula wrote:<blockquote class=3D"gmail_quote" style=3D"margin:=
0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div =
dir=3D"ltr">If by defining member function for example, an associated free =
function can be synthesized by the compiler or vice-versa, then we can call=
such function using either syntax.</div><div><br></div></blockquote><div><=
br></div><div>I see, note however that if this is enabled it will be a brea=
king change.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=
=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: =
1ex;"><div><div class=3D"gmail_quote">On Mon, Aug 6, 2018 at 4:26 PM, <spa=
n dir=3D"ltr"><<a onmousedown=3D"this.href=3D'javascript:';retur=
n true;" onclick=3D"this.href=3D'javascript:';return true;" href=3D=
"javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"e=
fAfhqqjDAAJ">mihailn...@gmail.com</a>></span> wrote:<br><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pad=
ding-left:1ex"><div dir=3D"ltr"><span><br><br>On Monday, August 6, 2018 at =
6:14:30 PM UTC+3, Olanrewaju Adetula wrote:<blockquote class=3D"gmail_quote=
" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-le=
ft:1ex"><div dir=3D"ltr">
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0<br>If there is a completion there is potentia=
l code break or code change if suddenly the member is the better match, if =
there is a preferred call, there is a potential silent code change.</blockq=
uote>
Or the type author can define one and the language synthesizes the other vi=
a opt-in. With that, it won't matter anymore which syntax is used to in=
voke the function and any attempt to define any other will error as a resul=
t of redeclaration.<div><br></div></div></blockquote><div><br></div></span>=
<div>Can you elaborate?=C2=A0</div><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr"><div></div></div><div><br><div class=3D"g=
mail_quote"><span>On Mon, Aug 6, 2018 at 4:01 PM, <span dir=3D"ltr"><<a=
rel=3D"nofollow">mihailn...@gmail.com</a>></span> wrote:<br></span><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><span><div dir=3D"ltr"><div>Forgot to mention th=
e elephant in the room - this does not solve the fundamental issue, how do =
we define concept requirements for a class, is it in terms of member functi=
ons or in terms of free-standing ones.</div><div><br></div><div>However, th=
is can be a stepping stone towards UCS - after a period of time we could ma=
ke one of the two options the default.=C2=A0</div><div><span style=3D"displ=
ay:inline!important;float:none;background-color:transparent;color:rgb(34,34=
,34);font-family:"Arial","Helvetica",sans-serif;font-si=
ze:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacin=
g:normal;text-align:left;text-decoration:none;text-indent:0px;text-transfor=
m:none;white-space:normal;word-spacing:0px">It will be a non-breaking chang=
e, a</span>fter which the syntax will be used to let the user override the =
default behavior. =C2=A0</div><div><br></div><div>Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0</div><div>If there is a completion there is p=
otential code break or code change if suddenly the member is the better mat=
ch, if there is a preferred call, there is a potential silent code change.<=
/div><div><br></div><div>Silent code change is not so silent as it is not b=
y the class author but by the client code, introducing a free function can =
<i>hide</i> a class member function, called as free function.</div><div>See=
ms to me this is unavoidable, as other options, are either breaking (overlo=
ading) or still code changing (pick member always) and almost certainly mor=
e surprising, yet hides like this are something new.</div><div><br></div><d=
iv><br></div><div>Comments are welcome, I might write a proposal to give th=
is feature another go.</div><div>I personally can't decide for myself i=
f I want full UFC or just a way to call functions using member access synta=
x.</div></div></span><span><font color=3D"#888888"><span>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span><br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7=
-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd46=
0620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/dd460620-2bc7-47fd-<wbr>8e39-=
68a85003d9be%40isocpp.org</a><wbr>.<br>
</span></font></span></blockquote></div><br></div>
</blockquote></div><span>
<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 onmousedown=3D"this.href=3D'javascript:';return true;" o=
nclick=3D"this.href=3D'javascript:';return true;" href=3D"javascrip=
t:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"efAfhqqjDAA=
J">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a onmousedown=3D"this.href=3D'jav=
ascript:';return true;" onclick=3D"this.href=3D'javascript:';re=
turn true;" href=3D"javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obf=
uscated-mailto=3D"efAfhqqjDAAJ">std-pr...@isocpp.org</a>.<br></span>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3=
-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734b=
c99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/734bc99d-2aa3-4af6-<wbr>b0b6-=
fb3ec3452d17%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></div></blockquote><div><br></div><div><br></div><di=
v>In any case, I investigated the UFCS situation further and, to my surpris=
e, it turned out, in its last stages only f(x,y) calling x.f(y) was conside=
red.</div><div>I wonder, were all the people asking for UFCS at CppConn las=
t year even aware of that! One can read more <a href=3D"https://isocpp.org/=
blog/2016/02/a-bit-of-background-for-the-unified-call-proposal">here</a> an=
d <a href=3D"http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/n4586.=
pdf">here</a> (n4586, search down for "unified").</div><div><br><=
/div><div>Aside from the fact literally no one has ever requested <span sty=
le=3D"display: inline !important; float: none; background-color: transparen=
t; color: rgb(34, 34, 34); font-family: "Arial","Helvetica&q=
uot;,sans-serif; font-size: 13px; font-style: normal; font-variant: normal;=
font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; te=
xt-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-s=
troke-width: 0px; white-space: normal; word-spacing: 0px;">f(x,y) calling x=
..f(y), for obvious reasons, and the only people to whom it is useful are li=
brary writers, I am not surprised at all that even that was not accepted.</=
span></div><div><span style=3D"display: inline !important; float: none; bac=
kground-color: transparent; color: rgb(34, 34, 34); font-family: "Aria=
l","Helvetica",sans-serif; font-size: 13px; font-style: norm=
al; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans=
: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transf=
orm: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacin=
g: 0px;">Hell, even Bjarne <a href=3D"http://www.open-std.org/jtc1/sc22/wg2=
1/docs/papers/2015/p0131r0.pdf">says</a> </span><span style=3D"text-align: =
left; color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; lette=
r-spacing: normal; font-family: "Arial","Helvetica",san=
s-serif; font-size: 13px; font-variant: normal; font-weight: 400; text-deco=
ration: none; word-spacing: 0px; display: inline !important; white-space: n=
ormal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; background-=
color: transparent;"><i>"People who fear side effects from generalizat=
ion might then prefer x.f(y)<span style=3D"text-align: left; color: rgb(34,=
34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; f=
ont-family: "Arial","Helvetica",sans-serif; font-size: =
13px; font-variant: normal; font-weight: 400; text-decoration: none; word-s=
pacing: 0px; display: inline !important; white-space: normal; orphans: 2; f=
loat: none; -webkit-text-stroke-width: 0px; background-color: transparent;"=
> [to generalize]</span> because it is more restrictive".</i><br></spa=
n></div><div><br></div><div>Indeed, the possibility tor trivially hide a cl=
ass member function, is not pretty indeed.=C2=A0</div><div><br></div><div><=
br></div><div>With all that said, I still believe there is hope. In n4586, =
it is noted<i> "Spicer liked the goal of the proposal, but wanted opt-=
in which would then consider members and non-members equally in an overload=
set."</i></div><div>and <i>"Yasskin said he=E2=80=99d feel more =
comfortable being able to see the feature in use for a long period of time,=
and would feel more comfortable seeing it in a TS. "</i></div><div><i=
><br></i></div><div>These are doable. We introduce UFCS as a scoped, user-s=
ide opt-in which will bring both free and member functions into one overloa=
ding set.</div><div><br></div><div><font face=3D"courier new,monospace">str=
uct C</font></div><div><font face=3D"courier new,monospace">{</font></div><=
div><font face=3D"courier new,monospace">=C2=A0 void func(double) {}</font>=
</div><div><font face=3D"courier new,monospace">};</font></div><div><font f=
ace=3D"courier new,monospace"></font><br></div><div><font face=3D"courier n=
ew,monospace">// user</font></div><div><font face=3D"courier new,monospace"=
></font><br></div><div><font face=3D"courier new,monospace">void f(C& c=
)</font></div><div><font face=3D"courier new,monospace">{</font></div><div>=
<font face=3D"courier new,monospace">=C2=A0 using C::func; //< bring fun=
c into the overloading set=C2=A0</font></div><div><font face=3D"courier new=
,monospace"></font><br></div><div><font face=3D"courier new,monospace">=C2=
=A0 func(c, -1);</font></div><div><font face=3D"courier new,monospace">}</f=
ont></div><div><font face=3D"courier new,monospace"><br></font></div><div><=
font face=3D"arial,sans-serif">Now, if someone adds=C2=A0</font></div><div>=
<font face=3D"courier new,monospace"><font face=3D"arial,sans-serif"></font=
><br></font></div><div><font face=3D"courier new,monospace"><span style=3D"=
display: inline !important; float: none; background-color: transparent; col=
or: rgb(34, 34, 34); font-family: courier new,monospace; font-size: 13px; f=
ont-style: normal; font-variant: normal; font-weight: 400; letter-spacing: =
normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0=
px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: norm=
al; word-spacing: 0px;">void func(C&, size_t);</span></font></div><div>=
<font face=3D"courier new,monospace"><b></b><i></i><u></u><sub></sub><sup><=
/sup><strike></strike><br></font></div><div><font face=3D"arial,sans-serif"=
>By <a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p030=
1r0.html">the current rules</a> this will <i>hide</i> the member function, =
but now the condition is an error as the call to func is ambiguous.</font><=
/div><div><font face=3D"arial,sans-serif"><br></font></div><div><font face=
=3D"arial,sans-serif"><div style=3D"background-color: transparent; border-b=
ottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-widt=
h: 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(34, 34, 34); border-left-style: none; border-left-width: 0px; bo=
rder-right-color: rgb(34, 34, 34); border-right-style: none; border-right-w=
idth: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; borde=
r-top-width: 0px; 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; letter-spacing: normal; m=
argin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; or=
phans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; paddi=
ng-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; tex=
t-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; wor=
d-spacing: 0px;">(Needless to say, the above could be used in the future no=
t to <i style=3D"background-attachment: scroll; background-clip: border-box=
; background-color: transparent; background-image: none; background-origin:=
padding-box; background-position-x: 0%; background-position-y: 0%; backgro=
und-repeat: repeat; background-size: auto; border-bottom-color: rgb(34, 34,=
34); border-bottom-style: none; border-bottom-width: 0px; border-image-out=
set: 0; border-image-repeat: stretch; border-image-slice: 100%; border-imag=
e-source: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); =
border-left-style: none; border-left-width: 0px; border-right-color: rgb(34=
, 34, 34); border-right-style: none; border-right-width: 0px; border-top-co=
lor: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; color:=
rgb(34, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvetic=
a&quot;,sans-serif; font-size: 13px; height: auto; margin-bottom: 0px; =
margin-left: 0px; margin-right: 0px; margin-top: 0px; min-width: 0px; overf=
low: visible; overflow-x: visible; overflow-y: visible; padding-bottom: 0px=
; padding-left: 0px; padding-right: 0px; padding-top: 0px;">enable</i>=C2=
=A0<span style=3D"background-color: transparent; border-bottom-color: rgb(3=
4, 34, 34); border-bottom-style: none; border-bottom-width: 0px; border-ima=
ge-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; borde=
r-image-source: none; border-image-width: 1; border-left-color: rgb(34, 34,=
34); border-left-style: none; border-left-width: 0px; border-right-color: =
rgb(34, 34, 34); border-right-style: none; border-right-width: 0px; border-=
top-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; =
color: rgb(34, 34, 34); display: inline; float: none; font-family: &quo=
t;Arial&quot;,&quot;Helvetica&quot;,sans-serif; font-size: 13px=
; font-style: normal; font-variant: normal; font-weight: 400; letter-spacin=
g: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-=
top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right=
: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-inde=
nt: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space:=
normal; word-spacing: 0px;">UFCS, but to <i style=3D"border-bottom-color: =
rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; borde=
r-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; =
border-image-source: none; border-image-width: 1; border-left-color: rgb(34=
, 34, 34); border-left-style: none; border-left-width: 0px; border-right-co=
lor: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px; bo=
rder-top-color: rgb(34, 34, 34); border-top-style: none; border-top-width: =
0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0=
px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top=
: 0px;">override</i> the rules.)</span><br></div></font></div><div><font fa=
ce=3D"arial,sans-serif"><b></b><i></i><u></u><sub></sub><sup></sup><strike>=
</strike><br></font></div><div>In n4586 it says <i>"...Some people wan=
ted additional opt-in mechanisms to enable the new behavior, which was disc=
ussed in great detail, but rejected"</i><i><br></i></div><div>What wer=
e those opt-ins? Was something like this considered, or the opt-ins were on=
the declaration side (be it on the member/class or function) or on the cal=
l site?</div><div><br></div><div><br></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/7464c9ca-3079-4619-9db0-c993dba7a8b6%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-3079-4619-9db0-c993dba7a8b6=
%40isocpp.org</a>.<br />
------=_Part_229_2021135911.1533801903352--
------=_Part_228_352970088.1533801903351--
.
Author: Richard Hodges <hodges.r@gmail.com>
Date: Thu, 9 Aug 2018 10:46:54 +0200
Raw View
--000000000000f820420572fcab36
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Thu, 9 Aug 2018 at 10:05, <mihailnajdenov@gmail.com> wrote:
>
>
> On Wednesday, August 8, 2018 at 4:41:58 PM UTC+3, Olanrewaju Adetula wrot=
e:
>>
>> If by defining member function for example, an associated free function
>> can be synthesized by the compiler or vice-versa, then we can call such
>> function using either syntax.
>>
>>
> I see, note however that if this is enabled it will be a breaking change.
>
>
>> On Mon, Aug 6, 2018 at 4:26 PM, <mihailn...@gmail.com> wrote:
>>
>>>
>>>
>>> On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula wrote=
:
>>>>
>>>> Of course going full UCS introduces the mirror set of
>>>>> vulnerability-to-change problems. If we can call members using free
>>>>> standing, then these are either in competition or there is a preferre=
d
>>>>> call.
>>>>> If there is a completion there is potential code break or code change
>>>>> if suddenly the member is the better match, if there is a preferred c=
all,
>>>>> there is a potential silent code change.
>>>>
>>>> Or the type author can define one and the language synthesizes the
>>>> other via opt-in. With that, it won't matter anymore which syntax is u=
sed
>>>> to invoke the function and any attempt to define any other will error =
as a
>>>> result of redeclaration.
>>>>
>>>>
>>> Can you elaborate?
>>>
>>>
>>>>
>>>> On Mon, Aug 6, 2018 at 4:01 PM, <mihailn...@gmail.com> wrote:
>>>>
>>>>> Forgot to mention the elephant in the room - this does not solve the
>>>>> fundamental issue, how do we define concept requirements for a class,=
is it
>>>>> in terms of member functions or in terms of free-standing ones.
>>>>>
>>>>> However, this can be a stepping stone towards UCS - after a period of
>>>>> time we could make one of the two options the default.
>>>>> It will be a non-breaking change, after which the syntax will be used
>>>>> to let the user override the default behavior.
>>>>>
>>>>> Of course going full UCS introduces the mirror set of
>>>>> vulnerability-to-change problems. If we can call members using free
>>>>> standing, then these are either in competition or there is a preferre=
d
>>>>> call.
>>>>> If there is a completion there is potential code break or code change
>>>>> if suddenly the member is the better match, if there is a preferred c=
all,
>>>>> there is a potential silent code change.
>>>>>
>>>>> Silent code change is not so silent as it is not by the class author
>>>>> but by the client code, introducing a free function can *hide* a
>>>>> class member function, called as free function.
>>>>> Seems to me this is unavoidable, as other options, are either breakin=
g
>>>>> (overloading) or still code changing (pick member always) and almost
>>>>> certainly more surprising, yet hides like this are something new.
>>>>>
>>>>>
>>>>> Comments are welcome, I might write a proposal to give this feature
>>>>> another go.
>>>>> I personally can't decide for myself if I want full UFC or just a way
>>>>> to call functions using member access syntax.
>>>>>
>>>>> --
>>>>> 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, sen=
d
>>>>> an email to std-proposal...@isocpp.org.
>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460620=
-2bc7-47fd-8e39-68a85003d9be%40isocpp.org
>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd46062=
0-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_source=3D=
footer>
>>>>> .
>>>>>
>>>>
>>>> --
>>> 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-proposal...@isocpp.org.
>>> To post to this group, send email to std-pr...@isocpp.org.
>>> To view this discussion on the web visit
>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99d-2=
aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org
>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99d-=
2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=3Demail&utm_source=3Dfo=
oter>
>>> .
>>>
>>
>>
>
> In any case, I investigated the UFCS situation further and, to my
> surprise, it turned out, in its last stages only f(x,y) calling x.f(y) wa=
s
> considered.
> I wonder, were all the people asking for UFCS at CppConn last year even
> aware of that! One can read more here
> <https://isocpp.org/blog/2016/02/a-bit-of-background-for-the-unified-call=
-proposal>
> and here
> <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/n4586.pdf>
> (n4586, search down for "unified").
>
> Aside from the fact literally no one has ever requested f(x,y) calling
> x.f(y), for obvious reasons, and the only people to whom it is useful are
> library writers, I am not surprised at all that even that was not accepte=
d.
> Hell, even Bjarne says
> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0131r0.pdf> *"P=
eople
> who fear side effects from generalization might then prefer x.f(y) [to
> generalize] because it is more restrictive".*
>
> Indeed, the possibility tor trivially hide a class member function, is no=
t
> pretty indeed.
>
>
> With all that said, I still believe there is hope. In n4586, it is noted*
> "Spicer liked the goal of the proposal, but wanted opt-in which would the=
n
> consider members and non-members equally in an overload set."*
> and *"Yasskin said he=E2=80=99d feel more comfortable being able to see t=
he
> feature in use for a long period of time, and would feel more comfortable
> seeing it in a TS. "*
>
> These are doable. We introduce UFCS as a scoped, user-side opt-in which
> will bring both free and member functions into one overloading set.
>
> struct C
> {
> void func(double) {}
> };
>
> // user
>
> void f(C& c)
> {
> using C::func; //< bring func into the overloading set
>
> func(c, -1);
> }
>
This makes a lot of sense. Perhaps there is a way to provide free-function
overloads which can be replaced by specific free functions, without any
concerns about backward compatibility:
struct Foo {
bool empty() const;
std::size_t size() const;
};
using auto Foo::*; // bring all public member functions of Foo into the
outer namespace as free functions
// but with lower 'weight' than an actual free function declaration:
std::size_t size(Foo const& f); // auto-synthesised Foo::size(Foo
const&) is now hidden in preference to ::size(Foo const&)
>
> Now, if someone adds
>
> void func(C&, size_t);
>
> By the current rules
> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0301r0.html>
> this will *hide* the member function, but now the condition is an error
> as the call to func is ambiguous.
>
> (Needless to say, the above could be used in the future not to *enable* U=
FCS,
> but to *override* the rules.)
>
> In n4586 it says *"...Some people wanted additional opt-in mechanisms to
> enable the new behavior, which was discussed in great detail, but rejecte=
d"*
> What were those opt-ins? Was something like this considered, or the
> opt-ins were on the declaration side (be it on the member/class or
> function) or on the call site?
>
>
> --
> 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/7464c9ca-307=
9-4619-9db0-c993dba7a8b6%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-30=
79-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>
--=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/CALvx3hZ-Q7Lsk3Kjf%2Bwh2cdxP2VXKOMBDknwzjv%2BbH9=
51RVQoQ%40mail.gmail.com.
--000000000000f820420572fcab36
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Thu=
, 9 Aug 2018 at 10:05, <<a href=3D"mailto:mihailnajdenov@gmail.com">miha=
ilnajdenov@gmail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quo=
te" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"=
><div dir=3D"ltr"><br><br>On Wednesday, August 8, 2018 at 4:41:58 PM UTC+3,=
Olanrewaju Adetula wrote:<blockquote class=3D"gmail_quote" style=3D"margin=
:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=
=3D"ltr">If by defining member function for example, an associated free fun=
ction can be synthesized by the compiler or vice-versa, then we can call su=
ch function using either syntax.</div><div><br></div></blockquote><div><br>=
</div><div>I see, note however that if this is enabled it will be a breakin=
g change.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"=
margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><di=
v><div class=3D"gmail_quote">On Mon, Aug 6, 2018 at 4:26 PM, <span dir=3D"=
ltr"><<a rel=3D"nofollow">mihailn...@gmail.com</a>></span> wrote:<br>=
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><span><br><br>On Monday, Au=
gust 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula wrote:<blockquote clas=
s=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc =
solid;padding-left:1ex"><div dir=3D"ltr">
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0<br>If there is a completion there is potentia=
l code break or code change if suddenly the member is the better match, if =
there is a preferred call, there is a potential silent code change.</blockq=
uote>
Or the type author can define one and the language synthesizes the other vi=
a opt-in. With that, it won't matter anymore which syntax is used to in=
voke the function and any attempt to define any other will error as a resul=
t of redeclaration.<div><br></div></div></blockquote><div><br></div></span>=
<div>Can you elaborate?=C2=A0</div><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr"><div></div></div><div><br><div class=3D"g=
mail_quote"><span>On Mon, Aug 6, 2018 at 4:01 PM, <span dir=3D"ltr"><<a=
rel=3D"nofollow">mihailn...@gmail.com</a>></span> wrote:<br></span><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><span><div dir=3D"ltr"><div>Forgot to mention th=
e elephant in the room - this does not solve the fundamental issue, how do =
we define concept requirements for a class, is it in terms of member functi=
ons or in terms of free-standing ones.</div><div><br></div><div>However, th=
is can be a stepping stone towards UCS - after a period of time we could ma=
ke one of the two options the default.=C2=A0</div><div><span style=3D"displ=
ay:inline!important;float:none;background-color:transparent;color:rgb(34,34=
,34);font-family:"Arial","Helvetica",sans-serif;font-si=
ze:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacin=
g:normal;text-align:left;text-decoration:none;text-indent:0px;text-transfor=
m:none;white-space:normal;word-spacing:0px">It will be a non-breaking chang=
e, a</span>fter which the syntax will be used to let the user override the =
default behavior. =C2=A0</div><div><br></div><div>Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0</div><div>If there is a completion there is p=
otential code break or code change if suddenly the member is the better mat=
ch, if there is a preferred call, there is a potential silent code change.<=
/div><div><br></div><div>Silent code change is not so silent as it is not b=
y the class author but by the client code, introducing a free function can =
<i>hide</i> a class member function, called as free function.</div><div>See=
ms to me this is unavoidable, as other options, are either breaking (overlo=
ading) or still code changing (pick member always) and almost certainly mor=
e surprising, yet hides like this are something new.</div><div><br></div><d=
iv><br></div><div>Comments are welcome, I might write a proposal to give th=
is feature another go.</div><div>I personally can't decide for myself i=
f I want full UFC or just a way to call functions using member access synta=
x.</div></div></span><span><font color=3D"#888888"><span>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span><br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/dd460620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org</a>.<br>
</span></font></span></blockquote></div><br></div>
</blockquote></div><span>
<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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<br></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org</a>.<br>
</blockquote></div><br></div></blockquote><div><br></div><div><br></div><di=
v>In any case, I investigated the UFCS situation further and, to my surpris=
e, it turned out, in its last stages only f(x,y) calling x.f(y) was conside=
red.</div><div>I wonder, were all the people asking for UFCS at CppConn las=
t year even aware of that! One can read more <a href=3D"https://isocpp.org/=
blog/2016/02/a-bit-of-background-for-the-unified-call-proposal" target=3D"_=
blank">here</a> and <a href=3D"http://www.open-std.org/JTC1/SC22/WG21/docs/=
papers/2016/n4586.pdf" target=3D"_blank">here</a> (n4586, search down for &=
quot;unified").</div><div><br></div><div>Aside from the fact literally=
no one has ever requested <span style=3D"display:inline!important;float:no=
ne;background-color:transparent;color:rgb(34,34,34);font-family:"Arial=
","Helvetica",sans-serif;font-size:13px;font-style:normal;fo=
nt-variant:normal;font-weight:400;letter-spacing:normal;text-align:left;tex=
t-decoration:none;text-indent:0px;text-transform:none;white-space:normal;wo=
rd-spacing:0px">f(x,y) calling x.f(y), for obvious reasons, and the only pe=
ople to whom it is useful are library writers, I am not surprised at all th=
at even that was not accepted.</span></div><div><span style=3D"display:inli=
ne!important;float:none;background-color:transparent;color:rgb(34,34,34);fo=
nt-family:"Arial","Helvetica",sans-serif;font-size:13px=
;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:norma=
l;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;=
white-space:normal;word-spacing:0px">Hell, even Bjarne <a href=3D"http://ww=
w.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0131r0.pdf" target=3D"_blan=
k">says</a> </span><span style=3D"text-align:left;color:rgb(34,34,34);text-=
transform:none;text-indent:0px;letter-spacing:normal;font-family:"Aria=
l","Helvetica",sans-serif;font-size:13px;font-variant:normal=
;font-weight:400;text-decoration:none;word-spacing:0px;display:inline!impor=
tant;white-space:normal;float:none;background-color:transparent"><i>"P=
eople who fear side effects from generalization might then prefer x.f(y)<sp=
an style=3D"text-align:left;color:rgb(34,34,34);text-transform:none;text-in=
dent:0px;letter-spacing:normal;font-family:"Arial","Helvetic=
a",sans-serif;font-size:13px;font-variant:normal;font-weight:400;text-=
decoration:none;word-spacing:0px;display:inline!important;white-space:norma=
l;float:none;background-color:transparent"> [to generalize]</span> because =
it is more restrictive".</i><br></span></div><div><br></div><div>Indee=
d, the possibility tor trivially hide a class member function, is not prett=
y indeed.=C2=A0</div><div><br></div><div><br></div><div>With all that said,=
I still believe there is hope. In n4586, it is noted<i> "Spicer liked=
the goal of the proposal, but wanted opt-in which would then consider memb=
ers and non-members equally in an overload set."</i></div><div>and <i>=
"Yasskin said he=E2=80=99d feel more comfortable being able to see the=
feature in use for a long period of time, and would feel more comfortable =
seeing it in a TS. "</i></div><div><i><br></i></div><div>These are doa=
ble. We introduce UFCS as a scoped, user-side opt-in which will bring both =
free and member functions into one overloading set.</div><div><br></div><di=
v><font face=3D"courier new,monospace">struct C</font></div><div><font face=
=3D"courier new,monospace">{</font></div><div><font face=3D"courier new,mon=
ospace">=C2=A0 void func(double) {}</font></div><div><font face=3D"courier =
new,monospace">};</font></div><div><font face=3D"courier new,monospace"></f=
ont><br></div><div><font face=3D"courier new,monospace">// user</font></div=
><div><font face=3D"courier new,monospace"></font><br></div><div><font face=
=3D"courier new,monospace">void f(C& c)</font></div><div><font face=3D"=
courier new,monospace">{</font></div><div><font face=3D"courier new,monospa=
ce">=C2=A0 using C::func; //< bring func into the overloading set=C2=A0<=
/font></div><div><font face=3D"courier new,monospace"></font><br></div><div=
><font face=3D"courier new,monospace">=C2=A0 func(c, -1);</font></div><div>=
<font face=3D"courier new,monospace">}</font></div></div></blockquote><div>=
<br></div><div>This makes a lot of sense. Perhaps there is a way to provide=
free-function overloads which can be replaced by specific free functions, =
without any concerns about backward compatibility:</div><div><br></div><div=
><font face=3D"monospace, monospace">struct Foo {</font></div><div><font fa=
ce=3D"monospace, monospace">=C2=A0 bool empty() const;</font></div><div><fo=
nt face=3D"monospace, monospace">=C2=A0 std::size_t size() const;</font></d=
iv><div><font face=3D"monospace, monospace">};</font></div><div><font face=
=3D"monospace, monospace"><br></font></div><div><font face=3D"monospace, mo=
nospace">using auto Foo::*;=C2=A0 =C2=A0// bring all public member function=
s of Foo into the outer namespace as free functions</font></div><div><font =
face=3D"monospace, monospace"><br></font></div><div><font face=3D"monospace=
, monospace">// but with lower 'weight' than an actual free functio=
n declaration:</font></div><div><font face=3D"monospace, monospace">std::si=
ze_t size(Foo const& f);=C2=A0 =C2=A0 // auto-synthesised Foo::size(Foo=
const&) is now hidden in preference to ::size(Foo const&)</font></=
div><div><br></div><div><br></div><div>=C2=A0</div><blockquote class=3D"gma=
il_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-lef=
t:1ex"><div dir=3D"ltr"><div><font face=3D"courier new,monospace"><br></fon=
t></div><div><font face=3D"arial,sans-serif">Now, if someone adds=C2=A0</fo=
nt></div><div><font face=3D"courier new,monospace"><font face=3D"arial,sans=
-serif"></font><br></font></div><div><font face=3D"courier new,monospace"><=
span style=3D"display:inline!important;float:none;background-color:transpar=
ent;color:rgb(34,34,34);font-family:courier new,monospace;font-size:13px;fo=
nt-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;t=
ext-align:left;text-decoration:none;text-indent:0px;text-transform:none;whi=
te-space:normal;word-spacing:0px">void func(C&, size_t);</span></font><=
/div><div><font face=3D"courier new,monospace"><b></b><i></i><u></u><sub></=
sub><sup></sup><strike></strike><br></font></div><div><font face=3D"arial,s=
ans-serif">By <a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers=
/2016/p0301r0.html" target=3D"_blank">the current rules</a> this will <i>hi=
de</i> the member function, but now the condition is an error as the call t=
o func is ambiguous.</font></div><div><font face=3D"arial,sans-serif"><br><=
/font></div><div><font face=3D"arial,sans-serif"><div>(Needless to say, the=
above could be used in the future not to <i>enable</i>=C2=A0<span>UFCS, bu=
t to <i style=3D"border-bottom-color:rgb(34,34,34);border-bottom-style:none=
;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-style:=
none;border-left-width:0px;border-right-color:rgb(34,34,34);border-right-st=
yle:none;border-right-width:0px;border-top-color:rgb(34,34,34);border-top-s=
tyle:none;border-top-width:0px;margin-bottom:0px;margin-left:0px;margin-rig=
ht:0px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px=
;padding-top:0px">override</i> the rules.)</span><br></div></font></div><di=
v><font face=3D"arial,sans-serif"><b></b><i></i><u></u><sub></sub><sup></su=
p><strike></strike><br></font></div><div>In n4586 it says <i>"...Some =
people wanted additional opt-in mechanisms to enable the new behavior, whic=
h was discussed in great detail, but rejected"</i><i><br></i></div><di=
v>What were those opt-ins? Was something like this considered, or the opt-i=
ns were on the declaration side (be it on the member/class or function) or =
on the call site?</div><div><br></div><div><br></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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/7464c9ca-3079-4619-9db0-c993dba7a8b6%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-3079-=
4619-9db0-c993dba7a8b6%40isocpp.org</a>.<br>
</blockquote></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/CALvx3hZ-Q7Lsk3Kjf%2Bwh2cdxP2VXKOMBDk=
nwzjv%2BbH951RVQoQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALvx3hZ-Q7Ls=
k3Kjf%2Bwh2cdxP2VXKOMBDknwzjv%2BbH951RVQoQ%40mail.gmail.com</a>.<br />
--000000000000f820420572fcab36--
.
Author: mihailnajdenov@gmail.com
Date: Fri, 10 Aug 2018 00:01:36 -0700 (PDT)
Raw View
------=_Part_620_660238902.1533884496160
Content-Type: multipart/alternative;
boundary="----=_Part_621_1364461770.1533884496161"
------=_Part_621_1364461770.1533884496161
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Thursday, August 9, 2018 at 11:47:08 AM UTC+3, Richard Hodges wrote:
>
>
>
> On Thu, 9 Aug 2018 at 10:05, <mihailn...@gmail.com <javascript:>> wrote:
>
>>
>>
>> On Wednesday, August 8, 2018 at 4:41:58 PM UTC+3, Olanrewaju Adetula=20
>> wrote:
>>>
>>> If by defining member function for example, an associated free function=
=20
>>> can be synthesized by the compiler or vice-versa, then we can call such=
=20
>>> function using either syntax.
>>>
>>>
>> I see, note however that if this is enabled it will be a breaking change=
..
>> =20
>>
>>> On Mon, Aug 6, 2018 at 4:26 PM, <mihailn...@gmail.com> wrote:
>>>
>>>>
>>>>
>>>> On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula wrot=
e:
>>>>>
>>>>> Of course going full UCS introduces the mirror set of=20
>>>>>> vulnerability-to-change problems. If we can call members using free=
=20
>>>>>> standing, then these are either in competition or there is a preferr=
ed=20
>>>>>> call.=20
>>>>>> If there is a completion there is potential code break or code chang=
e=20
>>>>>> if suddenly the member is the better match, if there is a preferred =
call,=20
>>>>>> there is a potential silent code change.
>>>>>
>>>>> Or the type author can define one and the language synthesizes the=20
>>>>> other via opt-in. With that, it won't matter anymore which syntax is =
used=20
>>>>> to invoke the function and any attempt to define any other will error=
as a=20
>>>>> result of redeclaration.
>>>>>
>>>>>
>>>> Can you elaborate?=20
>>>> =20
>>>>
>>>>>
>>>>> On Mon, Aug 6, 2018 at 4:01 PM, <mihailn...@gmail.com> wrote:
>>>>>
>>>>>> Forgot to mention the elephant in the room - this does not solve the=
=20
>>>>>> fundamental issue, how do we define concept requirements for a class=
, is it=20
>>>>>> in terms of member functions or in terms of free-standing ones.
>>>>>>
>>>>>> However, this can be a stepping stone towards UCS - after a period o=
f=20
>>>>>> time we could make one of the two options the default.=20
>>>>>> It will be a non-breaking change, after which the syntax will be=20
>>>>>> used to let the user override the default behavior. =20
>>>>>>
>>>>>> Of course going full UCS introduces the mirror set of=20
>>>>>> vulnerability-to-change problems. If we can call members using free=
=20
>>>>>> standing, then these are either in competition or there is a preferr=
ed=20
>>>>>> call.=20
>>>>>> If there is a completion there is potential code break or code chang=
e=20
>>>>>> if suddenly the member is the better match, if there is a preferred =
call,=20
>>>>>> there is a potential silent code change.
>>>>>>
>>>>>> Silent code change is not so silent as it is not by the class author=
=20
>>>>>> but by the client code, introducing a free function can *hide* a=20
>>>>>> class member function, called as free function.
>>>>>> Seems to me this is unavoidable, as other options, are either=20
>>>>>> breaking (overloading) or still code changing (pick member always) a=
nd=20
>>>>>> almost certainly more surprising, yet hides like this are something =
new.
>>>>>>
>>>>>>
>>>>>> Comments are welcome, I might write a proposal to give this feature=
=20
>>>>>> another go.
>>>>>> I personally can't decide for myself if I want full UFC or just a wa=
y=20
>>>>>> to call functions using member access syntax.
>>>>>>
>>>>>> --=20
>>>>>> You received this message because you are subscribed to the Google=
=20
>>>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,=20
>>>>>> send an email to std-proposal...@isocpp.org.
>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>> To view this discussion on the web visit=20
>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd46062=
0-2bc7-47fd-8e39-68a85003d9be%40isocpp.org=20
>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd4606=
20-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_source=
=3Dfooter>
>>>>>> .
>>>>>>
>>>>>
>>>>> --=20
>>>> You received this message because you are subscribed to the Google=20
>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send=
=20
>>>> an email to std-proposal...@isocpp.org.
>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>> To view this discussion on the web visit=20
>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99d-=
2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org=20
>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99d=
-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=3Demail&utm_source=3Df=
ooter>
>>>> .
>>>>
>>>
>>>
>>
>> In any case, I investigated the UFCS situation further and, to my=20
>> surprise, it turned out, in its last stages only f(x,y) calling x.f(y) w=
as=20
>> considered.
>> I wonder, were all the people asking for UFCS at CppConn last year even=
=20
>> aware of that! One can read more here=20
>> <https://isocpp.org/blog/2016/02/a-bit-of-background-for-the-unified-cal=
l-proposal>=20
>> and here=20
>> <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/n4586.pdf>=20
>> (n4586, search down for "unified").
>>
>> Aside from the fact literally no one has ever requested f(x,y) calling=
=20
>> x.f(y), for obvious reasons, and the only people to whom it is useful ar=
e=20
>> library writers, I am not surprised at all that even that was not accept=
ed.
>> Hell, even Bjarne says=20
>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0131r0.pdf> *"=
People=20
>> who fear side effects from generalization might then prefer x.f(y) [to=
=20
>> generalize] because it is more restrictive".*
>>
>> Indeed, the possibility tor trivially hide a class member function, is=
=20
>> not pretty indeed.=20
>>
>>
>> With all that said, I still believe there is hope. In n4586, it is noted=
*=20
>> "Spicer liked the goal of the proposal, but wanted opt-in which would th=
en=20
>> consider members and non-members equally in an overload set."*
>> and *"Yasskin said he=E2=80=99d feel more comfortable being able to see =
the=20
>> feature in use for a long period of time, and would feel more comfortabl=
e=20
>> seeing it in a TS. "*
>>
>> These are doable. We introduce UFCS as a scoped, user-side opt-in which=
=20
>> will bring both free and member functions into one overloading set.
>>
>> struct C
>> {
>> void func(double) {}
>> };
>>
>> // user
>>
>> void f(C& c)
>> {
>> using C::func; //< bring func into the overloading set=20
>>
>> func(c, -1);
>> }
>>
>
> =20
> This makes a lot of sense. Perhaps there is a way to provide free-functio=
n=20
> overloads which can be replaced by specific free functions, without any=
=20
> concerns about backward compatibility:
>
> struct Foo {
> bool empty() const;
> std::size_t size() const;
> };
>
> using auto Foo::*; // bring all public member functions of Foo into the=
=20
> outer namespace as free functions
>
> // but with lower 'weight' than an actual free function declaration:
> std::size_t size(Foo const& f); // auto-synthesised Foo::size(Foo=20
> const&) is now hidden in preference to ::size(Foo const&)
>
Richard, this is the behavior suggested under UFCS, but was rejected. Here=
=20
is a great example why=20
<https://www.reddit.com/r/cpp/comments/4d19gk/awesome_wg21_paper_about_alte=
rnative_unified_call/d1uqkpz>
.. =20
What we want is for local size *not to* hide. If the user wants to hide he=
=20
should use a qualified called, so to be explicit.=20
This will match current behavior.=20
Currently, if the user wants to hide, he must use a free standing function=
=20
which will force him to be explicit on the call site by changing the call=
=20
syntax
from f.size() to size(f)
In the unified world, if the user wants to hide, he must again change the=
=20
call syntax, this time
from size(f) to ::size(f)
=20
>
> =20
>
>>
>> Now, if someone adds=20
>>
>> void func(C&, size_t);
>>
>> By the current rules=20
>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0301r0.html>=
=20
>> this will *hide* the member function, but now the condition is an error=
=20
>> as the call to func is ambiguous.
>>
>> (Needless to say, the above could be used in the future not to *enable* =
UFCS,=20
>> but to *override* the rules.)
>>
>> In n4586 it says *"...Some people wanted additional opt-in mechanisms to=
=20
>> enable the new behavior, which was discussed in great detail, but reject=
ed"*
>> What were those opt-ins? Was something like this considered, or the=20
>> opt-ins were on the declaration side (be it on the member/class or=20
>> function) or on the call site?
>>
>>
>> --=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit=20
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-30=
79-4619-9db0-c993dba7a8b6%40isocpp.org=20
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-3=
079-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoo=
ter>
>> .
>>
>
--=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/9e1318cb-4f04-4e26-a630-ce4b41363d19%40isocpp.or=
g.
------=_Part_621_1364461770.1533884496161
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Thursday, August 9, 2018 at 11:47:08 AM UTC+3, =
Richard Hodges wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;m=
argin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Thu, 9 Aug =
2018 at 10:05, <<a onmousedown=3D"this.href=3D'javascript:';retu=
rn true;" onclick=3D"this.href=3D'javascript:';return true;" href=
=3D"javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=
=3D"_LjZTSjiDAAJ">mihailn...@gmail.com</a>> wrote:<br></div><blockquote =
class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid=
;padding-left:1ex"><div dir=3D"ltr"><br><br>On Wednesday, August 8, 2018 at=
4:41:58 PM UTC+3, Olanrewaju Adetula wrote:<blockquote class=3D"gmail_quot=
e" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-l=
eft:1ex"><div dir=3D"ltr">If by defining member function for example, an as=
sociated free function can be synthesized by the compiler or vice-versa, th=
en we can call such function using either syntax.</div><div><br></div></blo=
ckquote><div><br></div><div>I see, note however that if this is enabled it =
will be a breaking change.</div><div>=C2=A0</div><blockquote class=3D"gmail=
_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padd=
ing-left:1ex"><div><div class=3D"gmail_quote">On Mon, Aug 6, 2018 at 4:26 P=
M, <span dir=3D"ltr"><<a rel=3D"nofollow">mihailn...@gmail.com</a>><=
/span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><span><br>=
<br>On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula wrote=
:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;bord=
er-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0<br>If there is a completion there is potentia=
l code break or code change if suddenly the member is the better match, if =
there is a preferred call, there is a potential silent code change.</blockq=
uote>
Or the type author can define one and the language synthesizes the other vi=
a opt-in. With that, it won't matter anymore which syntax is used to in=
voke the function and any attempt to define any other will error as a resul=
t of redeclaration.<div><br></div></div></blockquote><div><br></div></span>=
<div>Can you elaborate?=C2=A0</div><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr"><div></div></div><div><br><div class=3D"g=
mail_quote"><span>On Mon, Aug 6, 2018 at 4:01 PM, <span dir=3D"ltr"><<a=
rel=3D"nofollow">mihailn...@gmail.com</a>></span> wrote:<br></span><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><span><div dir=3D"ltr"><div>Forgot to mention th=
e elephant in the room - this does not solve the fundamental issue, how do =
we define concept requirements for a class, is it in terms of member functi=
ons or in terms of free-standing ones.</div><div><br></div><div>However, th=
is can be a stepping stone towards UCS - after a period of time we could ma=
ke one of the two options the default.=C2=A0</div><div><span style=3D"displ=
ay:inline!important;float:none;background-color:transparent;color:rgb(34,34=
,34);font-family:"Arial","Helvetica",sans-serif;font-si=
ze:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacin=
g:normal;text-align:left;text-decoration:none;text-indent:0px;text-transfor=
m:none;white-space:normal;word-spacing:0px">It will be a non-breaking chang=
e, a</span>fter which the syntax will be used to let the user override the =
default behavior. =C2=A0</div><div><br></div><div>Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0</div><div>If there is a completion there is p=
otential code break or code change if suddenly the member is the better mat=
ch, if there is a preferred call, there is a potential silent code change.<=
/div><div><br></div><div>Silent code change is not so silent as it is not b=
y the class author but by the client code, introducing a free function can =
<i>hide</i> a class member function, called as free function.</div><div>See=
ms to me this is unavoidable, as other options, are either breaking (overlo=
ading) or still code changing (pick member always) and almost certainly mor=
e surprising, yet hides like this are something new.</div><div><br></div><d=
iv><br></div><div>Comments are welcome, I might write a proposal to give th=
is feature another go.</div><div>I personally can't decide for myself i=
f I want full UFC or just a way to call functions using member access synta=
x.</div></div></span><span><font color=3D"#888888"><span>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span><br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7=
-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd46=
0620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/dd460620-2bc7-47fd-<wbr>8e39-=
68a85003d9be%40isocpp.org</a><wbr>.<br>
</span></font></span></blockquote></div><br></div>
</blockquote></div><span>
<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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<br></span>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3=
-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734b=
c99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/734bc99d-2aa3-4af6-<wbr>b0b6-=
fb3ec3452d17%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></div></blockquote><div><br></div><div><br></div><di=
v>In any case, I investigated the UFCS situation further and, to my surpris=
e, it turned out, in its last stages only f(x,y) calling x.f(y) was conside=
red.</div><div>I wonder, were all the people asking for UFCS at CppConn las=
t year even aware of that! One can read more <a onmousedown=3D"this.href=3D=
'https://www.google.com/url?q\x3dhttps%3A%2F%2Fisocpp.org%2Fblog%2F2016=
%2F02%2Fa-bit-of-background-for-the-unified-call-proposal\x26sa\x3dD\x26snt=
z\x3d1\x26usg\x3dAFQjCNFrXRMjCPvNitAsGlOY6O1LyA1ddQ';return true;" oncl=
ick=3D"this.href=3D'https://www.google.com/url?q\x3dhttps%3A%2F%2Fisocp=
p.org%2Fblog%2F2016%2F02%2Fa-bit-of-background-for-the-unified-call-proposa=
l\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFrXRMjCPvNitAsGlOY6O1LyA1ddQ'=
;return true;" href=3D"https://isocpp.org/blog/2016/02/a-bit-of-background-=
for-the-unified-call-proposal" target=3D"_blank" rel=3D"nofollow">here</a> =
and <a onmousedown=3D"this.href=3D'http://www.google.com/url?q\x3dhttp%=
3A%2F%2Fwww.open-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fn458=
6.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1g7MRLKGRCtwaUkePf7cLyyRyMg&=
#39;;return true;" onclick=3D"this.href=3D'http://www.google.com/url?q\=
x3dhttp%3A%2F%2Fwww.open-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F201=
6%2Fn4586.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1g7MRLKGRCtwaUkePf7c=
LyyRyMg';return true;" href=3D"http://www.open-std.org/JTC1/SC22/WG21/d=
ocs/papers/2016/n4586.pdf" target=3D"_blank" rel=3D"nofollow">here</a> (n45=
86, search down for "unified").</div><div><br></div><div>Aside fr=
om the fact literally no one has ever requested <span style=3D"display:inli=
ne!important;float:none;background-color:transparent;color:rgb(34,34,34);fo=
nt-family:"Arial","Helvetica",sans-serif;font-size:13px=
;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:norma=
l;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;=
white-space:normal;word-spacing:0px">f(x,y) calling x.f(y), for obvious rea=
sons, and the only people to whom it is useful are library writers, I am no=
t surprised at all that even that was not accepted.</span></div><div><span =
style=3D"display:inline!important;float:none;background-color:transparent;c=
olor:rgb(34,34,34);font-family:"Arial","Helvetica",sans=
-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:400=
;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px=
;text-transform:none;white-space:normal;word-spacing:0px">Hell, even Bjarne=
<a onmousedown=3D"this.href=3D'http://www.google.com/url?q\x3dhttp%3A%=
2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2015%2Fp0131r0=
..pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFgArzPPqWPRJyeFIsqQqR6veJ1Ew&#=
39;;return true;" onclick=3D"this.href=3D'http://www.google.com/url?q\x=
3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2015=
%2Fp0131r0.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFgArzPPqWPRJyeFIsqQq=
R6veJ1Ew';return true;" href=3D"http://www.open-std.org/jtc1/sc22/wg21/=
docs/papers/2015/p0131r0.pdf" target=3D"_blank" rel=3D"nofollow">says</a> <=
/span><span style=3D"text-align:left;color:rgb(34,34,34);text-transform:non=
e;text-indent:0px;letter-spacing:normal;font-family:"Arial","=
;Helvetica",sans-serif;font-size:13px;font-variant:normal;font-weight:=
400;text-decoration:none;word-spacing:0px;display:inline!important;white-sp=
ace:normal;float:none;background-color:transparent"><i>"People who fea=
r side effects from generalization might then prefer x.f(y)<span style=3D"t=
ext-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;lett=
er-spacing:normal;font-family:"Arial","Helvetica",sans-=
serif;font-size:13px;font-variant:normal;font-weight:400;text-decoration:no=
ne;word-spacing:0px;display:inline!important;white-space:normal;float:none;=
background-color:transparent"> [to generalize]</span> because it is more re=
strictive".</i><br></span></div><div><br></div><div>Indeed, the possib=
ility tor trivially hide a class member function, is not pretty indeed.=C2=
=A0</div><div><br></div><div><br></div><div>With all that said, I still bel=
ieve there is hope. In n4586, it is noted<i> "Spicer liked the goal of=
the proposal, but wanted opt-in which would then consider members and non-=
members equally in an overload set."</i></div><div>and <i>"Yasski=
n said he=E2=80=99d feel more comfortable being able to see the feature in =
use for a long period of time, and would feel more comfortable seeing it in=
a TS. "</i></div><div><i><br></i></div><div>These are doable. We intr=
oduce UFCS as a scoped, user-side opt-in which will bring both free and mem=
ber functions into one overloading set.</div><div><br></div><div><font face=
=3D"courier new,monospace">struct C</font></div><div><font face=3D"courier =
new,monospace">{</font></div><div><font face=3D"courier new,monospace">=C2=
=A0 void func(double) {}</font></div><div><font face=3D"courier new,monospa=
ce">};</font></div><div><font face=3D"courier new,monospace"></font><br></d=
iv><div><font face=3D"courier new,monospace">// user</font></div><div><font=
face=3D"courier new,monospace"></font><br></div><div><font face=3D"courier=
new,monospace">void f(C& c)</font></div><div><font face=3D"courier new=
,monospace">{</font></div><div><font face=3D"courier new,monospace">=C2=A0 =
using C::func; //< bring func into the overloading set=C2=A0</font></div=
><div><font face=3D"courier new,monospace"></font><br></div><div><font face=
=3D"courier new,monospace">=C2=A0 func(c, -1);</font></div><div><font face=
=3D"courier new,monospace">}</font></div></div></blockquote><div><br></div>=
</div></div></blockquote><div>=C2=A0</div><blockquote class=3D"gmail_quote"=
style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-=
left: 1ex;"><div dir=3D"ltr"><div class=3D"gmail_quote"><div></div><div>Thi=
s makes a lot of sense. Perhaps there is a way to provide free-function ove=
rloads which can be replaced by specific free functions, without any concer=
ns about backward compatibility:</div><div><br></div><div><font face=3D"mon=
ospace, monospace">struct Foo {</font></div><div><font face=3D"monospace, m=
onospace">=C2=A0 bool empty() const;</font></div><div><font face=3D"monospa=
ce, monospace">=C2=A0 std::size_t size() const;</font></div><div><font face=
=3D"monospace, monospace">};</font></div><div><font face=3D"monospace, mono=
space"><br></font></div><div><font face=3D"monospace, monospace">using auto=
Foo::*;=C2=A0 =C2=A0// bring all public member functions of Foo into the o=
uter namespace as free functions</font></div><div><font face=3D"monospace, =
monospace"><br></font></div><div><font face=3D"monospace, monospace">// but=
with lower 'weight' than an actual free function declaration:</fon=
t></div><div><font face=3D"monospace, monospace">std::size_t size(Foo const=
& f);=C2=A0 =C2=A0 // auto-synthesised Foo::size(Foo const&) is now=
hidden in preference to ::size(Foo const&)</font></div></div></div></b=
lockquote><div><br></div><div><br></div><div>Richard, this is the behavior =
suggested under UFCS, but was rejected. Here is <a href=3D"https://www.redd=
it.com/r/cpp/comments/4d19gk/awesome_wg21_paper_about_alternative_unified_c=
all/d1uqkpz">a great example why</a><font color=3D"#004000">.</font> =C2=A0=
</div><div><br></div><div>What we want is for local <font face=3D"courier n=
ew,monospace">size</font> <i>not to</i> hide. If the user wants to hide he =
should use a qualified called, so to be explicit.=C2=A0</div><div><br></div=
><div>This will match current behavior.=C2=A0</div><div><br></div><div>Curr=
ently, if the user wants to hide, he must use a free standing function whic=
h will force him to be explicit on the call site by changing the call synta=
x</div><div><font face=3D"courier new,monospace"><br></font></div><div><fon=
t face=3D"arial,sans-serif">from</font><font face=3D"courier new,monospace"=
> f.size() <font face=3D"arial,sans-serif">to</font> size(f)</font></div><d=
iv><font face=3D"courier new,monospace"></font><br></div><div>In the unifie=
d world, if the user wants to hide, he must again change the call syntax, t=
his time</div><div><br></div><div>from <font face=3D"courier new,monospace"=
>size(f) </font><font face=3D"arial,sans-serif">to</font><font face=3D"cour=
ier new,monospace"> ::size(f)</font></div><div><font face=3D"courier new,mo=
nospace"></font>=C2=A0</div><div><br></div><blockquote class=3D"gmail_quote=
" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding=
-left: 1ex;"><div dir=3D"ltr"><div class=3D"gmail_quote"><div><br></div><di=
v><br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr=
"><div><font face=3D"courier new,monospace"><br></font></div><div><font fac=
e=3D"arial,sans-serif">Now, if someone adds=C2=A0</font></div><div><font fa=
ce=3D"courier new,monospace"><font face=3D"arial,sans-serif"></font><br></f=
ont></div><div><font face=3D"courier new,monospace"><span style=3D"text-ali=
gn: left; text-transform: none; text-indent: 0px; letter-spacing: normal; f=
ont-family: courier new,monospace; font-size: 13px; font-style: normal; fon=
t-variant: normal; font-weight: 400; text-decoration: none; word-spacing: 0=
px; display: inline !important; white-space: normal; float: none; backgroun=
d-color: transparent;">void func(C&, size_t);</span></font></div><div><=
font face=3D"courier new,monospace"><b></b><i></i><u></u><sub></sub><sup></=
sup><strike></strike><br></font></div><div><font face=3D"arial,sans-serif">=
By </font><font face=3D"arial,sans-serif"><a onmousedown=3D"this.href=3D=
9;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc2=
2%2Fwg21%2Fdocs%2Fpapers%2F2016%2Fp0301r0.html\x26sa\x3dD\x26sntz\x3d1\x26u=
sg\x3dAFQjCNG0c9fPByA6sWhcNkdG8HHMR677UQ';return true;" onclick=3D"this=
..href=3D'http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.open-std.org%2=
Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2016%2Fp0301r0.html\x26sa\x3dD\x26snt=
z\x3d1\x26usg\x3dAFQjCNG0c9fPByA6sWhcNkdG8HHMR677UQ';return true;" href=
=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0301r0.html" t=
arget=3D"_blank" rel=3D"nofollow">the current rules</a> this will <i>hide</=
i> the member function, but now the condition is an error as the call to fu=
nc is ambiguous.</font></div><div><font face=3D"arial,sans-serif"><br></fon=
t></div><div><font face=3D"arial,sans-serif"><div>(Needless to say, the abo=
ve could be used in the future not to <i>enable</i>=C2=A0<span>UFCS, but to=
<i style=3D"border-bottom-color:rgb(34,34,34);border-bottom-style:none;bor=
der-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-style:none=
;border-left-width:0px;border-right-color:rgb(34,34,34);border-right-style:=
none;border-right-width:0px;border-top-color:rgb(34,34,34);border-top-style=
:none;border-top-width:0px;margin-bottom:0px;margin-left:0px;margin-right:0=
px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;pad=
ding-top:0px">override</i> the rules.)</span><br></div></font></div><div><f=
ont face=3D"arial,sans-serif"><b></b><i></i><u></u><sub></sub><sup></sup><s=
trike></strike><br></font></div><div>In n4586 it says <i>"...Some peop=
le wanted additional opt-in mechanisms to enable the new behavior, which wa=
s discussed in great detail, but rejected"</i><i><br></i></div><div>Wh=
at were those opt-ins? Was something like this considered, or the opt-ins w=
ere on the declaration side (be it on the member/class or function) or on t=
he call site?</div><div><br></div><div><br></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 onmousedown=3D"this.href=3D'javascript:';return true;" o=
nclick=3D"this.href=3D'javascript:';return true;" href=3D"javascrip=
t:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"_LjZTSjiDAA=
J">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a onmousedown=3D"this.href=3D'jav=
ascript:';return true;" onclick=3D"this.href=3D'javascript:';re=
turn true;" href=3D"javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obf=
uscated-mailto=3D"_LjZTSjiDAAJ">std-pr...@isocpp.org</a>.<br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-3079=
-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-3079-4619-9db0-c993dba7a8b6=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464=
c9ca-3079-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/7464c9ca-3079-4619-<wbr>9db0-=
c993dba7a8b6%40isocpp.org</a><wbr>.<br>
</blockquote></div></div>
</blockquote></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/9e1318cb-4f04-4e26-a630-ce4b41363d19%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4f04-4e26-a630-ce4b41363d19=
%40isocpp.org</a>.<br />
------=_Part_621_1364461770.1533884496161--
------=_Part_620_660238902.1533884496160--
.
Author: Richard Hodges <hodges.r@gmail.com>
Date: Fri, 10 Aug 2018 12:35:18 +0200
Raw View
--00000000000076897b0573124d4a
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Fri, 10 Aug 2018 at 09:01, <mihailnajdenov@gmail.com> wrote:
>
>
> On Thursday, August 9, 2018 at 11:47:08 AM UTC+3, Richard Hodges wrote:
>>
>>
>>
>> On Thu, 9 Aug 2018 at 10:05, <mihailn...@gmail.com> wrote:
>>
>>>
>>>
>>> On Wednesday, August 8, 2018 at 4:41:58 PM UTC+3, Olanrewaju Adetula
>>> wrote:
>>>>
>>>> If by defining member function for example, an associated free functio=
n
>>>> can be synthesized by the compiler or vice-versa, then we can call suc=
h
>>>> function using either syntax.
>>>>
>>>>
>>> I see, note however that if this is enabled it will be a breaking chang=
e.
>>>
>>>
>>>> On Mon, Aug 6, 2018 at 4:26 PM, <mihailn...@gmail.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula
>>>>> wrote:
>>>>>>
>>>>>> Of course going full UCS introduces the mirror set of
>>>>>>> vulnerability-to-change problems. If we can call members using free
>>>>>>> standing, then these are either in competition or there is a prefer=
red
>>>>>>> call.
>>>>>>> If there is a completion there is potential code break or code
>>>>>>> change if suddenly the member is the better match, if there is a pr=
eferred
>>>>>>> call, there is a potential silent code change.
>>>>>>
>>>>>> Or the type author can define one and the language synthesizes the
>>>>>> other via opt-in. With that, it won't matter anymore which syntax is=
used
>>>>>> to invoke the function and any attempt to define any other will erro=
r as a
>>>>>> result of redeclaration.
>>>>>>
>>>>>>
>>>>> Can you elaborate?
>>>>>
>>>>>
>>>>>>
>>>>>> On Mon, Aug 6, 2018 at 4:01 PM, <mihailn...@gmail.com> wrote:
>>>>>>
>>>>>>> Forgot to mention the elephant in the room - this does not solve th=
e
>>>>>>> fundamental issue, how do we define concept requirements for a clas=
s, is it
>>>>>>> in terms of member functions or in terms of free-standing ones.
>>>>>>>
>>>>>>> However, this can be a stepping stone towards UCS - after a period
>>>>>>> of time we could make one of the two options the default.
>>>>>>> It will be a non-breaking change, after which the syntax will be
>>>>>>> used to let the user override the default behavior.
>>>>>>>
>>>>>>> Of course going full UCS introduces the mirror set of
>>>>>>> vulnerability-to-change problems. If we can call members using free
>>>>>>> standing, then these are either in competition or there is a prefer=
red
>>>>>>> call.
>>>>>>> If there is a completion there is potential code break or code
>>>>>>> change if suddenly the member is the better match, if there is a pr=
eferred
>>>>>>> call, there is a potential silent code change.
>>>>>>>
>>>>>>> Silent code change is not so silent as it is not by the class autho=
r
>>>>>>> but by the client code, introducing a free function can *hide* a
>>>>>>> class member function, called as free function.
>>>>>>> Seems to me this is unavoidable, as other options, are either
>>>>>>> breaking (overloading) or still code changing (pick member always) =
and
>>>>>>> almost certainly more surprising, yet hides like this are something=
new.
>>>>>>>
>>>>>>>
>>>>>>> Comments are welcome, I might write a proposal to give this feature
>>>>>>> another go.
>>>>>>> I personally can't decide for myself if I want full UFC or just a
>>>>>>> way to call functions using member access syntax.
>>>>>>>
>>>>>>> --
>>>>>>> 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-proposal...@isocpp.org.
>>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>>> To view this discussion on the web visit
>>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd4606=
20-2bc7-47fd-8e39-68a85003d9be%40isocpp.org
>>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460=
620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_source=
=3Dfooter>
>>>>>>> .
>>>>>>>
>>>>>>
>>>>>> --
>>>>> 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, sen=
d
>>>>> an email to std-proposal...@isocpp.org.
>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99d=
-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org
>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99=
d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=3Demail&utm_source=3D=
footer>
>>>>> .
>>>>>
>>>>
>>>>
>>>
>>> In any case, I investigated the UFCS situation further and, to my
>>> surprise, it turned out, in its last stages only f(x,y) calling x.f(y) =
was
>>> considered.
>>> I wonder, were all the people asking for UFCS at CppConn last year even
>>> aware of that! One can read more here
>>> <https://isocpp.org/blog/2016/02/a-bit-of-background-for-the-unified-ca=
ll-proposal>
>>> and here
>>> <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/n4586.pdf>
>>> (n4586, search down for "unified").
>>>
>>> Aside from the fact literally no one has ever requested f(x,y) calling
>>> x.f(y), for obvious reasons, and the only people to whom it is useful a=
re
>>> library writers, I am not surprised at all that even that was not accep=
ted.
>>> Hell, even Bjarne says
>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0131r0.pdf> *=
"People
>>> who fear side effects from generalization might then prefer x.f(y) [to
>>> generalize] because it is more restrictive".*
>>>
>>> Indeed, the possibility tor trivially hide a class member function, is
>>> not pretty indeed.
>>>
>>>
>>> With all that said, I still believe there is hope. In n4586, it is note=
d*
>>> "Spicer liked the goal of the proposal, but wanted opt-in which would t=
hen
>>> consider members and non-members equally in an overload set."*
>>> and *"Yasskin said he=E2=80=99d feel more comfortable being able to see=
the
>>> feature in use for a long period of time, and would feel more comfortab=
le
>>> seeing it in a TS. "*
>>>
>>> These are doable. We introduce UFCS as a scoped, user-side opt-in which
>>> will bring both free and member functions into one overloading set.
>>>
>>> struct C
>>> {
>>> void func(double) {}
>>> };
>>>
>>> // user
>>>
>>> void f(C& c)
>>> {
>>> using C::func; //< bring func into the overloading set
>>>
>>> func(c, -1);
>>> }
>>>
>>
>>
>
>> This makes a lot of sense. Perhaps there is a way to provide
>> free-function overloads which can be replaced by specific free functions=
,
>> without any concerns about backward compatibility:
>>
>> struct Foo {
>> bool empty() const;
>> std::size_t size() const;
>> };
>>
>> using auto Foo::*; // bring all public member functions of Foo into th=
e
>> outer namespace as free functions
>>
>> // but with lower 'weight' than an actual free function declaration:
>> std::size_t size(Foo const& f); // auto-synthesised Foo::size(Foo
>> const&) is now hidden in preference to ::size(Foo const&)
>>
>
>
> Richard, this is the behavior suggested under UFCS, but was rejected. Her=
e
> is a great example why
> <https://www.reddit.com/r/cpp/comments/4d19gk/awesome_wg21_paper_about_al=
ternative_unified_call/d1uqkpz>
> .
>
You mean we lost the chance to gain an important, amazing language feature
for the sake of one unimaginative luddite who has a code base so ancient
that he's unlikely to ever actually switch on the -std=3Dc++20 feature at a=
ll?
This is why we can't have nice things. The ridiculous idea that everything
in a new version of X must be compatible with every previous version of X
has been the bane of the computing industry since the demon-spawn of MSDOS.
>
> What we want is for local size *not to* hide. If the user wants to hide
> he should use a qualified called, so to be explicit.
>
> This will match current behavior.
>
> Currently, if the user wants to hide, he must use a free standing functio=
n
> which will force him to be explicit on the call site by changing the call
> syntax
>
> from f.size() to size(f)
>
> In the unified world, if the user wants to hide, he must again change the
> call syntax, this time
>
> from size(f) to ::size(f)
>
>
>
>>
>>
>>
>>>
>>> Now, if someone adds
>>>
>>> void func(C&, size_t);
>>>
>>> By the current rules
>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0301r0.html>
>>> this will *hide* the member function, but now the condition is an error
>>> as the call to func is ambiguous.
>>>
>>> (Needless to say, the above could be used in the future not to *enable*=
UFCS,
>>> but to *override* the rules.)
>>>
>>> In n4586 it says *"...Some people wanted additional opt-in mechanisms
>>> to enable the new behavior, which was discussed in great detail, but
>>> rejected"*
>>> What were those opt-ins? Was something like this considered, or the
>>> opt-ins were on the declaration side (be it on the member/class or
>>> function) or on the call site?
>>>
>>>
>>> --
>>> 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-proposal...@isocpp.org.
>>> To post to this group, send email to std-pr...@isocpp.org.
>>> To view this discussion on the web visit
>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-3=
079-4619-9db0-c993dba7a8b6%40isocpp.org
>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-=
3079-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium=3Demail&utm_source=3Dfo=
oter>
>>> .
>>>
>> --
> 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/9e1318cb-4f0=
4-4e26-a630-ce4b41363d19%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4f=
04-4e26-a630-ce4b41363d19%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>
--=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/CALvx3hZur%3D15q5xo7pfk5mZj35WQW_32bYWHwzNiez%2B=
YgQ%2B7NA%40mail.gmail.com.
--00000000000076897b0573124d4a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri=
, 10 Aug 2018 at 09:01, <<a href=3D"mailto:mihailnajdenov@gmail.com">mih=
ailnajdenov@gmail.com</a>> wrote:<br></div><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex=
"><div dir=3D"ltr"><br><br>On Thursday, August 9, 2018 at 11:47:08 AM UTC+3=
, Richard Hodges wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;=
margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"=
ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Thu, 9 Aug 2018=
at 10:05, <<a rel=3D"nofollow">mihailn...@gmail.com</a>> wrote:<br><=
/div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-le=
ft:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><br>On Wednesday, =
August 8, 2018 at 4:41:58 PM UTC+3, Olanrewaju Adetula wrote:<blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #cc=
c solid;padding-left:1ex"><div dir=3D"ltr">If by defining member function f=
or example, an associated free function can be synthesized by the compiler =
or vice-versa, then we can call such function using either syntax.</div><di=
v><br></div></blockquote><div><br></div><div>I see, note however that if th=
is is enabled it will be a breaking change.</div><div>=C2=A0</div><blockquo=
te class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div><div class=3D"gmail_quote">On Mon, Aug =
6, 2018 at 4:26 PM, <span dir=3D"ltr"><<a rel=3D"nofollow">mihailn...@g=
mail.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=
=3D"ltr"><span><br><br>On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Olanr=
ewaju Adetula wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;mar=
gin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr=
">
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0<br>If there is a completion there is potentia=
l code break or code change if suddenly the member is the better match, if =
there is a preferred call, there is a potential silent code change.</blockq=
uote>
Or the type author can define one and the language synthesizes the other vi=
a opt-in. With that, it won't matter anymore which syntax is used to in=
voke the function and any attempt to define any other will error as a resul=
t of redeclaration.<div><br></div></div></blockquote><div><br></div></span>=
<div>Can you elaborate?=C2=A0</div><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr"><div></div></div><div><br><div class=3D"g=
mail_quote"><span>On Mon, Aug 6, 2018 at 4:01 PM, <span dir=3D"ltr"><<a=
rel=3D"nofollow">mihailn...@gmail.com</a>></span> wrote:<br></span><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><span><div dir=3D"ltr"><div>Forgot to mention th=
e elephant in the room - this does not solve the fundamental issue, how do =
we define concept requirements for a class, is it in terms of member functi=
ons or in terms of free-standing ones.</div><div><br></div><div>However, th=
is can be a stepping stone towards UCS - after a period of time we could ma=
ke one of the two options the default.=C2=A0</div><div><span style=3D"displ=
ay:inline!important;float:none;background-color:transparent;color:rgb(34,34=
,34);font-family:"Arial","Helvetica",sans-serif;font-si=
ze:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacin=
g:normal;text-align:left;text-decoration:none;text-indent:0px;text-transfor=
m:none;white-space:normal;word-spacing:0px">It will be a non-breaking chang=
e, a</span>fter which the syntax will be used to let the user override the =
default behavior. =C2=A0</div><div><br></div><div>Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0</div><div>If there is a completion there is p=
otential code break or code change if suddenly the member is the better mat=
ch, if there is a preferred call, there is a potential silent code change.<=
/div><div><br></div><div>Silent code change is not so silent as it is not b=
y the class author but by the client code, introducing a free function can =
<i>hide</i> a class member function, called as free function.</div><div>See=
ms to me this is unavoidable, as other options, are either breaking (overlo=
ading) or still code changing (pick member always) and almost certainly mor=
e surprising, yet hides like this are something new.</div><div><br></div><d=
iv><br></div><div>Comments are welcome, I might write a proposal to give th=
is feature another go.</div><div>I personally can't decide for myself i=
f I want full UFC or just a way to call functions using member access synta=
x.</div></div></span><span><font color=3D"#888888"><span>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span><br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/dd460620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org</a>.<br>
</span></font></span></blockquote></div><br></div>
</blockquote></div><span>
<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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<br></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org</a>.<br>
</blockquote></div><br></div></blockquote><div><br></div><div><br></div><di=
v>In any case, I investigated the UFCS situation further and, to my surpris=
e, it turned out, in its last stages only f(x,y) calling x.f(y) was conside=
red.</div><div>I wonder, were all the people asking for UFCS at CppConn las=
t year even aware of that! One can read more <a href=3D"https://isocpp.org/=
blog/2016/02/a-bit-of-background-for-the-unified-call-proposal" rel=3D"nofo=
llow" target=3D"_blank">here</a> and <a href=3D"http://www.open-std.org/JTC=
1/SC22/WG21/docs/papers/2016/n4586.pdf" rel=3D"nofollow" target=3D"_blank">=
here</a> (n4586, search down for "unified").</div><div><br></div>=
<div>Aside from the fact literally no one has ever requested <span style=3D=
"display:inline!important;float:none;background-color:transparent;color:rgb=
(34,34,34);font-family:"Arial","Helvetica",sans-serif;f=
ont-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-=
spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-tr=
ansform:none;white-space:normal;word-spacing:0px">f(x,y) calling x.f(y), fo=
r obvious reasons, and the only people to whom it is useful are library wri=
ters, I am not surprised at all that even that was not accepted.</span></di=
v><div><span style=3D"display:inline!important;float:none;background-color:=
transparent;color:rgb(34,34,34);font-family:"Arial","Helveti=
ca",sans-serif;font-size:13px;font-style:normal;font-variant:normal;fo=
nt-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;te=
xt-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Hell=
, even Bjarne <a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers=
/2015/p0131r0.pdf" rel=3D"nofollow" target=3D"_blank">says</a> </span><span=
style=3D"text-align:left;color:rgb(34,34,34);text-transform:none;text-inde=
nt:0px;letter-spacing:normal;font-family:"Arial","Helvetica&=
quot;,sans-serif;font-size:13px;font-variant:normal;font-weight:400;text-de=
coration:none;word-spacing:0px;display:inline!important;white-space:normal;=
float:none;background-color:transparent"><i>"People who fear side effe=
cts from generalization might then prefer x.f(y)<span style=3D"text-align:l=
eft;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:=
normal;font-family:"Arial","Helvetica",sans-serif;font-=
size:13px;font-variant:normal;font-weight:400;text-decoration:none;word-spa=
cing:0px;display:inline!important;white-space:normal;float:none;background-=
color:transparent"> [to generalize]</span> because it is more restrictive&q=
uot;.</i><br></span></div><div><br></div><div>Indeed, the possibility tor t=
rivially hide a class member function, is not pretty indeed.=C2=A0</div><di=
v><br></div><div><br></div><div>With all that said, I still believe there i=
s hope. In n4586, it is noted<i> "Spicer liked the goal of the proposa=
l, but wanted opt-in which would then consider members and non-members equa=
lly in an overload set."</i></div><div>and <i>"Yasskin said he=E2=
=80=99d feel more comfortable being able to see the feature in use for a lo=
ng period of time, and would feel more comfortable seeing it in a TS. "=
;</i></div><div><i><br></i></div><div>These are doable. We introduce UFCS a=
s a scoped, user-side opt-in which will bring both free and member function=
s into one overloading set.</div><div><br></div><div><font face=3D"courier =
new,monospace">struct C</font></div><div><font face=3D"courier new,monospac=
e">{</font></div><div><font face=3D"courier new,monospace">=C2=A0 void func=
(double) {}</font></div><div><font face=3D"courier new,monospace">};</font>=
</div><div><font face=3D"courier new,monospace"></font><br></div><div><font=
face=3D"courier new,monospace">// user</font></div><div><font face=3D"cour=
ier new,monospace"></font><br></div><div><font face=3D"courier new,monospac=
e">void f(C& c)</font></div><div><font face=3D"courier new,monospace">{=
</font></div><div><font face=3D"courier new,monospace">=C2=A0 using C::func=
; //< bring func into the overloading set=C2=A0</font></div><div><font f=
ace=3D"courier new,monospace"></font><br></div><div><font face=3D"courier n=
ew,monospace">=C2=A0 func(c, -1);</font></div><div><font face=3D"courier ne=
w,monospace">}</font></div></div></blockquote><div><br></div></div></div></=
blockquote><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div di=
r=3D"ltr"><div class=3D"gmail_quote"><div></div><div>This makes a lot of se=
nse. Perhaps there is a way to provide free-function overloads which can be=
replaced by specific free functions, without any concerns about backward c=
ompatibility:</div><div><br></div><div><font face=3D"monospace, monospace">=
struct Foo {</font></div><div><font face=3D"monospace, monospace">=C2=A0 bo=
ol empty() const;</font></div><div><font face=3D"monospace, monospace">=C2=
=A0 std::size_t size() const;</font></div><div><font face=3D"monospace, mon=
ospace">};</font></div><div><font face=3D"monospace, monospace"><br></font>=
</div><div><font face=3D"monospace, monospace">using auto Foo::*;=C2=A0 =C2=
=A0// bring all public member functions of Foo into the outer namespace as =
free functions</font></div><div><font face=3D"monospace, monospace"><br></f=
ont></div><div><font face=3D"monospace, monospace">// but with lower 'w=
eight' than an actual free function declaration:</font></div><div><font=
face=3D"monospace, monospace">std::size_t size(Foo const& f);=C2=A0 =
=C2=A0 // auto-synthesised Foo::size(Foo const&) is now hidden in prefe=
rence to ::size(Foo const&)</font></div></div></div></blockquote><div><=
br></div><div><br></div><div>Richard, this is the behavior suggested under =
UFCS, but was rejected. Here is <a href=3D"https://www.reddit.com/r/cpp/com=
ments/4d19gk/awesome_wg21_paper_about_alternative_unified_call/d1uqkpz" tar=
get=3D"_blank">a great example why</a><font color=3D"#004000">.</font> =C2=
=A0</div></div></blockquote><div><br></div><div>You mean we lost the chance=
to gain an important, amazing language feature for the sake of one unimagi=
native luddite who has a code base so ancient that he's unlikely to eve=
r actually switch on the -std=3Dc++20 feature at all?</div><div><br></div><=
div>This is why we can't have nice things. The ridiculous idea that eve=
rything in a new version of X must be compatible with every previous versio=
n of X has been the bane of the computing industry since the demon-spawn of=
MSDOS.</div><div><br></div><div>=C2=A0</div><blockquote class=3D"gmail_quo=
te" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"=
><div dir=3D"ltr"><div><br></div><div>What we want is for local <font face=
=3D"courier new,monospace">size</font> <i>not to</i> hide. If the user want=
s to hide he should use a qualified called, so to be explicit.=C2=A0</div><=
div><br></div><div>This will match current behavior.=C2=A0</div><div><br></=
div><div>Currently, if the user wants to hide, he must use a free standing =
function which will force him to be explicit on the call site by changing t=
he call syntax</div><div><font face=3D"courier new,monospace"><br></font></=
div><div><font face=3D"arial,sans-serif">from</font><font face=3D"courier n=
ew,monospace"> f.size() <font face=3D"arial,sans-serif">to</font> size(f)</=
font></div><div><font face=3D"courier new,monospace"></font><br></div><div>=
In the unified world, if the user wants to hide, he must again change the c=
all syntax, this time</div><div><br></div><div>from <font face=3D"courier n=
ew,monospace">size(f) </font><font face=3D"arial,sans-serif">to</font><font=
face=3D"courier new,monospace"> ::size(f)</font></div><div><font face=3D"c=
ourier new,monospace"></font>=C2=A0</div><div><br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc s=
olid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_quote"><div><br=
></div><div><br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div =
dir=3D"ltr"><div><font face=3D"courier new,monospace"><br></font></div><div=
><font face=3D"arial,sans-serif">Now, if someone adds=C2=A0</font></div><di=
v><font face=3D"courier new,monospace"><font face=3D"arial,sans-serif"></fo=
nt><br></font></div><div><font face=3D"courier new,monospace"><span style=
=3D"text-align:left;text-transform:none;text-indent:0px;letter-spacing:norm=
al;font-family:courier new,monospace;font-size:13px;font-style:normal;font-=
variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;displa=
y:inline!important;white-space:normal;float:none;background-color:transpare=
nt">void func(C&, size_t);</span></font></div><div><font face=3D"courie=
r new,monospace"><b></b><i></i><u></u><sub></sub><sup></sup><strike></strik=
e><br></font></div><div><font face=3D"arial,sans-serif">By </font><font fac=
e=3D"arial,sans-serif"><a href=3D"http://www.open-std.org/jtc1/sc22/wg21/do=
cs/papers/2016/p0301r0.html" rel=3D"nofollow" target=3D"_blank">the current=
rules</a> this will <i>hide</i> the member function, but now the condition=
is an error as the call to func is ambiguous.</font></div><div><font face=
=3D"arial,sans-serif"><br></font></div><div><font face=3D"arial,sans-serif"=
><div>(Needless to say, the above could be used in the future not to <i>ena=
ble</i>=C2=A0<span>UFCS, but to <i style=3D"border-bottom-color:rgb(34,34,3=
4);border-bottom-style:none;border-bottom-width:0px;border-left-color:rgb(3=
4,34,34);border-left-style:none;border-left-width:0px;border-right-color:rg=
b(34,34,34);border-right-style:none;border-right-width:0px;border-top-color=
:rgb(34,34,34);border-top-style:none;border-top-width:0px;margin-bottom:0px=
;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding=
-left:0px;padding-right:0px;padding-top:0px">override</i> the rules.)</span=
><br></div></font></div><div><font face=3D"arial,sans-serif"><b></b><i></i>=
<u></u><sub></sub><sup></sup><strike></strike><br></font></div><div>In n458=
6 it says <i>"...Some people wanted additional opt-in mechanisms to en=
able the new behavior, which was discussed in great detail, but rejected&qu=
ot;</i><i><br></i></div><div>What were those opt-ins? Was something like th=
is considered, or the opt-ins were on the declaration side (be it on the me=
mber/class or function) or on the call site?</div><div><br></div><div><br><=
/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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</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/7464c9ca-3079-4619-9db0-c993dba7a8b6%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/7464c9ca-3079-4619-9db0-c993dba7a8b6%40isocpp.org</a>.<br>
</blockquote></div></div>
</blockquote></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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/9e1318cb-4f04-4e26-a630-ce4b41363d19%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4f04-=
4e26-a630-ce4b41363d19%40isocpp.org</a>.<br>
</blockquote></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/CALvx3hZur%3D15q5xo7pfk5mZj35WQW_32bY=
WHwzNiez%2BYgQ%2B7NA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALvx3hZur%=
3D15q5xo7pfk5mZj35WQW_32bYWHwzNiez%2BYgQ%2B7NA%40mail.gmail.com</a>.<br />
--00000000000076897b0573124d4a--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Fri, 10 Aug 2018 13:38:07 +0300
Raw View
On 10 August 2018 at 13:35, Richard Hodges <hodges.r@gmail.com> wrote:
>> Richard, this is the behavior suggested under UFCS, but was rejected. Here
>> is a great example why.
>
>
> You mean we lost the chance to gain an important, amazing language feature
> for the sake of one unimaginative luddite who has a code base so ancient
> that he's unlikely to ever actually switch on the -std=c++20 feature at all?
No, that's not what he means.
> This is why we can't have nice things. The ridiculous idea that everything
You can't have nice things because you do absolutely nothing to get nice things.
> in a new version of X must be compatible with every previous version of X
> has been the bane of the computing industry since the demon-spawn of MSDOS.
There's nothing ridiculous about backwards-compatibility in a serious
programming language.
--
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/CAFk2RUYg-NsRtexyt%2BQozb6gypxd1MLn2F%3Di4rv%2Bw7CXdZzpZg%40mail.gmail.com.
.
Author: Richard Hodges <hodges.r@gmail.com>
Date: Fri, 10 Aug 2018 12:59:12 +0100
Raw View
--00000000000082109f05731379ee
Content-Type: text/plain; charset="UTF-8"
On Fri, 10 Aug 2018 at 11:38, Ville Voutilainen <ville.voutilainen@gmail.com>
wrote:
> On 10 August 2018 at 13:35, Richard Hodges <hodges.r@gmail.com> wrote:
> >> Richard, this is the behavior suggested under UFCS, but was rejected.
> Here
> >> is a great example why.
> >
> >
> > You mean we lost the chance to gain an important, amazing language
> feature
> > for the sake of one unimaginative luddite who has a code base so ancient
> > that he's unlikely to ever actually switch on the -std=c++20 feature at
> all?
>
> No, that's not what he means.
>
> This is why we can't have nice things. The ridiculous idea that everything
>
> You can't have nice things because you do absolutely nothing to get nice
> things.
>
Every nice thing proposed since c++14 is either shot down or mutilated to
the point of uselessness by committee.
> > in a new version of X must be compatible with every previous version of X
> > has been the bane of the computing industry since the demon-spawn of
> MSDOS.
>
> There's nothing ridiculous about backwards-compatibility in a serious
> programming language.
>
This is as wrong as "There's nothing ridiculous about deciding whether to
go to war by inspecting the entrails of a chicken. We've always done that."
Progress sometimes means breaking with the traditions of our primitive
ancestors.
Once upon a time we believed that OO was the future. Then we discovered
functional and generic programming, which turned out to be more powerful,
particularly when lightly flavoured with OO.
It's time to accept that and move forward.
>
> --
> 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/CAFk2RUYg-NsRtexyt%2BQozb6gypxd1MLn2F%3Di4rv%2Bw7CXdZzpZg%40mail.gmail.com
> .
>
--
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/CALvx3hYGJjYEj__%3DzjZ5AsmQrHwL0ZtmAqaGUma_iye8k%2BXLDw%40mail.gmail.com.
--00000000000082109f05731379ee
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri=
, 10 Aug 2018 at 11:38, Ville Voutilainen <<a href=3D"mailto:ville.vouti=
lainen@gmail.com">ville.voutilainen@gmail.com</a>> wrote:<br></div><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #cc=
c solid;padding-left:1ex">On 10 August 2018 at 13:35, Richard Hodges <<a=
href=3D"mailto:hodges.r@gmail.com" target=3D"_blank">hodges.r@gmail.com</a=
>> wrote:<br>
>> Richard, this is the behavior suggested under UFCS, but was reject=
ed. Here<br>
>> is a great example why.<br>
><br>
><br>
> You mean we lost the chance to gain an important, amazing language fea=
ture<br>
> for the sake of one unimaginative luddite who has a code base so ancie=
nt<br>
> that he's unlikely to ever actually switch on the -std=3Dc++20 fea=
ture at all?<br>
<br>
No, that's not what he means.<br></blockquote><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex">> This is why we can't have nice things. The ridiculous idea t=
hat everything<br>
<br>
You can't have nice things because you do absolutely nothing to get nic=
e things.<br></blockquote><div><br></div><div>Every nice thing proposed sin=
ce c++14 is either shot down or mutilated to the point of uselessness by co=
mmittee.=C2=A0</div><div><br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> in a new version of X must be compatible with every previous version o=
f X<br>
> has been the bane of the computing industry since the demon-spawn of M=
SDOS.<br>
<br>
There's nothing ridiculous about backwards-compatibility in a serious<b=
r>
programming language.<br></blockquote><div><br></div><div>This is as wrong =
as "There's nothing ridiculous about deciding whether to go to war=
by inspecting the entrails of a chicken. We've always done that."=
</div><div><br></div><div>Progress sometimes means breaking with the tradit=
ions of our primitive ancestors.=C2=A0</div><div><br></div><div>Once upon a=
time we believed that OO was the future. Then we discovered functional and=
generic programming, which turned out to be more powerful, particularly wh=
en lightly flavoured with OO.</div><div><br></div><div>It's time to acc=
ept that and move forward.</div><div><br></div><div>=C2=A0</div><blockquote=
class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc soli=
d;padding-left:1ex">
<br>
-- <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%2Bunsubscribe@isocpp.org" target=3D=
"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/CAFk2RUYg-NsRtexyt%2BQozb6gypxd1MLn2F=
%3Di4rv%2Bw7CXdZzpZg%40mail.gmail.com" rel=3D"noreferrer" target=3D"_blank"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFk2RUYg-NsR=
texyt%2BQozb6gypxd1MLn2F%3Di4rv%2Bw7CXdZzpZg%40mail.gmail.com</a>.<br>
</blockquote></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/CALvx3hYGJjYEj__%3DzjZ5AsmQrHwL0ZtmAq=
aGUma_iye8k%2BXLDw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALvx3hYGJjYE=
j__%3DzjZ5AsmQrHwL0ZtmAqaGUma_iye8k%2BXLDw%40mail.gmail.com</a>.<br />
--00000000000082109f05731379ee--
.
Author: florian.csdt@gmail.com
Date: Fri, 10 Aug 2018 05:11:05 -0700 (PDT)
Raw View
------=_Part_754_1064974645.1533903065715
Content-Type: multipart/alternative;
boundary="----=_Part_755_1569833545.1533903065715"
------=_Part_755_1569833545.1533903065715
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Le vendredi 10 ao=C3=BBt 2018 13:59:25 UTC+2, Richard Hodges a =C3=A9crit :
>
>
>
> On Fri, 10 Aug 2018 at 11:38, Ville Voutilainen <ville.vo...@gmail.com=20
> <javascript:>> wrote:
>
>> On 10 August 2018 at 13:35, Richard Hodges <hodg...@gmail.com=20
>> <javascript:>> wrote:
>> >> Richard, this is the behavior suggested under UFCS, but was rejected.=
=20
>> Here
>> >> is a great example why.
>> >
>> >
>> > You mean we lost the chance to gain an important, amazing language=20
>> feature
>> > for the sake of one unimaginative luddite who has a code base so ancie=
nt
>> > that he's unlikely to ever actually switch on the -std=3Dc++20 feature=
at=20
>> all?
>>
>> No, that's not what he means.
>>
> > This is why we can't have nice things. The ridiculous idea that=20
>> everything
>>
>> You can't have nice things because you do absolutely nothing to get nice=
=20
>> things.
>>
>
> Every nice thing proposed since c++14 is either shot down or mutilated to=
=20
> the point of uselessness by committee.=20
>
>
>> > in a new version of X must be compatible with every previous version o=
f=20
>> X
>> > has been the bane of the computing industry since the demon-spawn of=
=20
>> MSDOS.
>>
>> There's nothing ridiculous about backwards-compatibility in a serious
>> programming language.
>>
>
> This is as wrong as "There's nothing ridiculous about deciding whether to=
=20
> go to war by inspecting the entrails of a chicken. We've always done that=
.."
>
> Progress sometimes means breaking with the traditions of our primitive=20
> ancestors.=20
>
> Once upon a time we believed that OO was the future. Then we discovered=
=20
> functional and generic programming, which turned out to be more powerful,=
=20
> particularly when lightly flavoured with OO.
>
> It's time to accept that and move forward.
>
>
Breaking changes make people moving away from your language, not the=20
opposite.
Have you ever wondered why x86_64 is so successful? Why ia64 was dead at=20
birth?
One is fully compatible with its predecessor. The other was not.
--=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/b2fee3f3-ceb0-4ca3-a972-b842f03b5764%40isocpp.or=
g.
------=_Part_755_1569833545.1533903065715
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>Le vendredi 10 ao=C3=BBt 2018 13:59:25 UTC+2, Rich=
ard Hodges a =C3=A9crit=C2=A0:<blockquote class=3D"gmail_quote" style=3D"ma=
rgin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">=
<div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri=
, 10 Aug 2018 at 11:38, Ville Voutilainen <<a href=3D"javascript:" targe=
t=3D"_blank" gdf-obfuscated-mailto=3D"S4dIITs7DQAJ" rel=3D"nofollow" onmous=
edown=3D"this.href=3D'javascript:';return true;" onclick=3D"this.hr=
ef=3D'javascript:';return true;">ville.vo...@gmail.com</a>> wrot=
e:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex">On 10 August 2018 at 13:35, Rich=
ard Hodges <<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mai=
lto=3D"S4dIITs7DQAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D'javas=
cript:';return true;" onclick=3D"this.href=3D'javascript:';retu=
rn true;">hodg...@gmail.com</a>> wrote:<br>
>> Richard, this is the behavior suggested under UFCS, but was reject=
ed. Here<br>
>> is a great example why.<br>
><br>
><br>
> You mean we lost the chance to gain an important, amazing language fea=
ture<br>
> for the sake of one unimaginative luddite who has a code base so ancie=
nt<br>
> that he's unlikely to ever actually switch on the -std=3Dc++20 fea=
ture at all?<br>
<br>
No, that's not what he means.<br></blockquote><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex">> This is why we can't have nice things. The ridiculous idea t=
hat everything<br>
<br>
You can't have nice things because you do absolutely nothing to get nic=
e things.<br></blockquote><div><br></div><div>Every nice thing proposed sin=
ce c++14 is either shot down or mutilated to the point of uselessness by co=
mmittee.=C2=A0</div><div><br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> in a new version of X must be compatible with every previous version o=
f X<br>
> has been the bane of the computing industry since the demon-spawn of M=
SDOS.<br>
<br>
There's nothing ridiculous about backwards-compatibility in a serious<b=
r>
programming language.<br></blockquote><div><br></div><div>This is as wrong =
as "There's nothing ridiculous about deciding whether to go to war=
by inspecting the entrails of a chicken. We've always done that."=
</div><div><br></div><div>Progress sometimes means breaking with the tradit=
ions of our primitive ancestors.=C2=A0</div><div><br></div><div>Once upon a=
time we believed that OO was the future. Then we discovered functional and=
generic programming, which turned out to be more powerful, particularly wh=
en lightly flavoured with OO.</div><div><br></div><div>It's time to acc=
ept that and move forward.</div><br></div></div></blockquote><div><br></div=
><div>Breaking changes make people moving away from your language, not the =
opposite.</div><div><br></div><div>Have you ever wondered why x86_64 is so =
successful? Why ia64 was dead at birth?</div><div>One is fully compatible w=
ith its predecessor. The other was not.<br></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/b2fee3f3-ceb0-4ca3-a972-b842f03b5764%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/b2fee3f3-ceb0-4ca3-a972-b842f03b5764=
%40isocpp.org</a>.<br />
------=_Part_755_1569833545.1533903065715--
------=_Part_754_1064974645.1533903065715--
.
Author: Richard Hodges <hodges.r@gmail.com>
Date: Fri, 10 Aug 2018 13:23:20 +0100
Raw View
--000000000000d70d36057313cf47
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Fri, 10 Aug 2018 at 13:11, <florian.csdt@gmail.com> wrote:
>
>
> Le vendredi 10 ao=C3=BBt 2018 13:59:25 UTC+2, Richard Hodges a =C3=A9crit=
:
>>
>>
>>
>> On Fri, 10 Aug 2018 at 11:38, Ville Voutilainen <ville.vo...@gmail.com>
>> wrote:
>>
>>> On 10 August 2018 at 13:35, Richard Hodges <hodg...@gmail.com> wrote:
>>> >> Richard, this is the behavior suggested under UFCS, but was rejected=
..
>>> Here
>>> >> is a great example why.
>>> >
>>> >
>>> > You mean we lost the chance to gain an important, amazing language
>>> feature
>>> > for the sake of one unimaginative luddite who has a code base so
>>> ancient
>>> > that he's unlikely to ever actually switch on the -std=3Dc++20 featur=
e
>>> at all?
>>>
>>> No, that's not what he means.
>>>
>> > This is why we can't have nice things. The ridiculous idea that
>>> everything
>>>
>>> You can't have nice things because you do absolutely nothing to get nic=
e
>>> things.
>>>
>>
>> Every nice thing proposed since c++14 is either shot down or mutilated t=
o
>> the point of uselessness by committee.
>>
>>
>>> > in a new version of X must be compatible with every previous version
>>> of X
>>> > has been the bane of the computing industry since the demon-spawn of
>>> MSDOS.
>>>
>>> There's nothing ridiculous about backwards-compatibility in a serious
>>> programming language.
>>>
>>
>> This is as wrong as "There's nothing ridiculous about deciding whether t=
o
>> go to war by inspecting the entrails of a chicken. We've always done tha=
t."
>>
>> Progress sometimes means breaking with the traditions of our primitive
>> ancestors.
>>
>> Once upon a time we believed that OO was the future. Then we discovered
>> functional and generic programming, which turned out to be more powerful=
,
>> particularly when lightly flavoured with OO.
>>
>> It's time to accept that and move forward.
>>
>>
> Breaking changes make people moving away from your language, not the
> opposite.
>
> Have you ever wondered why x86_64 is so successful? Why ia64 was dead at
> birth?
> One is fully compatible with its predecessor. The other was not.
>
Swift and .net have been through numerous breaking changes between
versions. This did nothing to dampen enthusiasm for them amongst the user
community.
The answer to this is tooling to help version transitions.
Yes I know that -std=3Dc++xxx are not versions. This is the problem. They
should be.
If I up the version of the language of my project, I am happy to accept
that there may be a little conversion work in order to bring me into the
newly empowered brave new world.
This conversion work is vastly preferable to the technical debt remaining
from 1972 and 1979, when Mssrs Kernighan, Ritchie and Stroustrup were still
feeling their way through the dark.
> --
> 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/b2fee3f3-ceb=
0-4ca3-a972-b842f03b5764%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/b2fee3f3-ce=
b0-4ca3-a972-b842f03b5764%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>
--=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/CALvx3haW7MHjTT3KYXGU1Eb49v7icU6m9mfnE3z%3DPb7Tx=
M%2BT6Q%40mail.gmail.com.
--000000000000d70d36057313cf47
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri=
, 10 Aug 2018 at 13:11, <<a href=3D"mailto:florian.csdt@gmail.com">flori=
an.csdt@gmail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote"=
style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><d=
iv dir=3D"ltr"><br><br>Le vendredi 10 ao=C3=BBt 2018 13:59:25 UTC+2, Richar=
d Hodges a =C3=A9crit=C2=A0:<blockquote class=3D"gmail_quote" style=3D"marg=
in:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div di=
r=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri, 10 Au=
g 2018 at 11:38, Ville Voutilainen <<a rel=3D"nofollow">ville.vo...@gmai=
l.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 10 August 2=
018 at 13:35, Richard Hodges <<a rel=3D"nofollow">hodg...@gmail.com</a>&=
gt; wrote:<br>
>> Richard, this is the behavior suggested under UFCS, but was reject=
ed. Here<br>
>> is a great example why.<br>
><br>
><br>
> You mean we lost the chance to gain an important, amazing language fea=
ture<br>
> for the sake of one unimaginative luddite who has a code base so ancie=
nt<br>
> that he's unlikely to ever actually switch on the -std=3Dc++20 fea=
ture at all?<br>
<br>
No, that's not what he means.<br></blockquote><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex">> This is why we can't have nice things. The ridiculous idea t=
hat everything<br>
<br>
You can't have nice things because you do absolutely nothing to get nic=
e things.<br></blockquote><div><br></div><div>Every nice thing proposed sin=
ce c++14 is either shot down or mutilated to the point of uselessness by co=
mmittee.=C2=A0</div><div><br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> in a new version of X must be compatible with every previous version o=
f X<br>
> has been the bane of the computing industry since the demon-spawn of M=
SDOS.<br>
<br>
There's nothing ridiculous about backwards-compatibility in a serious<b=
r>
programming language.<br></blockquote><div><br></div><div>This is as wrong =
as "There's nothing ridiculous about deciding whether to go to war=
by inspecting the entrails of a chicken. We've always done that."=
</div><div><br></div><div>Progress sometimes means breaking with the tradit=
ions of our primitive ancestors.=C2=A0</div><div><br></div><div>Once upon a=
time we believed that OO was the future. Then we discovered functional and=
generic programming, which turned out to be more powerful, particularly wh=
en lightly flavoured with OO.</div><div><br></div><div>It's time to acc=
ept that and move forward.</div><br></div></div></blockquote><div><br></div=
><div>Breaking changes make people moving away from your language, not the =
opposite.</div><div><br></div><div>Have you ever wondered why x86_64 is so =
successful? Why ia64 was dead at birth?</div><div>One is fully compatible w=
ith its predecessor. The other was not.<br></div></div></blockquote><div><b=
r></div><div>Swift and .net have been through numerous breaking changes bet=
ween versions. This did nothing to dampen enthusiasm for them amongst the u=
ser community.</div><div><br></div><div>The answer to this is tooling to he=
lp version transitions.</div><div><br></div><div>Yes I know that -std=3Dc++=
xxx are not versions. This is the problem. They should be.=C2=A0</div><div>=
<br></div><div>If I up the version of the language of my project, I am happ=
y to accept that there may be a little conversion work in order to bring me=
into the newly empowered brave new world.</div><div><br></div><div>This co=
nversion work is vastly preferable to the technical debt remaining from 197=
2 and 1979, when Mssrs Kernighan, Ritchie and Stroustrup were still feeling=
their way through the dark.</div><div><br></div><div>=C2=A0</div><blockquo=
te class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc so=
lid;padding-left:1ex"><div dir=3D"ltr"><div></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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/b2fee3f3-ceb0-4ca3-a972-b842f03b5764%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/b2fee3f3-ceb0-=
4ca3-a972-b842f03b5764%40isocpp.org</a>.<br>
</blockquote></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/CALvx3haW7MHjTT3KYXGU1Eb49v7icU6m9mfn=
E3z%3DPb7TxM%2BT6Q%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALvx3haW7MHj=
TT3KYXGU1Eb49v7icU6m9mfnE3z%3DPb7TxM%2BT6Q%40mail.gmail.com</a>.<br />
--000000000000d70d36057313cf47--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Fri, 10 Aug 2018 15:26:04 +0300
Raw View
On 10 August 2018 at 15:23, Richard Hodges <hodges.r@gmail.com> wrote:
>> Breaking changes make people moving away from your language, not the
>> opposite.
>>
>> Have you ever wondered why x86_64 is so successful? Why ia64 was dead at
>> birth?
>> One is fully compatible with its predecessor. The other was not.
>
>
> Swift and .net have been through numerous breaking changes between versions.
> This did nothing to dampen enthusiasm for them amongst the user community.
There's plenty of evidence against that claim.
> The answer to this is tooling to help version transitions.
Tooling doesn't solve version incompatibilities as long as the
old-version code still needs to be around.
> If I up the version of the language of my project, I am happy to accept that
> there may be a little conversion work in order to bring me into the newly
> empowered brave new world.
You are not the target audience of backwards compatibility; that
target audience is rather larger,
and in some ways more significant.
--
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/CAFk2RUY%2BHFNdjX4egb%3DGgfEgVu3kt3nhtLWo0LEeMTGTcfjTmQ%40mail.gmail.com.
.
Author: Richard Hodges <hodges.r@gmail.com>
Date: Fri, 10 Aug 2018 13:45:46 +0100
Raw View
--0000000000000d66470573142077
Content-Type: text/plain; charset="UTF-8"
On Fri, 10 Aug 2018 at 13:26, Ville Voutilainen <ville.voutilainen@gmail.com>
wrote:
> On 10 August 2018 at 15:23, Richard Hodges <hodges.r@gmail.com> wrote:
> >> Breaking changes make people moving away from your language, not the
> >> opposite.
> >>
> >> Have you ever wondered why x86_64 is so successful? Why ia64 was dead at
> >> birth?
> >> One is fully compatible with its predecessor. The other was not.
> >
> >
> > Swift and .net have been through numerous breaking changes between
> versions.
> > This did nothing to dampen enthusiasm for them amongst the user
> community.
>
> There's plenty of evidence against that claim.
>
> > The answer to this is tooling to help version transitions.
>
> Tooling doesn't solve version incompatibilities as long as the
> old-version code still needs to be around.
>
> > If I up the version of the language of my project, I am happy to accept
> that
> > there may be a little conversion work in order to bring me into the newly
> > empowered brave new world.
>
> You are not the target audience of backwards compatibility; that
> target audience is rather larger,
> and in some ways more significant.
>
>
The inevitable result of pandering to old users who are comfortable with
ancient practices is that you will not acquire new users, who demand modern
ones.
> --
> 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/CAFk2RUY%2BHFNdjX4egb%3DGgfEgVu3kt3nhtLWo0LEeMTGTcfjTmQ%40mail.gmail.com
> .
>
--
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/CALvx3hawe8-VHg45-j-dyB7EQTH8GqTE5BpVk6v7c12VLJ2Cng%40mail.gmail.com.
--0000000000000d66470573142077
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri=
, 10 Aug 2018 at 13:26, Ville Voutilainen <<a href=3D"mailto:ville.vouti=
lainen@gmail.com">ville.voutilainen@gmail.com</a>> wrote:<br></div><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #cc=
c solid;padding-left:1ex">On 10 August 2018 at 15:23, Richard Hodges <<a=
href=3D"mailto:hodges.r@gmail.com" target=3D"_blank">hodges.r@gmail.com</a=
>> wrote:<br>
>> Breaking changes make people moving away from your language, not t=
he<br>
>> opposite.<br>
>><br>
>> Have you ever wondered why x86_64 is so successful? Why ia64 was d=
ead at<br>
>> birth?<br>
>> One is fully compatible with its predecessor. The other was not.<b=
r>
><br>
><br>
> Swift and .net have been through numerous breaking changes between ver=
sions.<br>
> This did nothing to dampen enthusiasm for them amongst the user commun=
ity.<br>
<br>
There's plenty of evidence against that claim.<br>
<br>
> The answer to this is tooling to help version transitions.<br>
<br>
Tooling doesn't solve version incompatibilities as long as the<br>
old-version code still needs to be around.<br>
<br>
> If I up the version of the language of my project, I am happy to accep=
t that<br>
> there may be a little conversion work in order to bring me into the ne=
wly<br>
> empowered brave new world.<br>
<br>
You are not the target audience of backwards compatibility; that<br>
target audience is rather larger,<br>
and in some ways more significant.<br>
<br></blockquote><div><br></div><div>The inevitable result of pandering to =
old users who are comfortable with ancient practices is that you will not a=
cquire new users, who demand modern ones.=C2=A0</div><div>=C2=A0<br></div><=
blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px=
#ccc solid;padding-left:1ex">
-- <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%2Bunsubscribe@isocpp.org" target=3D=
"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/CAFk2RUY%2BHFNdjX4egb%3DGgfEgVu3kt3nh=
tLWo0LEeMTGTcfjTmQ%40mail.gmail.com" rel=3D"noreferrer" target=3D"_blank">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFk2RUY%2BHFNd=
jX4egb%3DGgfEgVu3kt3nhtLWo0LEeMTGTcfjTmQ%40mail.gmail.com</a>.<br>
</blockquote></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/CALvx3hawe8-VHg45-j-dyB7EQTH8GqTE5BpV=
k6v7c12VLJ2Cng%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALvx3hawe8-VHg45=
-j-dyB7EQTH8GqTE5BpVk6v7c12VLJ2Cng%40mail.gmail.com</a>.<br />
--0000000000000d66470573142077--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Fri, 10 Aug 2018 15:50:31 +0300
Raw View
On 10 August 2018 at 14:59, Richard Hodges <hodges.r@gmail.com> wrote:
> Every nice thing proposed since c++14 is either shot down or mutilated to
> the point of uselessness by committee.
That opinion hasn't been conveyed to the committee.
>> There's nothing ridiculous about backwards-compatibility in a serious
>> programming language.
> This is as wrong as "There's nothing ridiculous about deciding whether to go
> to war by inspecting the entrails of a chicken. We've always done that."
That conjecture has nothing to do with backwards-compatibility in a
serious programming language.
> Progress sometimes means breaking with the traditions of our primitive
> ancestors.
Sometimes it does, when there's a good rationale for it. That
rationale doesn't constitute of
"we broke your valid code that you use for important things because we
thought we have
a modern replacement, which by the way you can't use".
> Once upon a time we believed that OO was the future. Then we discovered
> functional and generic programming, which turned out to be more powerful,
> particularly when lightly flavoured with OO.
>
> It's time to accept that and move forward.
It takes more than ranting on this forum to effect such a change.
--
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/CAFk2RUZbf8pEUW1hGcCN8y24wV4d-u5qQE%3DOJBF_acroZScqcA%40mail.gmail.com.
.
Author: mihailnajdenov@gmail.com
Date: Fri, 10 Aug 2018 05:57:40 -0700 (PDT)
Raw View
------=_Part_774_2147112708.1533905860991
Content-Type: multipart/alternative;
boundary="----=_Part_775_42902644.1533905860993"
------=_Part_775_42902644.1533905860993
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Friday, August 10, 2018 at 1:35:31 PM UTC+3, Richard Hodges wrote:
>
>
>
> On Fri, 10 Aug 2018 at 09:01, <mihailn...@gmail.com <javascript:>> wrote:
>
>>
>>
>> On Thursday, August 9, 2018 at 11:47:08 AM UTC+3, Richard Hodges wrote:
>>>
>>>
>>>
>>> On Thu, 9 Aug 2018 at 10:05, <mihailn...@gmail.com> wrote:
>>>
>>>>
>>>>
>>>> On Wednesday, August 8, 2018 at 4:41:58 PM UTC+3, Olanrewaju Adetula=
=20
>>>> wrote:
>>>>>
>>>>> If by defining member function for example, an associated free=20
>>>>> function can be synthesized by the compiler or vice-versa, then we ca=
n call=20
>>>>> such function using either syntax.
>>>>>
>>>>>
>>>> I see, note however that if this is enabled it will be a breaking=20
>>>> change.
>>>> =20
>>>>
>>>>> On Mon, Aug 6, 2018 at 4:26 PM, <mihailn...@gmail.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula=20
>>>>>> wrote:
>>>>>>>
>>>>>>> Of course going full UCS introduces the mirror set of=20
>>>>>>>> vulnerability-to-change problems. If we can call members using fre=
e=20
>>>>>>>> standing, then these are either in competition or there is a prefe=
rred=20
>>>>>>>> call.=20
>>>>>>>> If there is a completion there is potential code break or code=20
>>>>>>>> change if suddenly the member is the better match, if there is a p=
referred=20
>>>>>>>> call, there is a potential silent code change.
>>>>>>>
>>>>>>> Or the type author can define one and the language synthesizes the=
=20
>>>>>>> other via opt-in. With that, it won't matter anymore which syntax i=
s used=20
>>>>>>> to invoke the function and any attempt to define any other will err=
or as a=20
>>>>>>> result of redeclaration.
>>>>>>>
>>>>>>>
>>>>>> Can you elaborate?=20
>>>>>> =20
>>>>>>
>>>>>>>
>>>>>>> On Mon, Aug 6, 2018 at 4:01 PM, <mihailn...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Forgot to mention the elephant in the room - this does not solve=
=20
>>>>>>>> the fundamental issue, how do we define concept requirements for a=
class,=20
>>>>>>>> is it in terms of member functions or in terms of free-standing on=
es.
>>>>>>>>
>>>>>>>> However, this can be a stepping stone towards UCS - after a period=
=20
>>>>>>>> of time we could make one of the two options the default.=20
>>>>>>>> It will be a non-breaking change, after which the syntax will be=
=20
>>>>>>>> used to let the user override the default behavior. =20
>>>>>>>>
>>>>>>>> Of course going full UCS introduces the mirror set of=20
>>>>>>>> vulnerability-to-change problems. If we can call members using fre=
e=20
>>>>>>>> standing, then these are either in competition or there is a prefe=
rred=20
>>>>>>>> call.=20
>>>>>>>> If there is a completion there is potential code break or code=20
>>>>>>>> change if suddenly the member is the better match, if there is a p=
referred=20
>>>>>>>> call, there is a potential silent code change.
>>>>>>>>
>>>>>>>> Silent code change is not so silent as it is not by the class=20
>>>>>>>> author but by the client code, introducing a free function can=20
>>>>>>>> *hide* a class member function, called as free function.
>>>>>>>> Seems to me this is unavoidable, as other options, are either=20
>>>>>>>> breaking (overloading) or still code changing (pick member always)=
and=20
>>>>>>>> almost certainly more surprising, yet hides like this are somethin=
g new.
>>>>>>>>
>>>>>>>>
>>>>>>>> Comments are welcome, I might write a proposal to give this featur=
e=20
>>>>>>>> another go.
>>>>>>>> I personally can't decide for myself if I want full UFC or just a=
=20
>>>>>>>> way to call functions using member access syntax.
>>>>>>>>
>>>>>>>> --=20
>>>>>>>> You received this message because you are subscribed to the Google=
=20
>>>>>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,=
=20
>>>>>>>> send an email to std-proposal...@isocpp.org.
>>>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>>>> To view this discussion on the web visit=20
>>>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460=
620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org=20
>>>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd46=
0620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_source=
=3Dfooter>
>>>>>>>> .
>>>>>>>>
>>>>>>>
>>>>>>> --=20
>>>>>> You received this message because you are subscribed to the Google=
=20
>>>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,=20
>>>>>> send an email to std-proposal...@isocpp.org.
>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>> To view this discussion on the web visit=20
>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99=
d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org=20
>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc9=
9d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=3Demail&utm_source=
=3Dfooter>
>>>>>> .
>>>>>>
>>>>>
>>>>>
>>>>
>>>> In any case, I investigated the UFCS situation further and, to my=20
>>>> surprise, it turned out, in its last stages only f(x,y) calling x.f(y)=
was=20
>>>> considered.
>>>> I wonder, were all the people asking for UFCS at CppConn last year eve=
n=20
>>>> aware of that! One can read more here=20
>>>> <https://isocpp.org/blog/2016/02/a-bit-of-background-for-the-unified-c=
all-proposal>=20
>>>> and here=20
>>>> <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/n4586.pdf>=20
>>>> (n4586, search down for "unified").
>>>>
>>>> Aside from the fact literally no one has ever requested f(x,y) calling=
=20
>>>> x.f(y), for obvious reasons, and the only people to whom it is useful =
are=20
>>>> library writers, I am not surprised at all that even that was not acce=
pted.
>>>> Hell, even Bjarne says=20
>>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0131r0.pdf> =
*"People=20
>>>> who fear side effects from generalization might then prefer x.f(y) [to=
=20
>>>> generalize] because it is more restrictive".*
>>>>
>>>> Indeed, the possibility tor trivially hide a class member function, is=
=20
>>>> not pretty indeed.=20
>>>>
>>>>
>>>> With all that said, I still believe there is hope. In n4586, it is not=
ed*=20
>>>> "Spicer liked the goal of the proposal, but wanted opt-in which would =
then=20
>>>> consider members and non-members equally in an overload set."*
>>>> and *"Yasskin said he=E2=80=99d feel more comfortable being able to se=
e the=20
>>>> feature in use for a long period of time, and would feel more comforta=
ble=20
>>>> seeing it in a TS. "*
>>>>
>>>> These are doable. We introduce UFCS as a scoped, user-side opt-in whic=
h=20
>>>> will bring both free and member functions into one overloading set.
>>>>
>>>> struct C
>>>> {
>>>> void func(double) {}
>>>> };
>>>>
>>>> // user
>>>>
>>>> void f(C& c)
>>>> {
>>>> using C::func; //< bring func into the overloading set=20
>>>>
>>>> func(c, -1);
>>>> }
>>>>
>>>
>>> =20
>>
>>> This makes a lot of sense. Perhaps there is a way to provide=20
>>> free-function overloads which can be replaced by specific free function=
s,=20
>>> without any concerns about backward compatibility:
>>>
>>> struct Foo {
>>> bool empty() const;
>>> std::size_t size() const;
>>> };
>>>
>>> using auto Foo::*; // bring all public member functions of Foo into=
=20
>>> the outer namespace as free functions
>>>
>>> // but with lower 'weight' than an actual free function declaration:
>>> std::size_t size(Foo const& f); // auto-synthesised Foo::size(Foo=20
>>> const&) is now hidden in preference to ::size(Foo const&)
>>>
>>
>>
>> Richard, this is the behavior suggested under UFCS, but was rejected.=20
>> Here is a great example why=20
>> <https://www.reddit.com/r/cpp/comments/4d19gk/awesome_wg21_paper_about_a=
lternative_unified_call/d1uqkpz>
>> . =20
>>
>
> You mean we lost the chance to gain an important, amazing language featur=
e=20
> for the sake of one unimaginative luddite who has a code base so ancient=
=20
> that he's unlikely to ever actually switch on the -std=3Dc++20 feature at=
all?
>
Richard, new code will be at risk. The moment someone changes x.f(y) to=20
f(x, y) he is no longer sure what is called as there *might* be some=20
'using' or even some co-worker "friendly wrapper" which hides the call.=20
Honestly, the risk of you or a co-worker breaking your code is the biggest=
=20
risk as there will be no namespace boundary: You refactor your code to use=
=20
some helper functions, but somewhere someone decided a method is not what=
=20
they want exactly and created a free function to use in its place, hiding=
=20
your call as well by incident.
And the sad part is, there will be no warning - why should it be? Isn't=20
this the expected behavior for free functions to hide members? Should the=
=20
co-worker be warned not to use free functions with the same name as=20
members?=20
Nasty situation, this is because we have lost intend by unifying the=20
syntax. Actually, it is not problem with the syntax - intend can be=20
expressed by qualified call - but the fact we had different defaults for so=
=20
long.
The other default is also not acceptable - to overload all. This will *both=
*=20
change (pick "better" overloaded) *and* break (redefinitions).=20
One might be able to fix the breakages, but the silent-and-correct changes=
=20
will be impossible to find and fix on a scale, not without rock-solid tools=
=20
we don't have (yet?).
Even then, will people be happy with the fact free functions now *always*=
=20
must be qualified in order to be "free"?=20
The only way out in foreseeable future (or probably ever) is an opt-in.
=20
=20
>
> This is why we can't have nice things. The ridiculous idea that everythin=
g=20
> in a new version of X must be compatible with every previous version of X=
=20
> has been the bane of the computing industry since the demon-spawn of MSDO=
S.
>
> =20
>
>>
>> What we want is for local size *not to* hide. If the user wants to hide=
=20
>> he should use a qualified called, so to be explicit.=20
>>
>> This will match current behavior.=20
>>
>> Currently, if the user wants to hide, he must use a free standing=20
>> function which will force him to be explicit on the call site by changin=
g=20
>> the call syntax
>>
>> from f.size() to size(f)
>>
>> In the unified world, if the user wants to hide, he must again change th=
e=20
>> call syntax, this time
>>
>> from size(f) to ::size(f)
>> =20
>>
>>
>>>
>>> =20
>>>
>>>>
>>>> Now, if someone adds=20
>>>>
>>>> void func(C&, size_t);
>>>>
>>>> By the current rules=20
>>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0301r0.html>=
=20
>>>> this will *hide* the member function, but now the condition is an=20
>>>> error as the call to func is ambiguous.
>>>>
>>>> (Needless to say, the above could be used in the future not to *enable=
*
>>>> UFCS, but to *override* the rules.)
>>>>
>>>> In n4586 it says *"...Some people wanted additional opt-in mechanisms=
=20
>>>> to enable the new behavior, which was discussed in great detail, but=
=20
>>>> rejected"*
>>>> What were those opt-ins? Was something like this considered, or the=20
>>>> opt-ins were on the declaration side (be it on the member/class or=20
>>>> function) or on the call site?
>>>>
>>>>
>>>> --=20
>>>> You received this message because you are subscribed to the Google=20
>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send=
=20
>>>> an email to std-proposal...@isocpp.org.
>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>> To view this discussion on the web visit=20
>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-=
3079-4619-9db0-c993dba7a8b6%40isocpp.org=20
>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca=
-3079-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium=3Demail&utm_source=3Df=
ooter>
>>>> .
>>>>
>>> --=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit=20
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4f=
04-4e26-a630-ce4b41363d19%40isocpp.org=20
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4=
f04-4e26-a630-ce4b41363d19%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoo=
ter>
>> .
>>
>
--=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/1eb57a3b-836f-4a6b-8842-b2196293d30f%40isocpp.or=
g.
------=_Part_775_42902644.1533905860993
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Friday, August 10, 2018 at 1:35:31 PM UTC+3, Ri=
chard Hodges wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;mar=
gin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D=
"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri, 10 Aug 20=
18 at 09:01, <<a onmousedown=3D"this.href=3D'javascript:';return=
true;" onclick=3D"this.href=3D'javascript:';return true;" href=3D"=
javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"86=
AUGac2DQAJ">mihailn...@gmail.com</a>> wrote:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex"><div dir=3D"ltr"><br><br>On Thursday, August 9, 2018 at 11:47=
:08 AM UTC+3, Richard Hodges wrote:<blockquote class=3D"gmail_quote" style=
=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"=
><div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Th=
u, 9 Aug 2018 at 10:05, <<a rel=3D"nofollow">mihailn...@gmail.com</a>>=
; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .=
8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><br>O=
n Wednesday, August 8, 2018 at 4:41:58 PM UTC+3, Olanrewaju Adetula wrote:<=
blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border=
-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">If by defining memb=
er function for example, an associated free function can be synthesized by =
the compiler or vice-versa, then we can call such function using either syn=
tax.</div><div><br></div></blockquote><div><br></div><div>I see, note howev=
er that if this is enabled it will be a breaking change.</div><div>=C2=A0</=
div><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;b=
order-left:1px #ccc solid;padding-left:1ex"><div><div class=3D"gmail_quote"=
>On Mon, Aug 6, 2018 at 4:26 PM, <span dir=3D"ltr"><<a rel=3D"nofollow"=
>mihailn...@gmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_q=
uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e=
x"><div dir=3D"ltr"><span><br><br>On Monday, August 6, 2018 at 6:14:30 PM U=
TC+3, Olanrewaju Adetula wrote:<blockquote class=3D"gmail_quote" style=3D"m=
argin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div=
dir=3D"ltr">
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0<br>If there is a completion there is potentia=
l code break or code change if suddenly the member is the better match, if =
there is a preferred call, there is a potential silent code change.</blockq=
uote>
Or the type author can define one and the language synthesizes the other vi=
a opt-in. With that, it won't matter anymore which syntax is used to in=
voke the function and any attempt to define any other will error as a resul=
t of redeclaration.<div><br></div></div></blockquote><div><br></div></span>=
<div>Can you elaborate?=C2=A0</div><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr"><div></div></div><div><br><div class=3D"g=
mail_quote"><span>On Mon, Aug 6, 2018 at 4:01 PM, <span dir=3D"ltr"><<a=
rel=3D"nofollow">mihailn...@gmail.com</a>></span> wrote:<br></span><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><span><div dir=3D"ltr"><div>Forgot to mention th=
e elephant in the room - this does not solve the fundamental issue, how do =
we define concept requirements for a class, is it in terms of member functi=
ons or in terms of free-standing ones.</div><div><br></div><div>However, th=
is can be a stepping stone towards UCS - after a period of time we could ma=
ke one of the two options the default.=C2=A0</div><div><span style=3D"displ=
ay:inline!important;float:none;background-color:transparent;color:rgb(34,34=
,34);font-family:"Arial","Helvetica",sans-serif;font-si=
ze:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacin=
g:normal;text-align:left;text-decoration:none;text-indent:0px;text-transfor=
m:none;white-space:normal;word-spacing:0px">It will be a non-breaking chang=
e, a</span>fter which the syntax will be used to let the user override the =
default behavior. =C2=A0</div><div><br></div><div>Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0</div><div>If there is a completion there is p=
otential code break or code change if suddenly the member is the better mat=
ch, if there is a preferred call, there is a potential silent code change.<=
/div><div><br></div><div>Silent code change is not so silent as it is not b=
y the class author but by the client code, introducing a free function can =
<i>hide</i> a class member function, called as free function.</div><div>See=
ms to me this is unavoidable, as other options, are either breaking (overlo=
ading) or still code changing (pick member always) and almost certainly mor=
e surprising, yet hides like this are something new.</div><div><br></div><d=
iv><br></div><div>Comments are welcome, I might write a proposal to give th=
is feature another go.</div><div>I personally can't decide for myself i=
f I want full UFC or just a way to call functions using member access synta=
x.</div></div></span><span><font color=3D"#888888"><span>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span><br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7=
-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd46=
0620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/dd460620-2bc7-47fd-<wbr>8e39-=
68a85003d9be%40isocpp.org</a><wbr>.<br>
</span></font></span></blockquote></div><br></div>
</blockquote></div><span>
<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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<br></span>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3=
-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734b=
c99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/734bc99d-2aa3-4af6-<wbr>b0b6-=
fb3ec3452d17%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></div></blockquote><div><br></div><div><br></div><di=
v>In any case, I investigated the UFCS situation further and, to my surpris=
e, it turned out, in its last stages only f(x,y) calling x.f(y) was conside=
red.</div><div>I wonder, were all the people asking for UFCS at CppConn las=
t year even aware of that! One can read more <a onmousedown=3D"this.href=3D=
'https://www.google.com/url?q\x3dhttps%3A%2F%2Fisocpp.org%2Fblog%2F2016=
%2F02%2Fa-bit-of-background-for-the-unified-call-proposal\x26sa\x3dD\x26snt=
z\x3d1\x26usg\x3dAFQjCNFrXRMjCPvNitAsGlOY6O1LyA1ddQ';return true;" oncl=
ick=3D"this.href=3D'https://www.google.com/url?q\x3dhttps%3A%2F%2Fisocp=
p.org%2Fblog%2F2016%2F02%2Fa-bit-of-background-for-the-unified-call-proposa=
l\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFrXRMjCPvNitAsGlOY6O1LyA1ddQ'=
;return true;" href=3D"https://isocpp.org/blog/2016/02/a-bit-of-background-=
for-the-unified-call-proposal" target=3D"_blank" rel=3D"nofollow">here</a> =
and <a onmousedown=3D"this.href=3D'http://www.google.com/url?q\x3dhttp%=
3A%2F%2Fwww.open-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fn458=
6.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1g7MRLKGRCtwaUkePf7cLyyRyMg&=
#39;;return true;" onclick=3D"this.href=3D'http://www.google.com/url?q\=
x3dhttp%3A%2F%2Fwww.open-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F201=
6%2Fn4586.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1g7MRLKGRCtwaUkePf7c=
LyyRyMg';return true;" href=3D"http://www.open-std.org/JTC1/SC22/WG21/d=
ocs/papers/2016/n4586.pdf" target=3D"_blank" rel=3D"nofollow">here</a> (n45=
86, search down for "unified").</div><div><br></div><div>Aside fr=
om the fact literally no one has ever requested <span style=3D"display:inli=
ne!important;float:none;background-color:transparent;color:rgb(34,34,34);fo=
nt-family:"Arial","Helvetica",sans-serif;font-size:13px=
;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:norma=
l;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;=
white-space:normal;word-spacing:0px">f(x,y) calling x.f(y), for obvious rea=
sons, and the only people to whom it is useful are library writers, I am no=
t surprised at all that even that was not accepted.</span></div><div><span =
style=3D"display:inline!important;float:none;background-color:transparent;c=
olor:rgb(34,34,34);font-family:"Arial","Helvetica",sans=
-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:400=
;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px=
;text-transform:none;white-space:normal;word-spacing:0px">Hell, even Bjarne=
<a onmousedown=3D"this.href=3D'http://www.google.com/url?q\x3dhttp%3A%=
2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2015%2Fp0131r0=
..pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFgArzPPqWPRJyeFIsqQqR6veJ1Ew&#=
39;;return true;" onclick=3D"this.href=3D'http://www.google.com/url?q\x=
3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2015=
%2Fp0131r0.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFgArzPPqWPRJyeFIsqQq=
R6veJ1Ew';return true;" href=3D"http://www.open-std.org/jtc1/sc22/wg21/=
docs/papers/2015/p0131r0.pdf" target=3D"_blank" rel=3D"nofollow">says</a> <=
/span><span style=3D"text-align:left;color:rgb(34,34,34);text-transform:non=
e;text-indent:0px;letter-spacing:normal;font-family:"Arial","=
;Helvetica",sans-serif;font-size:13px;font-variant:normal;font-weight:=
400;text-decoration:none;word-spacing:0px;display:inline!important;white-sp=
ace:normal;float:none;background-color:transparent"><i>"People who fea=
r side effects from generalization might then prefer x.f(y)<span style=3D"t=
ext-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;lett=
er-spacing:normal;font-family:"Arial","Helvetica",sans-=
serif;font-size:13px;font-variant:normal;font-weight:400;text-decoration:no=
ne;word-spacing:0px;display:inline!important;white-space:normal;float:none;=
background-color:transparent"> [to generalize]</span> because it is more re=
strictive".</i><br></span></div><div><br></div><div>Indeed, the possib=
ility tor trivially hide a class member function, is not pretty indeed.=C2=
=A0</div><div><br></div><div><br></div><div>With all that said, I still bel=
ieve there is hope. In n4586, it is noted<i> "Spicer liked the goal of=
the proposal, but wanted opt-in which would then consider members and non-=
members equally in an overload set."</i></div><div>and <i>"Yasski=
n said he=E2=80=99d feel more comfortable being able to see the feature in =
use for a long period of time, and would feel more comfortable seeing it in=
a TS. "</i></div><div><i><br></i></div><div>These are doable. We intr=
oduce UFCS as a scoped, user-side opt-in which will bring both free and mem=
ber functions into one overloading set.</div><div><br></div><div><font face=
=3D"courier new,monospace">struct C</font></div><div><font face=3D"courier =
new,monospace">{</font></div><div><font face=3D"courier new,monospace">=C2=
=A0 void func(double) {}</font></div><div><font face=3D"courier new,monospa=
ce">};</font></div><div><font face=3D"courier new,monospace"></font><br></d=
iv><div><font face=3D"courier new,monospace">// user</font></div><div><font=
face=3D"courier new,monospace"></font><br></div><div><font face=3D"courier=
new,monospace">void f(C& c)</font></div><div><font face=3D"courier new=
,monospace">{</font></div><div><font face=3D"courier new,monospace">=C2=A0 =
using C::func; //< bring func into the overloading set=C2=A0</font></div=
><div><font face=3D"courier new,monospace"></font><br></div><div><font face=
=3D"courier new,monospace">=C2=A0 func(c, -1);</font></div><div><font face=
=3D"courier new,monospace">}</font></div></div></blockquote><div><br></div>=
</div></div></blockquote><div>=C2=A0</div><blockquote class=3D"gmail_quote"=
style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-lef=
t:1ex"><div dir=3D"ltr"><div class=3D"gmail_quote"><div></div><div>This mak=
es a lot of sense. Perhaps there is a way to provide free-function overload=
s which can be replaced by specific free functions, without any concerns ab=
out backward compatibility:</div><div><br></div><div><font face=3D"monospac=
e, monospace">struct Foo {</font></div><div><font face=3D"monospace, monosp=
ace">=C2=A0 bool empty() const;</font></div><div><font face=3D"monospace, m=
onospace">=C2=A0 std::size_t size() const;</font></div><div><font face=3D"m=
onospace, monospace">};</font></div><div><font face=3D"monospace, monospace=
"><br></font></div><div><font face=3D"monospace, monospace">using auto Foo:=
:*;=C2=A0 =C2=A0// bring all public member functions of Foo into the outer =
namespace as free functions</font></div><div><font face=3D"monospace, monos=
pace"><br></font></div><div><font face=3D"monospace, monospace">// but with=
lower 'weight' than an actual free function declaration:</font></d=
iv><div><font face=3D"monospace, monospace">std::size_t size(Foo const&=
f);=C2=A0 =C2=A0 // auto-synthesised Foo::size(Foo const&) is now hidd=
en in preference to ::size(Foo const&)</font></div></div></div></blockq=
uote><div><br></div><div><br></div><div>Richard, this is the behavior sugge=
sted under UFCS, but was rejected. Here is <a onmousedown=3D"this.href=3D&#=
39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.reddit.com%2Fr%2Fcpp%2=
Fcomments%2F4d19gk%2Fawesome_wg21_paper_about_alternative_unified_call%2Fd1=
uqkpz\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_yuplzvGKf5i4U2IToOz0Dq-PQg&=
#39;;return true;" onclick=3D"this.href=3D'https://www.google.com/url?q=
\x3dhttps%3A%2F%2Fwww.reddit.com%2Fr%2Fcpp%2Fcomments%2F4d19gk%2Fawesome_wg=
21_paper_about_alternative_unified_call%2Fd1uqkpz\x26sa\x3dD\x26sntz\x3d1\x=
26usg\x3dAFQjCNH_yuplzvGKf5i4U2IToOz0Dq-PQg';return true;" href=3D"http=
s://www.reddit.com/r/cpp/comments/4d19gk/awesome_wg21_paper_about_alternati=
ve_unified_call/d1uqkpz" target=3D"_blank" rel=3D"nofollow">a great example=
why</a><font color=3D"#004000">.</font> =C2=A0</div></div></blockquote><di=
v><br></div><div>You mean we lost the chance to gain an important, amazing =
language feature for the sake of one unimaginative luddite who has a code b=
ase so ancient that he's unlikely to ever actually switch on the -std=
=3Dc++20 feature at all?</div></div></div></blockquote><div><br></div><div>=
<div style=3D"background-color: transparent; border-bottom-color: rgb(34, 3=
4, 34); border-bottom-style: none; border-bottom-width: 0px; border-image-o=
utset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-im=
age-source: none; border-image-width: 1; border-left-color: rgb(34, 34, 34)=
; border-left-style: none; border-left-width: 0px; border-right-color: rgb(=
34, 34, 34); border-right-style: none; border-right-width: 0px; border-top-=
color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; colo=
r: rgb(34, 34, 34); font-family: &quot;Arial&quot;,&quot;Helvet=
ica&quot;,sans-serif; font-size: 13px; font-style: normal; font-variant=
: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; mar=
gin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bott=
om: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-alig=
n: left; text-decoration: none; text-indent: 0px; text-transform: none; -we=
bkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><div =
style=3D"background-color: transparent; border-bottom-color: rgb(34, 34, 34=
); border-bottom-style: none; border-bottom-width: 0px; border-image-outset=
: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-s=
ource: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); bor=
der-left-style: none; border-left-width: 0px; border-right-color: rgb(34, 3=
4, 34); border-right-style: none; border-right-width: 0px; border-top-color=
: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; color: rg=
b(34, 34, 34); font-size: 13px; font-style: normal; font-variant: normal; f=
ont-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0=
px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; pa=
dding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; te=
xt-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-s=
troke-width: 0px; white-space: normal; word-spacing: 0px;"><br style=3D"bac=
kground-attachment: scroll; background-clip: border-box; background-color: =
transparent; background-image: none; background-origin: padding-box; backgr=
ound-position-x: 0%; background-position-y: 0%; background-repeat: repeat; =
background-size: auto; border-bottom-color: rgb(34, 34, 34); border-bottom-=
style: none; border-bottom-width: 0px; border-image-outset: 0; border-image=
-repeat: stretch; border-image-slice: 100%; border-image-source: none; bord=
er-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: n=
one; border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-ri=
ght-style: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34)=
; border-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); fo=
nt-size: 13px; height: auto; margin-bottom: 0px; margin-left: 0px; margin-r=
ight: 0px; margin-top: 0px; min-width: 0px; overflow: visible; overflow-x: =
visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; paddi=
ng-right: 0px; padding-top: 0px;"></div><div style=3D"background-color: tra=
nsparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; =
border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stre=
tch; border-image-slice: 100%; border-image-source: none; border-image-widt=
h: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; border-l=
eft-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: no=
ne; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-=
style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-size: 13px=
; font-style: normal; font-variant: normal; font-weight: 400; letter-spacin=
g: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-=
top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right=
: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-inde=
nt: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space:=
normal; word-spacing: 0px;">Richard, new code will be at risk.=C2=A0 The m=
oment someone changes x.f(y) to f(x, y) he is no longer sure what is called=
as there <i style=3D"background-attachment: scroll; background-clip: borde=
r-box; background-color: transparent; background-image: none; background-or=
igin: padding-box; background-position-x: 0%; background-position-y: 0%; ba=
ckground-repeat: repeat; background-size: auto; border-bottom-color: rgb(34=
, 34, 34); border-bottom-style: none; border-bottom-width: 0px; border-imag=
e-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border=
-image-source: none; border-image-width: 1; border-left-color: rgb(34, 34, =
34); border-left-style: none; border-left-width: 0px; border-right-color: r=
gb(34, 34, 34); border-right-style: none; border-right-width: 0px; border-t=
op-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; c=
olor: rgb(34, 34, 34); font-size: 13px; height: auto; margin-bottom: 0px; m=
argin-left: 0px; margin-right: 0px; margin-top: 0px; min-width: 0px; overfl=
ow: visible; overflow-x: visible; overflow-y: visible; padding-bottom: 0px;=
padding-left: 0px; padding-right: 0px; padding-top: 0px;">might</i> be som=
e 'using' or even some co-worker "friendly wrapper" which=
hides the call.=C2=A0</div><div style=3D"background-color: transparent; bo=
rder-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-botto=
m-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(34, 34, 34); border-left-style: none; border-left-width: 0=
px; border-right-color: rgb(34, 34, 34); border-right-style: none; border-r=
ight-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none;=
border-top-width: 0px; color: rgb(34, 34, 34); font-size: 13px; font-style=
: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; m=
argin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; or=
phans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; paddi=
ng-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; tex=
t-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; wor=
d-spacing: 0px;"><br style=3D"background-attachment: scroll; background-cli=
p: border-box; background-color: transparent; background-image: none; backg=
round-origin: padding-box; background-position-x: 0%; background-position-y=
: 0%; background-repeat: repeat; background-size: auto; border-bottom-color=
: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; bor=
der-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%=
; border-image-source: none; border-image-width: 1; border-left-color: rgb(=
34, 34, 34); border-left-style: none; border-left-width: 0px; border-right-=
color: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px; =
border-top-color: rgb(34, 34, 34); border-top-style: none; border-top-width=
: 0px; color: rgb(34, 34, 34); font-size: 13px; height: auto; margin-bottom=
: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-width: 0px=
; overflow: visible; overflow-x: visible; overflow-y: visible; padding-bott=
om: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"></div><d=
iv style=3D"background-color: transparent; border-bottom-color: rgb(34, 34,=
34); border-bottom-style: none; border-bottom-width: 0px; border-image-out=
set: 0; border-image-repeat: stretch; border-image-slice: 100%; border-imag=
e-source: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); =
border-left-style: none; border-left-width: 0px; border-right-color: rgb(34=
, 34, 34); border-right-style: none; border-right-width: 0px; border-top-co=
lor: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; color:=
rgb(34, 34, 34); 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-top: 0px; orphans: 2; padding-bottom: 0px;=
padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;=
text-decoration: none; text-indent: 0px; text-transform: none; -webkit-tex=
t-stroke-width: 0px; white-space: normal; word-spacing: 0px;">Honestly, the=
risk of you or a co-worker breaking your code is the biggest risk as there=
will be no namespace boundary: You refactor your code to use some helper f=
unctions, but somewhere someone decided a method is not what they want exac=
tly and created a free function to use in its place, hiding your call as we=
ll by incident.</div><div style=3D"background-color: transparent; border-bo=
ttom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width=
: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-s=
lice: 100%; border-image-source: none; border-image-width: 1; border-left-c=
olor: rgb(34, 34, 34); border-left-style: none; border-left-width: 0px; bor=
der-right-color: rgb(34, 34, 34); border-right-style: none; border-right-wi=
dth: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; border=
-top-width: 0px; color: rgb(34, 34, 34); font-size: 13px; font-style: norma=
l; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-b=
ottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: =
2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top:=
0px; text-align: left; text-decoration: none; text-indent: 0px; text-trans=
form: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spaci=
ng: 0px;">And the sad part is, there will be no warning - why should it be?=
Isn't this the expected behavior for free functions to hide members? S=
hould the co-worker be warned not to use free functions with the same name =
as members?=C2=A0</div><div style=3D"background-color: transparent; border-=
bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-wid=
th: 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(34, 34, 34); border-left-style: none; border-left-width: 0px; b=
order-right-color: rgb(34, 34, 34); border-right-style: none; border-right-=
width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; bord=
er-top-width: 0px; color: rgb(34, 34, 34); font-size: 13px; font-style: nor=
mal; 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: 0px; padding-to=
p: 0px; 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 style=3D"background-attachment: scroll; background-clip: bo=
rder-box; background-color: transparent; background-image: none; background=
-origin: padding-box; background-position-x: 0%; background-position-y: 0%;=
background-repeat: repeat; background-size: auto; border-bottom-color: rgb=
(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; border-i=
mage-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; bor=
der-image-source: none; border-image-width: 1; border-left-color: rgb(34, 3=
4, 34); border-left-style: none; border-left-width: 0px; border-right-color=
: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px; borde=
r-top-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px=
; color: rgb(34, 34, 34); font-size: 13px; height: auto; margin-bottom: 0px=
; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-width: 0px; ove=
rflow: visible; overflow-x: visible; overflow-y: visible; padding-bottom: 0=
px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"></div><div st=
yle=3D"background-color: transparent; border-bottom-color: rgb(34, 34, 34);=
border-bottom-style: none; border-bottom-width: 0px; border-image-outset: =
0; border-image-repeat: stretch; border-image-slice: 100%; border-image-sou=
rce: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); borde=
r-left-style: none; border-left-width: 0px; border-right-color: rgb(34, 34,=
34); border-right-style: none; border-right-width: 0px; border-top-color: =
rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; color: rgb(=
34, 34, 34); font-size: 13px; font-style: normal; font-variant: normal; fon=
t-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px=
; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padd=
ing-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text=
-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-str=
oke-width: 0px; white-space: normal; word-spacing: 0px;">Nasty situation, t=
his is because we have lost intend by unifying the syntax. Actually, it is =
not problem with the syntax - intend can be expressed by qualified call - b=
ut the fact we had different defaults for so long.</div><div style=3D"backg=
round-color: transparent; border-bottom-color: rgb(34, 34, 34); border-bott=
om-style: none; border-bottom-width: 0px; border-image-outset: 0; border-im=
age-repeat: stretch; border-image-slice: 100%; border-image-source: none; b=
order-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-style=
: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); border=
-right-style: none; border-right-width: 0px; border-top-color: rgb(34, 34, =
34); border-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34);=
font-size: 13px; font-style: normal; font-variant: normal; font-weight: 40=
0; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-rig=
ht: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0p=
x; padding-right: 0px; padding-top: 0px; text-align: left; text-decoration:=
none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0=
px; white-space: normal; word-spacing: 0px;"><br style=3D"background-attach=
ment: scroll; background-clip: border-box; background-color: transparent; b=
ackground-image: none; background-origin: padding-box; background-position-=
x: 0%; background-position-y: 0%; background-repeat: repeat; background-siz=
e: auto; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; b=
order-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stret=
ch; border-image-slice: 100%; border-image-source: none; border-image-width=
: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; border-le=
ft-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: non=
e; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-s=
tyle: none; border-top-width: 0px; color: rgb(34, 34, 34); font-size: 13px;=
height: auto; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; mar=
gin-top: 0px; min-width: 0px; overflow: visible; overflow-x: visible; overf=
low-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;=
padding-top: 0px;"></div><div style=3D"background-color: transparent; bord=
er-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-=
width: 0px; border-image-outset: 0; border-image-repeat: stretch; border-im=
age-slice: 100%; border-image-source: none; border-image-width: 1; border-l=
eft-color: rgb(34, 34, 34); border-left-style: none; border-left-width: 0px=
; border-right-color: rgb(34, 34, 34); border-right-style: none; border-rig=
ht-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; b=
order-top-width: 0px; color: rgb(34, 34, 34); font-size: 13px; font-style: =
normal; font-variant: normal; font-weight: 400; letter-spacing: normal; mar=
gin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orph=
ans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding=
-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-=
transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-=
spacing: 0px;"><br style=3D"background-attachment: scroll; background-clip:=
border-box; background-color: transparent; background-image: none; backgro=
und-origin: padding-box; background-position-x: 0%; background-position-y: =
0%; background-repeat: repeat; background-size: auto; border-bottom-color: =
rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; borde=
r-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; =
border-image-source: none; border-image-width: 1; border-left-color: rgb(34=
, 34, 34); border-left-style: none; border-left-width: 0px; border-right-co=
lor: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px; bo=
rder-top-color: rgb(34, 34, 34); border-top-style: none; border-top-width: =
0px; color: rgb(34, 34, 34); font-size: 13px; height: auto; margin-bottom: =
0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-width: 0px; =
overflow: visible; overflow-x: visible; overflow-y: visible; padding-bottom=
: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"></div><div=
style=3D"background-color: transparent; border-bottom-color: rgb(34, 34, 3=
4); border-bottom-style: none; border-bottom-width: 0px; border-image-outse=
t: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-=
source: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); bo=
rder-left-style: none; border-left-width: 0px; border-right-color: rgb(34, =
34, 34); border-right-style: none; border-right-width: 0px; border-top-colo=
r: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; color: r=
gb(34, 34, 34); 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-top: 0px; orphans: 2; padding-bottom: 0px; p=
adding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; t=
ext-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-=
stroke-width: 0px; white-space: normal; word-spacing: 0px;">The other defau=
lt is also not acceptable - to overload all. This will <i style=3D"backgrou=
nd-attachment: scroll; background-clip: border-box; background-color: trans=
parent; background-image: none; background-origin: padding-box; background-=
position-x: 0%; background-position-y: 0%; background-repeat: repeat; backg=
round-size: auto; border-bottom-color: rgb(34, 34, 34); border-bottom-style=
: none; border-bottom-width: 0px; border-image-outset: 0; border-image-repe=
at: stretch; border-image-slice: 100%; border-image-source: none; border-im=
age-width: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; =
border-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-s=
tyle: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); bor=
der-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-si=
ze: 13px; height: auto; margin-bottom: 0px; margin-left: 0px; margin-right:=
0px; margin-top: 0px; min-width: 0px; overflow: visible; overflow-x: visib=
le; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-ri=
ght: 0px; padding-top: 0px;">both</i> change (pick "better" overl=
oaded) <i style=3D"background-attachment: scroll; background-clip: border-b=
ox; background-color: transparent; background-image: none; background-origi=
n: padding-box; background-position-x: 0%; background-position-y: 0%; backg=
round-repeat: repeat; background-size: auto; border-bottom-color: rgb(34, 3=
4, 34); border-bottom-style: none; border-bottom-width: 0px; border-image-o=
utset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-im=
age-source: none; border-image-width: 1; border-left-color: rgb(34, 34, 34)=
; border-left-style: none; border-left-width: 0px; border-right-color: rgb(=
34, 34, 34); border-right-style: none; border-right-width: 0px; border-top-=
color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; colo=
r: rgb(34, 34, 34); font-size: 13px; height: auto; margin-bottom: 0px; marg=
in-left: 0px; margin-right: 0px; margin-top: 0px; min-width: 0px; overflow:=
visible; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; pa=
dding-left: 0px; padding-right: 0px; padding-top: 0px;">and</i> break (rede=
finitions).=C2=A0</div><div style=3D"background-color: transparent; border-=
bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-wid=
th: 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(34, 34, 34); border-left-style: none; border-left-width: 0px; b=
order-right-color: rgb(34, 34, 34); border-right-style: none; border-right-=
width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; bord=
er-top-width: 0px; color: rgb(34, 34, 34); font-size: 13px; font-style: nor=
mal; 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: 0px; padding-to=
p: 0px; 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;">One might be able to fix the breakages, but the silent-and-corr=
ect changes will be impossible to find and fix on a scale, not without rock=
-solid tools we don't have (yet?).</div><div style=3D"background-color:=
transparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: no=
ne; 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(34, 34, 34); border-left-style: none; bord=
er-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style=
: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-=
top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-size: =
13px; font-style: normal; font-variant: normal; font-weight: 400; letter-sp=
acing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; mar=
gin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-r=
ight: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-=
indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-sp=
ace: normal; word-spacing: 0px;"><br></div><div style=3D"background-color: =
transparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: non=
e; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: s=
tretch; border-image-slice: 100%; border-image-source: none; border-image-w=
idth: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; borde=
r-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style:=
none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-t=
op-style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-size: 1=
3px; font-style: normal; font-variant: normal; font-weight: 400; letter-spa=
cing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; marg=
in-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-ri=
ght: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-i=
ndent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-spa=
ce: normal; word-spacing: 0px;">Even then, will people be happy with the fa=
ct free functions now <i style=3D"border-bottom-color: rgb(34, 34, 34); bor=
der-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; b=
order-image-repeat: stretch; border-image-slice: 100%; border-image-source:=
none; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-le=
ft-style: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34)=
; border-right-style: none; border-right-width: 0px; border-top-color: rgb(=
34, 34, 34); border-top-style: none; border-top-width: 0px; margin-bottom: =
0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: =
0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">always</i> m=
ust be qualified in order to be "free"?=C2=A0</div><div style=3D"=
background-color: transparent; border-bottom-color: rgb(34, 34, 34); border=
-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; bord=
er-image-repeat: stretch; border-image-slice: 100%; border-image-source: no=
ne; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-=
style: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); b=
order-right-style: none; border-right-width: 0px; border-top-color: rgb(34,=
34, 34); border-top-style: none; border-top-width: 0px; color: rgb(34, 34,=
34); font-size: 13px; font-style: normal; font-variant: normal; font-weigh=
t: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px; margi=
n-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-lef=
t: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decora=
tion: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-wid=
th: 0px; white-space: normal; word-spacing: 0px;"><br></div><div style=3D"b=
ackground-color: transparent; border-bottom-color: rgb(34, 34, 34); border-=
bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; borde=
r-image-repeat: stretch; border-image-slice: 100%; border-image-source: non=
e; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-s=
tyle: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); bo=
rder-right-style: none; border-right-width: 0px; border-top-color: rgb(34, =
34, 34); border-top-style: none; border-top-width: 0px; color: rgb(34, 34, =
34); 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-top: 0px; orphans: 2; padding-bottom: 0px; padding-left=
: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decorat=
ion: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-widt=
h: 0px; white-space: normal; word-spacing: 0px;"><br style=3D"background-at=
tachment: scroll; background-clip: border-box; background-color: transparen=
t; background-image: none; background-origin: padding-box; background-posit=
ion-x: 0%; background-position-y: 0%; background-repeat: repeat; background=
-size: auto; border-bottom-color: rgb(34, 34, 34); border-bottom-style: non=
e; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: s=
tretch; border-image-slice: 100%; border-image-source: none; border-image-w=
idth: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; borde=
r-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style:=
none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-t=
op-style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-size: 1=
3px; height: auto; margin-bottom: 0px; margin-left: 0px; margin-right: 0px;=
margin-top: 0px; min-width: 0px; overflow: visible; overflow-x: visible; o=
verflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: =
0px; padding-top: 0px;"></div><div style=3D"background-color: transparent; =
border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bot=
tom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; borde=
r-image-slice: 100%; border-image-source: none; border-image-width: 1; bord=
er-left-color: rgb(34, 34, 34); border-left-style: none; border-left-width:=
0px; border-right-color: rgb(34, 34, 34); border-right-style: none; border=
-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: non=
e; border-top-width: 0px; color: rgb(34, 34, 34); font-size: 13px; font-sty=
le: 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: 0px; pad=
ding-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; t=
ext-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; w=
ord-spacing: 0px;">The only way out in foreseeable<span style=3D"display: i=
nline !important; float: none; background-color: transparent; color: rgb(34=
, 34, 34); font-family: "Arial","Helvetica",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;"> future</span> (or probably ever=
) is an opt-in.</div><div style=3D"background-color: transparent; border-bo=
ttom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width=
: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-s=
lice: 100%; border-image-source: none; border-image-width: 1; border-left-c=
olor: rgb(34, 34, 34); border-left-style: none; border-left-width: 0px; bor=
der-right-color: rgb(34, 34, 34); border-right-style: none; border-right-wi=
dth: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; border=
-top-width: 0px; color: rgb(34, 34, 34); font-size: 13px; font-style: norma=
l; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-b=
ottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: =
2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top:=
0px; text-align: left; text-decoration: none; text-indent: 0px; text-trans=
form: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spaci=
ng: 0px;"><br style=3D"background-attachment: scroll; background-clip: bord=
er-box; background-color: transparent; background-image: none; background-o=
rigin: padding-box; background-position-x: 0%; background-position-y: 0%; b=
ackground-repeat: repeat; background-size: auto; border-bottom-color: rgb(3=
4, 34, 34); border-bottom-style: none; border-bottom-width: 0px; border-ima=
ge-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; borde=
r-image-source: none; border-image-width: 1; border-left-color: rgb(34, 34,=
34); border-left-style: none; border-left-width: 0px; border-right-color: =
rgb(34, 34, 34); border-right-style: none; border-right-width: 0px; border-=
top-color: rgb(34, 34, 34); border-top-style: none; border-top-width: 0px; =
color: rgb(34, 34, 34); font-size: 13px; height: auto; margin-bottom: 0px; =
margin-left: 0px; margin-right: 0px; margin-top: 0px; min-width: 0px; overf=
low: visible; overflow-x: visible; overflow-y: visible; padding-bottom: 0px=
; padding-left: 0px; padding-right: 0px; padding-top: 0px;"></div><div styl=
e=3D"background-color: transparent; border-bottom-color: rgb(34, 34, 34); b=
order-bottom-style: none; border-bottom-width: 0px; border-image-outset: 0;=
border-image-repeat: stretch; border-image-slice: 100%; border-image-sourc=
e: none; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-=
left-style: none; border-left-width: 0px; border-right-color: rgb(34, 34, 3=
4); border-right-style: none; border-right-width: 0px; border-top-color: rg=
b(34, 34, 34); border-top-style: none; border-top-width: 0px; color: rgb(34=
, 34, 34); 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-top: 0px; orphans: 2; padding-bottom: 0px; paddin=
g-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-d=
ecoration: none; text-indent: 0px; text-transform: none; -webkit-text-strok=
e-width: 0px; white-space: normal; word-spacing: 0px;"><br style=3D"border-=
bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-wid=
th: 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(34, 34, 34); border-left-style: none; border-left-width: 0px; b=
order-right-color: rgb(34, 34, 34); border-right-style: none; border-right-=
width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; bord=
er-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px;=
margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0p=
x; padding-top: 0px;"></div></div><div style=3D"background-color: transpare=
nt; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; border=
-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretch; b=
order-image-slice: 100%; border-image-source: none; border-image-width: 1; =
border-left-color: rgb(34, 34, 34); border-left-style: none; border-left-wi=
dth: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none; bo=
rder-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-style:=
none; border-top-width: 0px; color: rgb(34, 34, 34); font-family: &quo=
t;Arial&quot;,&quot;Helvetica&quot;,sans-serif; font-size: 13px=
; font-style: normal; font-variant: normal; font-weight: 400; letter-spacin=
g: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-=
top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right=
: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-inde=
nt: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space:=
normal; word-spacing: 0px;">=C2=A0</div><b></b><i></i><u></u><sub></sub><s=
up></sup><strike></strike><br></div><div>=C2=A0</div><blockquote class=3D"g=
mail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc sol=
id;padding-left: 1ex;"><div dir=3D"ltr"><div class=3D"gmail_quote"><div><br=
></div><div>This is why we can't have nice things. The ridiculous idea =
that everything in a new version of X must be compatible with every previou=
s version of X has been the bane of the computing industry since the demon-=
spawn of MSDOS.</div><div><br></div><div>=C2=A0</div><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex"><div dir=3D"ltr"><div><br></div><div>What we want is for local <fo=
nt face=3D"courier new,monospace">size</font> <i>not to</i> hide. If the us=
er wants to hide he should use a qualified called, so to be explicit.=C2=A0=
</div><div><br></div><div>This will match current behavior.=C2=A0</div><div=
><br></div><div>Currently, if the user wants to hide, he must use a free st=
anding function which will force him to be explicit on the call site by cha=
nging the call syntax</div><div><font face=3D"courier new,monospace"><br></=
font></div><div><font face=3D"arial,sans-serif">from</font><font face=3D"co=
urier new,monospace"> f.size() <font face=3D"arial,sans-serif">to</font> si=
ze(f)</font></div><div><font face=3D"courier new,monospace"></font><br></di=
v><div>In the unified world, if the user wants to hide, he must again chang=
e the call syntax, this time</div><div><br></div><div>from <font face=3D"co=
urier new,monospace">size(f) </font><font face=3D"arial,sans-serif">to</fon=
t><font face=3D"courier new,monospace"> ::size(f)</font></div><div><font fa=
ce=3D"courier new,monospace"></font>=C2=A0</div><div><br></div><blockquote =
class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #=
ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_quote"><di=
v><br></div><div><br></div><div>=C2=A0</div><blockquote class=3D"gmail_quot=
e" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">=
<div dir=3D"ltr"><div><font face=3D"courier new,monospace"><br></font></div=
><div><font face=3D"arial,sans-serif">Now, if someone adds=C2=A0</font></di=
v><div><font face=3D"courier new,monospace"><font face=3D"arial,sans-serif"=
></font><br></font></div><div><font face=3D"courier new,monospace"><span st=
yle=3D"text-align:left;text-transform:none;text-indent:0px;letter-spacing:n=
ormal;font-family:courier new,monospace;font-size:13px;font-style:normal;fo=
nt-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;dis=
play:inline!important;white-space:normal;float:none;background-color:transp=
arent">void func(C&, size_t);</span></font></div><div><font face=3D"cou=
rier new,monospace"><b></b><i></i><u></u><sub></sub><sup></sup><strike></st=
rike><br></font></div><div><font face=3D"arial,sans-serif">By </font><font =
face=3D"arial,sans-serif"><a onmousedown=3D"this.href=3D'http://www.goo=
gle.com/url?q\x3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%=
2Fpapers%2F2016%2Fp0301r0.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG0c9=
fPByA6sWhcNkdG8HHMR677UQ';return true;" onclick=3D"this.href=3D'htt=
p://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fw=
g21%2Fdocs%2Fpapers%2F2016%2Fp0301r0.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3=
dAFQjCNG0c9fPByA6sWhcNkdG8HHMR677UQ';return true;" href=3D"http://www.o=
pen-std.org/jtc1/sc22/wg21/docs/papers/2016/p0301r0.html" target=3D"_blank"=
rel=3D"nofollow">the current rules</a> this will <i>hide</i> the member fu=
nction, but now the condition is an error as the call to func is ambiguous.=
</font></div><div><font face=3D"arial,sans-serif"><br></font></div><div><fo=
nt face=3D"arial,sans-serif"><div>(Needless to say, the above could be used=
in the future not to <i>enable</i>=C2=A0<span>UFCS, but to <i style=3D"bor=
der-bottom-color:rgb(34,34,34);border-bottom-style:none;border-bottom-width=
:0px;border-left-color:rgb(34,34,34);border-left-style:none;border-left-wid=
th:0px;border-right-color:rgb(34,34,34);border-right-style:none;border-righ=
t-width:0px;border-top-color:rgb(34,34,34);border-top-style:none;border-top=
-width:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0p=
x;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px">ov=
erride</i> the rules.)</span><br></div></font></div><div><font face=3D"aria=
l,sans-serif"><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><=
br></font></div><div>In n4586 it says <i>"...Some people wanted additi=
onal opt-in mechanisms to enable the new behavior, which was discussed in g=
reat detail, but rejected"</i><i><br></i></div><div>What were those op=
t-ins? Was something like this considered, or the opt-ins were on the decla=
ration side (be it on the member/class or function) or on the call site?</d=
iv><div><br></div><div><br></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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-3079=
-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-3079-4619-9db0-c993dba7a8b6=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464=
c9ca-3079-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/7464c9ca-3079-4619-<wbr>9db0-=
c993dba7a8b6%40isocpp.org</a><wbr>.<br>
</blockquote></div></div>
</blockquote></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 onmousedown=3D"this.href=3D'javascript:';return true;" o=
nclick=3D"this.href=3D'javascript:';return true;" href=3D"javascrip=
t:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"86AUGac2DQA=
J">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a onmousedown=3D"this.href=3D'jav=
ascript:';return true;" onclick=3D"this.href=3D'javascript:';re=
turn true;" href=3D"javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obf=
uscated-mailto=3D"86AUGac2DQAJ">std-pr...@isocpp.org</a>.<br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4f04=
-4e26-a630-ce4b41363d19%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4f04-4e26-a630-ce4b41363d19=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e13=
18cb-4f04-4e26-a630-ce4b41363d19%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/9e1318cb-4f04-4e26-<wbr>a630-=
ce4b41363d19%40isocpp.org</a><wbr>.<br>
</blockquote></div></div>
</blockquote></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/1eb57a3b-836f-4a6b-8842-b2196293d30f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/1eb57a3b-836f-4a6b-8842-b2196293d30f=
%40isocpp.org</a>.<br />
------=_Part_775_42902644.1533905860993--
------=_Part_774_2147112708.1533905860991--
.
Author: mihailnajdenov@gmail.com
Date: Fri, 10 Aug 2018 05:59:31 -0700 (PDT)
Raw View
------=_Part_769_957406383.1533905971844
Content-Type: multipart/alternative;
boundary="----=_Part_770_2012915352.1533905971845"
------=_Part_770_2012915352.1533905971845
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Friday, August 10, 2018 at 1:35:31 PM UTC+3, Richard Hodges wrote:
>
>
>
> On Fri, 10 Aug 2018 at 09:01, <mihailn...@gmail.com <javascript:>> wrote:
>
>>
>>
>> On Thursday, August 9, 2018 at 11:47:08 AM UTC+3, Richard Hodges wrote:
>>>
>>>
>>>
>>> On Thu, 9 Aug 2018 at 10:05, <mihailn...@gmail.com> wrote:
>>>
>>>>
>>>>
>>>> On Wednesday, August 8, 2018 at 4:41:58 PM UTC+3, Olanrewaju Adetula=
=20
>>>> wrote:
>>>>>
>>>>> If by defining member function for example, an associated free=20
>>>>> function can be synthesized by the compiler or vice-versa, then we ca=
n call=20
>>>>> such function using either syntax.
>>>>>
>>>>>
>>>> I see, note however that if this is enabled it will be a breaking=20
>>>> change.
>>>> =20
>>>>
>>>>> On Mon, Aug 6, 2018 at 4:26 PM, <mihailn...@gmail.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula=20
>>>>>> wrote:
>>>>>>>
>>>>>>> Of course going full UCS introduces the mirror set of=20
>>>>>>>> vulnerability-to-change problems. If we can call members using fre=
e=20
>>>>>>>> standing, then these are either in competition or there is a prefe=
rred=20
>>>>>>>> call.=20
>>>>>>>> If there is a completion there is potential code break or code=20
>>>>>>>> change if suddenly the member is the better match, if there is a p=
referred=20
>>>>>>>> call, there is a potential silent code change.
>>>>>>>
>>>>>>> Or the type author can define one and the language synthesizes the=
=20
>>>>>>> other via opt-in. With that, it won't matter anymore which syntax i=
s used=20
>>>>>>> to invoke the function and any attempt to define any other will err=
or as a=20
>>>>>>> result of redeclaration.
>>>>>>>
>>>>>>>
>>>>>> Can you elaborate?=20
>>>>>> =20
>>>>>>
>>>>>>>
>>>>>>> On Mon, Aug 6, 2018 at 4:01 PM, <mihailn...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Forgot to mention the elephant in the room - this does not solve=
=20
>>>>>>>> the fundamental issue, how do we define concept requirements for a=
class,=20
>>>>>>>> is it in terms of member functions or in terms of free-standing on=
es.
>>>>>>>>
>>>>>>>> However, this can be a stepping stone towards UCS - after a period=
=20
>>>>>>>> of time we could make one of the two options the default.=20
>>>>>>>> It will be a non-breaking change, after which the syntax will be=
=20
>>>>>>>> used to let the user override the default behavior. =20
>>>>>>>>
>>>>>>>> Of course going full UCS introduces the mirror set of=20
>>>>>>>> vulnerability-to-change problems. If we can call members using fre=
e=20
>>>>>>>> standing, then these are either in competition or there is a prefe=
rred=20
>>>>>>>> call.=20
>>>>>>>> If there is a completion there is potential code break or code=20
>>>>>>>> change if suddenly the member is the better match, if there is a p=
referred=20
>>>>>>>> call, there is a potential silent code change.
>>>>>>>>
>>>>>>>> Silent code change is not so silent as it is not by the class=20
>>>>>>>> author but by the client code, introducing a free function can=20
>>>>>>>> *hide* a class member function, called as free function.
>>>>>>>> Seems to me this is unavoidable, as other options, are either=20
>>>>>>>> breaking (overloading) or still code changing (pick member always)=
and=20
>>>>>>>> almost certainly more surprising, yet hides like this are somethin=
g new.
>>>>>>>>
>>>>>>>>
>>>>>>>> Comments are welcome, I might write a proposal to give this featur=
e=20
>>>>>>>> another go.
>>>>>>>> I personally can't decide for myself if I want full UFC or just a=
=20
>>>>>>>> way to call functions using member access syntax.
>>>>>>>>
>>>>>>>> --=20
>>>>>>>> You received this message because you are subscribed to the Google=
=20
>>>>>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,=
=20
>>>>>>>> send an email to std-proposal...@isocpp.org.
>>>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>>>> To view this discussion on the web visit=20
>>>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460=
620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org=20
>>>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd46=
0620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_source=
=3Dfooter>
>>>>>>>> .
>>>>>>>>
>>>>>>>
>>>>>>> --=20
>>>>>> You received this message because you are subscribed to the Google=
=20
>>>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,=20
>>>>>> send an email to std-proposal...@isocpp.org.
>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>> To view this discussion on the web visit=20
>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99=
d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org=20
>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc9=
9d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=3Demail&utm_source=
=3Dfooter>
>>>>>> .
>>>>>>
>>>>>
>>>>>
>>>>
>>>> In any case, I investigated the UFCS situation further and, to my=20
>>>> surprise, it turned out, in its last stages only f(x,y) calling x.f(y)=
was=20
>>>> considered.
>>>> I wonder, were all the people asking for UFCS at CppConn last year eve=
n=20
>>>> aware of that! One can read more here=20
>>>> <https://isocpp.org/blog/2016/02/a-bit-of-background-for-the-unified-c=
all-proposal>=20
>>>> and here=20
>>>> <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/n4586.pdf>=20
>>>> (n4586, search down for "unified").
>>>>
>>>> Aside from the fact literally no one has ever requested f(x,y) calling=
=20
>>>> x.f(y), for obvious reasons, and the only people to whom it is useful =
are=20
>>>> library writers, I am not surprised at all that even that was not acce=
pted.
>>>> Hell, even Bjarne says=20
>>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0131r0.pdf> =
*"People=20
>>>> who fear side effects from generalization might then prefer x.f(y) [to=
=20
>>>> generalize] because it is more restrictive".*
>>>>
>>>> Indeed, the possibility tor trivially hide a class member function, is=
=20
>>>> not pretty indeed.=20
>>>>
>>>>
>>>> With all that said, I still believe there is hope. In n4586, it is not=
ed*=20
>>>> "Spicer liked the goal of the proposal, but wanted opt-in which would =
then=20
>>>> consider members and non-members equally in an overload set."*
>>>> and *"Yasskin said he=E2=80=99d feel more comfortable being able to se=
e the=20
>>>> feature in use for a long period of time, and would feel more comforta=
ble=20
>>>> seeing it in a TS. "*
>>>>
>>>> These are doable. We introduce UFCS as a scoped, user-side opt-in whic=
h=20
>>>> will bring both free and member functions into one overloading set.
>>>>
>>>> struct C
>>>> {
>>>> void func(double) {}
>>>> };
>>>>
>>>> // user
>>>>
>>>> void f(C& c)
>>>> {
>>>> using C::func; //< bring func into the overloading set=20
>>>>
>>>> func(c, -1);
>>>> }
>>>>
>>>
>>> =20
>>
>>> This makes a lot of sense. Perhaps there is a way to provide=20
>>> free-function overloads which can be replaced by specific free function=
s,=20
>>> without any concerns about backward compatibility:
>>>
>>> struct Foo {
>>> bool empty() const;
>>> std::size_t size() const;
>>> };
>>>
>>> using auto Foo::*; // bring all public member functions of Foo into=
=20
>>> the outer namespace as free functions
>>>
>>> // but with lower 'weight' than an actual free function declaration:
>>> std::size_t size(Foo const& f); // auto-synthesised Foo::size(Foo=20
>>> const&) is now hidden in preference to ::size(Foo const&)
>>>
>>
>>
>> Richard, this is the behavior suggested under UFCS, but was rejected.=20
>> Here is a great example why=20
>> <https://www.reddit.com/r/cpp/comments/4d19gk/awesome_wg21_paper_about_a=
lternative_unified_call/d1uqkpz>
>> . =20
>>
>
> You mean we lost the chance to gain an important, amazing language featur=
e=20
> for the sake of one unimaginative luddite who has a code base so ancient=
=20
> that he's unlikely to ever actually switch on the -std=3Dc++20 feature at=
all?
>
Richard, new code will be at risk. The moment someone changes x.f(y) to=20
f(x, y) he is no longer sure what is called as there might be some 'using'=
=20
or even some co-worker "friendly wrapper" which hides the call.=20
Honestly, the risk of you or a co-worker breaking your code is the biggest=
=20
risk as there will be no namespace boundary: You refactor your code to use=
=20
some helper functions, but somewhere someone decided a method is not what=
=20
they want exactly and created a free function to use in its place, hiding=
=20
your call as well by incident.
And the sad part is, there will be no warning - why should it be? Isn't=20
this the expected behavior for free functions to hide members? Should the=
=20
co-worker be warned not to use free functions with the same name as=20
members?=20
Nasty situation, this is because we have lost intend by unifying the=20
syntax. Actually, it is not problem with the syntax - intend can be=20
expressed by qualified call - but the fact we had different defaults for so=
=20
long.
The other default is also not acceptable - to overload all. This will both=
=20
change (pick "better" overloaded) and break (redefinitions).=20
One might be able to fix the breakages, but the silent-and-correct changes=
=20
will be impossible to find and fix on a scale, not without rock-solid tools=
=20
we don't have (yet?).
Even then, will people be happy with the fact free functions now always=20
must be qualified in order to be "free"?=20
The only way out in foreseeable (or probably ever) future is an opt-in.
=20
> This is why we can't have nice things. The ridiculous idea that everythin=
g=20
> in a new version of X must be compatible with every previous version of X=
=20
> has been the bane of the computing industry since the demon-spawn of MSDO=
S.
>
> =20
>
>>
>> What we want is for local size *not to* hide. If the user wants to hide=
=20
>> he should use a qualified called, so to be explicit.=20
>>
>> This will match current behavior.=20
>>
>> Currently, if the user wants to hide, he must use a free standing=20
>> function which will force him to be explicit on the call site by changin=
g=20
>> the call syntax
>>
>> from f.size() to size(f)
>>
>> In the unified world, if the user wants to hide, he must again change th=
e=20
>> call syntax, this time
>>
>> from size(f) to ::size(f)
>> =20
>>
>>
>>>
>>> =20
>>>
>>>>
>>>> Now, if someone adds=20
>>>>
>>>> void func(C&, size_t);
>>>>
>>>> By the current rules=20
>>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0301r0.html>=
=20
>>>> this will *hide* the member function, but now the condition is an=20
>>>> error as the call to func is ambiguous.
>>>>
>>>> (Needless to say, the above could be used in the future not to *enable=
*
>>>> UFCS, but to *override* the rules.)
>>>>
>>>> In n4586 it says *"...Some people wanted additional opt-in mechanisms=
=20
>>>> to enable the new behavior, which was discussed in great detail, but=
=20
>>>> rejected"*
>>>> What were those opt-ins? Was something like this considered, or the=20
>>>> opt-ins were on the declaration side (be it on the member/class or=20
>>>> function) or on the call site?
>>>>
>>>>
>>>> --=20
>>>> You received this message because you are subscribed to the Google=20
>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send=
=20
>>>> an email to std-proposal...@isocpp.org.
>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>> To view this discussion on the web visit=20
>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-=
3079-4619-9db0-c993dba7a8b6%40isocpp.org=20
>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca=
-3079-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium=3Demail&utm_source=3Df=
ooter>
>>>> .
>>>>
>>> --=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit=20
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4f=
04-4e26-a630-ce4b41363d19%40isocpp.org=20
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4=
f04-4e26-a630-ce4b41363d19%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoo=
ter>
>> .
>>
>
--=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/74bb035d-c293-4101-a1ca-c41521c2236f%40isocpp.or=
g.
------=_Part_770_2012915352.1533905971845
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Friday, August 10, 2018 at 1:35:31 PM UTC+3, Ri=
chard Hodges wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;mar=
gin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D=
"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri, 10 Aug 20=
18 at 09:01, <<a onmousedown=3D"this.href=3D'javascript:';return=
true;" onclick=3D"this.href=3D'javascript:';return true;" href=3D"=
javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"86=
AUGac2DQAJ">mihailn...@gmail.com</a>> wrote:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex"><div dir=3D"ltr"><br><br>On Thursday, August 9, 2018 at 11:47=
:08 AM UTC+3, Richard Hodges wrote:<blockquote class=3D"gmail_quote" style=
=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"=
><div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Th=
u, 9 Aug 2018 at 10:05, <<a rel=3D"nofollow">mihailn...@gmail.com</a>>=
; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .=
8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><br>O=
n Wednesday, August 8, 2018 at 4:41:58 PM UTC+3, Olanrewaju Adetula wrote:<=
blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border=
-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">If by defining memb=
er function for example, an associated free function can be synthesized by =
the compiler or vice-versa, then we can call such function using either syn=
tax.</div><div><br></div></blockquote><div><br></div><div>I see, note howev=
er that if this is enabled it will be a breaking change.</div><div>=C2=A0</=
div><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;b=
order-left:1px #ccc solid;padding-left:1ex"><div><div class=3D"gmail_quote"=
>On Mon, Aug 6, 2018 at 4:26 PM, <span dir=3D"ltr"><<a rel=3D"nofollow"=
>mihailn...@gmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_q=
uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e=
x"><div dir=3D"ltr"><span><br><br>On Monday, August 6, 2018 at 6:14:30 PM U=
TC+3, Olanrewaju Adetula wrote:<blockquote class=3D"gmail_quote" style=3D"m=
argin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div=
dir=3D"ltr">
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0<br>If there is a completion there is potentia=
l code break or code change if suddenly the member is the better match, if =
there is a preferred call, there is a potential silent code change.</blockq=
uote>
Or the type author can define one and the language synthesizes the other vi=
a opt-in. With that, it won't matter anymore which syntax is used to in=
voke the function and any attempt to define any other will error as a resul=
t of redeclaration.<div><br></div></div></blockquote><div><br></div></span>=
<div>Can you elaborate?=C2=A0</div><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr"><div></div></div><div><br><div class=3D"g=
mail_quote"><span>On Mon, Aug 6, 2018 at 4:01 PM, <span dir=3D"ltr"><<a=
rel=3D"nofollow">mihailn...@gmail.com</a>></span> wrote:<br></span><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><span><div dir=3D"ltr"><div>Forgot to mention th=
e elephant in the room - this does not solve the fundamental issue, how do =
we define concept requirements for a class, is it in terms of member functi=
ons or in terms of free-standing ones.</div><div><br></div><div>However, th=
is can be a stepping stone towards UCS - after a period of time we could ma=
ke one of the two options the default.=C2=A0</div><div><span style=3D"displ=
ay:inline!important;float:none;background-color:transparent;color:rgb(34,34=
,34);font-family:"Arial","Helvetica",sans-serif;font-si=
ze:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacin=
g:normal;text-align:left;text-decoration:none;text-indent:0px;text-transfor=
m:none;white-space:normal;word-spacing:0px">It will be a non-breaking chang=
e, a</span>fter which the syntax will be used to let the user override the =
default behavior. =C2=A0</div><div><br></div><div>Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0</div><div>If there is a completion there is p=
otential code break or code change if suddenly the member is the better mat=
ch, if there is a preferred call, there is a potential silent code change.<=
/div><div><br></div><div>Silent code change is not so silent as it is not b=
y the class author but by the client code, introducing a free function can =
<i>hide</i> a class member function, called as free function.</div><div>See=
ms to me this is unavoidable, as other options, are either breaking (overlo=
ading) or still code changing (pick member always) and almost certainly mor=
e surprising, yet hides like this are something new.</div><div><br></div><d=
iv><br></div><div>Comments are welcome, I might write a proposal to give th=
is feature another go.</div><div>I personally can't decide for myself i=
f I want full UFC or just a way to call functions using member access synta=
x.</div></div></span><span><font color=3D"#888888"><span>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span><br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7=
-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd46=
0620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/dd460620-2bc7-47fd-<wbr>8e39-=
68a85003d9be%40isocpp.org</a><wbr>.<br>
</span></font></span></blockquote></div><br></div>
</blockquote></div><span>
<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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<br></span>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3=
-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734b=
c99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/734bc99d-2aa3-4af6-<wbr>b0b6-=
fb3ec3452d17%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></div></blockquote><div><br></div><div><br></div><di=
v>In any case, I investigated the UFCS situation further and, to my surpris=
e, it turned out, in its last stages only f(x,y) calling x.f(y) was conside=
red.</div><div>I wonder, were all the people asking for UFCS at CppConn las=
t year even aware of that! One can read more <a onmousedown=3D"this.href=3D=
'https://www.google.com/url?q\x3dhttps%3A%2F%2Fisocpp.org%2Fblog%2F2016=
%2F02%2Fa-bit-of-background-for-the-unified-call-proposal\x26sa\x3dD\x26snt=
z\x3d1\x26usg\x3dAFQjCNFrXRMjCPvNitAsGlOY6O1LyA1ddQ';return true;" oncl=
ick=3D"this.href=3D'https://www.google.com/url?q\x3dhttps%3A%2F%2Fisocp=
p.org%2Fblog%2F2016%2F02%2Fa-bit-of-background-for-the-unified-call-proposa=
l\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFrXRMjCPvNitAsGlOY6O1LyA1ddQ'=
;return true;" href=3D"https://isocpp.org/blog/2016/02/a-bit-of-background-=
for-the-unified-call-proposal" target=3D"_blank" rel=3D"nofollow">here</a> =
and <a onmousedown=3D"this.href=3D'http://www.google.com/url?q\x3dhttp%=
3A%2F%2Fwww.open-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fn458=
6.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1g7MRLKGRCtwaUkePf7cLyyRyMg&=
#39;;return true;" onclick=3D"this.href=3D'http://www.google.com/url?q\=
x3dhttp%3A%2F%2Fwww.open-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F201=
6%2Fn4586.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1g7MRLKGRCtwaUkePf7c=
LyyRyMg';return true;" href=3D"http://www.open-std.org/JTC1/SC22/WG21/d=
ocs/papers/2016/n4586.pdf" target=3D"_blank" rel=3D"nofollow">here</a> (n45=
86, search down for "unified").</div><div><br></div><div>Aside fr=
om the fact literally no one has ever requested <span style=3D"display:inli=
ne!important;float:none;background-color:transparent;color:rgb(34,34,34);fo=
nt-family:"Arial","Helvetica",sans-serif;font-size:13px=
;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:norma=
l;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;=
white-space:normal;word-spacing:0px">f(x,y) calling x.f(y), for obvious rea=
sons, and the only people to whom it is useful are library writers, I am no=
t surprised at all that even that was not accepted.</span></div><div><span =
style=3D"display:inline!important;float:none;background-color:transparent;c=
olor:rgb(34,34,34);font-family:"Arial","Helvetica",sans=
-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:400=
;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px=
;text-transform:none;white-space:normal;word-spacing:0px">Hell, even Bjarne=
<a onmousedown=3D"this.href=3D'http://www.google.com/url?q\x3dhttp%3A%=
2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2015%2Fp0131r0=
..pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFgArzPPqWPRJyeFIsqQqR6veJ1Ew&#=
39;;return true;" onclick=3D"this.href=3D'http://www.google.com/url?q\x=
3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2015=
%2Fp0131r0.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFgArzPPqWPRJyeFIsqQq=
R6veJ1Ew';return true;" href=3D"http://www.open-std.org/jtc1/sc22/wg21/=
docs/papers/2015/p0131r0.pdf" target=3D"_blank" rel=3D"nofollow">says</a> <=
/span><span style=3D"text-align:left;color:rgb(34,34,34);text-transform:non=
e;text-indent:0px;letter-spacing:normal;font-family:"Arial","=
;Helvetica",sans-serif;font-size:13px;font-variant:normal;font-weight:=
400;text-decoration:none;word-spacing:0px;display:inline!important;white-sp=
ace:normal;float:none;background-color:transparent"><i>"People who fea=
r side effects from generalization might then prefer x.f(y)<span style=3D"t=
ext-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;lett=
er-spacing:normal;font-family:"Arial","Helvetica",sans-=
serif;font-size:13px;font-variant:normal;font-weight:400;text-decoration:no=
ne;word-spacing:0px;display:inline!important;white-space:normal;float:none;=
background-color:transparent"> [to generalize]</span> because it is more re=
strictive".</i><br></span></div><div><br></div><div>Indeed, the possib=
ility tor trivially hide a class member function, is not pretty indeed.=C2=
=A0</div><div><br></div><div><br></div><div>With all that said, I still bel=
ieve there is hope. In n4586, it is noted<i> "Spicer liked the goal of=
the proposal, but wanted opt-in which would then consider members and non-=
members equally in an overload set."</i></div><div>and <i>"Yasski=
n said he=E2=80=99d feel more comfortable being able to see the feature in =
use for a long period of time, and would feel more comfortable seeing it in=
a TS. "</i></div><div><i><br></i></div><div>These are doable. We intr=
oduce UFCS as a scoped, user-side opt-in which will bring both free and mem=
ber functions into one overloading set.</div><div><br></div><div><font face=
=3D"courier new,monospace">struct C</font></div><div><font face=3D"courier =
new,monospace">{</font></div><div><font face=3D"courier new,monospace">=C2=
=A0 void func(double) {}</font></div><div><font face=3D"courier new,monospa=
ce">};</font></div><div><font face=3D"courier new,monospace"></font><br></d=
iv><div><font face=3D"courier new,monospace">// user</font></div><div><font=
face=3D"courier new,monospace"></font><br></div><div><font face=3D"courier=
new,monospace">void f(C& c)</font></div><div><font face=3D"courier new=
,monospace">{</font></div><div><font face=3D"courier new,monospace">=C2=A0 =
using C::func; //< bring func into the overloading set=C2=A0</font></div=
><div><font face=3D"courier new,monospace"></font><br></div><div><font face=
=3D"courier new,monospace">=C2=A0 func(c, -1);</font></div><div><font face=
=3D"courier new,monospace">}</font></div></div></blockquote><div><br></div>=
</div></div></blockquote><div>=C2=A0</div><blockquote class=3D"gmail_quote"=
style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-lef=
t:1ex"><div dir=3D"ltr"><div class=3D"gmail_quote"><div></div><div>This mak=
es a lot of sense. Perhaps there is a way to provide free-function overload=
s which can be replaced by specific free functions, without any concerns ab=
out backward compatibility:</div><div><br></div><div><font face=3D"monospac=
e, monospace">struct Foo {</font></div><div><font face=3D"monospace, monosp=
ace">=C2=A0 bool empty() const;</font></div><div><font face=3D"monospace, m=
onospace">=C2=A0 std::size_t size() const;</font></div><div><font face=3D"m=
onospace, monospace">};</font></div><div><font face=3D"monospace, monospace=
"><br></font></div><div><font face=3D"monospace, monospace">using auto Foo:=
:*;=C2=A0 =C2=A0// bring all public member functions of Foo into the outer =
namespace as free functions</font></div><div><font face=3D"monospace, monos=
pace"><br></font></div><div><font face=3D"monospace, monospace">// but with=
lower 'weight' than an actual free function declaration:</font></d=
iv><div><font face=3D"monospace, monospace">std::size_t size(Foo const&=
f);=C2=A0 =C2=A0 // auto-synthesised Foo::size(Foo const&) is now hidd=
en in preference to ::size(Foo const&)</font></div></div></div></blockq=
uote><div><br></div><div><br></div><div>Richard, this is the behavior sugge=
sted under UFCS, but was rejected. Here is <a onmousedown=3D"this.href=3D&#=
39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.reddit.com%2Fr%2Fcpp%2=
Fcomments%2F4d19gk%2Fawesome_wg21_paper_about_alternative_unified_call%2Fd1=
uqkpz\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_yuplzvGKf5i4U2IToOz0Dq-PQg&=
#39;;return true;" onclick=3D"this.href=3D'https://www.google.com/url?q=
\x3dhttps%3A%2F%2Fwww.reddit.com%2Fr%2Fcpp%2Fcomments%2F4d19gk%2Fawesome_wg=
21_paper_about_alternative_unified_call%2Fd1uqkpz\x26sa\x3dD\x26sntz\x3d1\x=
26usg\x3dAFQjCNH_yuplzvGKf5i4U2IToOz0Dq-PQg';return true;" href=3D"http=
s://www.reddit.com/r/cpp/comments/4d19gk/awesome_wg21_paper_about_alternati=
ve_unified_call/d1uqkpz" target=3D"_blank" rel=3D"nofollow">a great example=
why</a><font color=3D"#004000">.</font> =C2=A0</div></div></blockquote><di=
v><br></div><div>You mean we lost the chance to gain an important, amazing =
language feature for the sake of one unimaginative luddite who has a code b=
ase so ancient that he's unlikely to ever actually switch on the -std=
=3Dc++20 feature at all?</div></div></div></blockquote><div><br></div><div>=
<br>Richard, new code will be at risk.=C2=A0 The moment someone changes x.f=
(y) to f(x, y) he is no longer sure what is called as there might be some &=
#39;using' or even some co-worker "friendly wrapper" which hi=
des the call.=C2=A0</div><div><br></div><div>Honestly, the risk of you or a=
co-worker breaking your code is the biggest risk as there will be no names=
pace boundary: You refactor your code to use some helper functions, but som=
ewhere someone decided a method is not what they want exactly and created a=
free function to use in its place, hiding your call as well by incident.<b=
r>And the sad part is, there will be no warning - why should it be? Isn'=
;t this the expected behavior for free functions to hide members? Should th=
e co-worker be warned not to use free functions with the same name as membe=
rs? </div><div><br></div><div>Nasty situation, this is because we have lost=
intend by unifying the syntax. Actually, it is not problem with the syntax=
- intend can be expressed by qualified call - but the fact we had differen=
t defaults for so long.</div><div><br>The other default is also not accepta=
ble - to overload all. This will both change (pick "better" overl=
oaded) and break (redefinitions). <br>One might be able to fix the breakage=
s, but the silent-and-correct changes will be impossible to find and fix on=
a scale, not without rock-solid tools we don't have (yet?).</div><div>=
<br></div><div>Even then, will people be happy with the fact free functions=
now always must be qualified in order to be "free"?=C2=A0</div><=
div><br></div><div>The only way out in foreseeable (or probably ever) futur=
e is an opt-in.<br></div><div>=C2=A0</div><div><br></div><blockquote class=
=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #cc=
c solid;padding-left: 1ex;"><div dir=3D"ltr"><div class=3D"gmail_quote"><di=
v><br></div><div>This is why we can't have nice things. The ridiculous =
idea that everything in a new version of X must be compatible with every pr=
evious version of X has been the bane of the computing industry since the d=
emon-spawn of MSDOS.</div><div><br></div><div>=C2=A0</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex"><div dir=3D"ltr"><div><br></div><div>What we want is for loca=
l <font face=3D"courier new,monospace">size</font> <i>not to</i> hide. If t=
he user wants to hide he should use a qualified called, so to be explicit.=
=C2=A0</div><div><br></div><div>This will match current behavior.=C2=A0</di=
v><div><br></div><div>Currently, if the user wants to hide, he must use a f=
ree standing function which will force him to be explicit on the call site =
by changing the call syntax</div><div><font face=3D"courier new,monospace">=
<br></font></div><div><font face=3D"arial,sans-serif">from</font><font face=
=3D"courier new,monospace"> f.size() <font face=3D"arial,sans-serif">to</fo=
nt> size(f)</font></div><div><font face=3D"courier new,monospace"></font><b=
r></div><div>In the unified world, if the user wants to hide, he must again=
change the call syntax, this time</div><div><br></div><div>from <font face=
=3D"courier new,monospace">size(f) </font><font face=3D"arial,sans-serif">t=
o</font><font face=3D"courier new,monospace"> ::size(f)</font></div><div><f=
ont face=3D"courier new,monospace"></font>=C2=A0</div><div><br></div><block=
quote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left=
:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_quot=
e"><div><br></div><div><br></div><div>=C2=A0</div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex"><div dir=3D"ltr"><div><font face=3D"courier new,monospace"><br></font=
></div><div><font face=3D"arial,sans-serif">Now, if someone adds=C2=A0</fon=
t></div><div><font face=3D"courier new,monospace"><font face=3D"arial,sans-=
serif"></font><br></font></div><div><font face=3D"courier new,monospace"><s=
pan style=3D"text-align:left;text-transform:none;text-indent:0px;letter-spa=
cing:normal;font-family:courier new,monospace;font-size:13px;font-style:nor=
mal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0=
px;display:inline!important;white-space:normal;float:none;background-color:=
transparent">void func(C&, size_t);</span></font></div><div><font face=
=3D"courier new,monospace"><b></b><i></i><u></u><sub></sub><sup></sup><stri=
ke></strike><br></font></div><div><font face=3D"arial,sans-serif">By </font=
><font face=3D"arial,sans-serif"><a onmousedown=3D"this.href=3D'http://=
www.google.com/url?q\x3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%=
2Fdocs%2Fpapers%2F2016%2Fp0301r0.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQ=
jCNG0c9fPByA6sWhcNkdG8HHMR677UQ';return true;" onclick=3D"this.href=3D&=
#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fs=
c22%2Fwg21%2Fdocs%2Fpapers%2F2016%2Fp0301r0.html\x26sa\x3dD\x26sntz\x3d1\x2=
6usg\x3dAFQjCNG0c9fPByA6sWhcNkdG8HHMR677UQ';return true;" href=3D"http:=
//www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0301r0.html" target=3D"=
_blank" rel=3D"nofollow">the current rules</a> this will <i>hide</i> the me=
mber function, but now the condition is an error as the call to func is amb=
iguous.</font></div><div><font face=3D"arial,sans-serif"><br></font></div><=
div><font face=3D"arial,sans-serif"><div>(Needless to say, the above could =
be used in the future not to <i>enable</i>=C2=A0<span>UFCS, but to <i style=
=3D"border-bottom-color:rgb(34,34,34);border-bottom-style:none;border-botto=
m-width:0px;border-left-color:rgb(34,34,34);border-left-style:none;border-l=
eft-width:0px;border-right-color:rgb(34,34,34);border-right-style:none;bord=
er-right-width:0px;border-top-color:rgb(34,34,34);border-top-style:none;bor=
der-top-width:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;margin=
-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:=
0px">override</i> the rules.)</span><br></div></font></div><div><font face=
=3D"arial,sans-serif"><b></b><i></i><u></u><sub></sub><sup></sup><strike></=
strike><br></font></div><div>In n4586 it says <i>"...Some people wante=
d additional opt-in mechanisms to enable the new behavior, which was discus=
sed in great detail, but rejected"</i><i><br></i></div><div>What were =
those opt-ins? Was something like this considered, or the opt-ins were on t=
he declaration side (be it on the member/class or function) or on the call =
site?</div><div><br></div><div><br></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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-3079=
-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-3079-4619-9db0-c993dba7a8b6=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464=
c9ca-3079-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/7464c9ca-3079-4619-<wbr>9db0-=
c993dba7a8b6%40isocpp.org</a><wbr>.<br>
</blockquote></div></div>
</blockquote></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 onmousedown=3D"this.href=3D'javascript:';return true;" o=
nclick=3D"this.href=3D'javascript:';return true;" href=3D"javascrip=
t:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"86AUGac2DQA=
J">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a onmousedown=3D"this.href=3D'jav=
ascript:';return true;" onclick=3D"this.href=3D'javascript:';re=
turn true;" href=3D"javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obf=
uscated-mailto=3D"86AUGac2DQAJ">std-pr...@isocpp.org</a>.<br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4f04=
-4e26-a630-ce4b41363d19%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4f04-4e26-a630-ce4b41363d19=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e13=
18cb-4f04-4e26-a630-ce4b41363d19%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/9e1318cb-4f04-4e26-<wbr>a630-=
ce4b41363d19%40isocpp.org</a><wbr>.<br>
</blockquote></div></div>
</blockquote></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/74bb035d-c293-4101-a1ca-c41521c2236f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/74bb035d-c293-4101-a1ca-c41521c2236f=
%40isocpp.org</a>.<br />
------=_Part_770_2012915352.1533905971845--
------=_Part_769_957406383.1533905971844--
.
Author: Richard Hodges <hodges.r@gmail.com>
Date: Fri, 10 Aug 2018 15:31:53 +0200
Raw View
--000000000000024ff8057314c5cf
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Fri, 10 Aug 2018 at 14:57, <mihailnajdenov@gmail.com> wrote:
>
>
> On Friday, August 10, 2018 at 1:35:31 PM UTC+3, Richard Hodges wrote:
>>
>>
>>
>> On Fri, 10 Aug 2018 at 09:01, <mihailn...@gmail.com> wrote:
>>
>>>
>>>
>>> On Thursday, August 9, 2018 at 11:47:08 AM UTC+3, Richard Hodges wrote:
>>>>
>>>>
>>>>
>>>> On Thu, 9 Aug 2018 at 10:05, <mihailn...@gmail.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Wednesday, August 8, 2018 at 4:41:58 PM UTC+3, Olanrewaju Adetula
>>>>> wrote:
>>>>>>
>>>>>> If by defining member function for example, an associated free
>>>>>> function can be synthesized by the compiler or vice-versa, then we c=
an call
>>>>>> such function using either syntax.
>>>>>>
>>>>>>
>>>>> I see, note however that if this is enabled it will be a breaking
>>>>> change.
>>>>>
>>>>>
>>>>>> On Mon, Aug 6, 2018 at 4:26 PM, <mihailn...@gmail.com> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Of course going full UCS introduces the mirror set of
>>>>>>>>> vulnerability-to-change problems. If we can call members using fr=
ee
>>>>>>>>> standing, then these are either in competition or there is a pref=
erred
>>>>>>>>> call.
>>>>>>>>> If there is a completion there is potential code break or code
>>>>>>>>> change if suddenly the member is the better match, if there is a =
preferred
>>>>>>>>> call, there is a potential silent code change.
>>>>>>>>
>>>>>>>> Or the type author can define one and the language synthesizes the
>>>>>>>> other via opt-in. With that, it won't matter anymore which syntax =
is used
>>>>>>>> to invoke the function and any attempt to define any other will er=
ror as a
>>>>>>>> result of redeclaration.
>>>>>>>>
>>>>>>>>
>>>>>>> Can you elaborate?
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Aug 6, 2018 at 4:01 PM, <mihailn...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Forgot to mention the elephant in the room - this does not solve
>>>>>>>>> the fundamental issue, how do we define concept requirements for =
a class,
>>>>>>>>> is it in terms of member functions or in terms of free-standing o=
nes.
>>>>>>>>>
>>>>>>>>> However, this can be a stepping stone towards UCS - after a perio=
d
>>>>>>>>> of time we could make one of the two options the default.
>>>>>>>>> It will be a non-breaking change, after which the syntax will be
>>>>>>>>> used to let the user override the default behavior.
>>>>>>>>>
>>>>>>>>> Of course going full UCS introduces the mirror set of
>>>>>>>>> vulnerability-to-change problems. If we can call members using fr=
ee
>>>>>>>>> standing, then these are either in competition or there is a pref=
erred
>>>>>>>>> call.
>>>>>>>>> If there is a completion there is potential code break or code
>>>>>>>>> change if suddenly the member is the better match, if there is a =
preferred
>>>>>>>>> call, there is a potential silent code change.
>>>>>>>>>
>>>>>>>>> Silent code change is not so silent as it is not by the class
>>>>>>>>> author but by the client code, introducing a free function can
>>>>>>>>> *hide* a class member function, called as free function.
>>>>>>>>> Seems to me this is unavoidable, as other options, are either
>>>>>>>>> breaking (overloading) or still code changing (pick member always=
) and
>>>>>>>>> almost certainly more surprising, yet hides like this are somethi=
ng new.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Comments are welcome, I might write a proposal to give this
>>>>>>>>> feature another go.
>>>>>>>>> I personally can't decide for myself if I want full UFC or just a
>>>>>>>>> way to call functions using member access syntax.
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> You received this message because you are subscribed to the Googl=
e
>>>>>>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>>> send an email to std-proposal...@isocpp.org.
>>>>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>>>>> To view this discussion on the web visit
>>>>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd46=
0620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org
>>>>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd4=
60620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_sourc=
e=3Dfooter>
>>>>>>>>> .
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>> 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-proposal...@isocpp.org.
>>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>>> To view this discussion on the web visit
>>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc9=
9d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org
>>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc=
99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=3Demail&utm_source=
=3Dfooter>
>>>>>>> .
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> In any case, I investigated the UFCS situation further and, to my
>>>>> surprise, it turned out, in its last stages only f(x,y) calling x.f(y=
) was
>>>>> considered.
>>>>> I wonder, were all the people asking for UFCS at CppConn last year
>>>>> even aware of that! One can read more here
>>>>> <https://isocpp.org/blog/2016/02/a-bit-of-background-for-the-unified-=
call-proposal>
>>>>> and here
>>>>> <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/n4586.pdf>
>>>>> (n4586, search down for "unified").
>>>>>
>>>>> Aside from the fact literally no one has ever requested f(x,y)
>>>>> calling x.f(y), for obvious reasons, and the only people to whom it i=
s
>>>>> useful are library writers, I am not surprised at all that even that =
was
>>>>> not accepted.
>>>>> Hell, even Bjarne says
>>>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0131r0.pdf>=
*"People
>>>>> who fear side effects from generalization might then prefer x.f(y) [t=
o
>>>>> generalize] because it is more restrictive".*
>>>>>
>>>>> Indeed, the possibility tor trivially hide a class member function, i=
s
>>>>> not pretty indeed.
>>>>>
>>>>>
>>>>> With all that said, I still believe there is hope. In n4586, it is
>>>>> noted* "Spicer liked the goal of the proposal, but wanted opt-in
>>>>> which would then consider members and non-members equally in an overl=
oad
>>>>> set."*
>>>>> and *"Yasskin said he=E2=80=99d feel more comfortable being able to s=
ee the
>>>>> feature in use for a long period of time, and would feel more comfort=
able
>>>>> seeing it in a TS. "*
>>>>>
>>>>> These are doable. We introduce UFCS as a scoped, user-side opt-in
>>>>> which will bring both free and member functions into one overloading =
set.
>>>>>
>>>>> struct C
>>>>> {
>>>>> void func(double) {}
>>>>> };
>>>>>
>>>>> // user
>>>>>
>>>>> void f(C& c)
>>>>> {
>>>>> using C::func; //< bring func into the overloading set
>>>>>
>>>>> func(c, -1);
>>>>> }
>>>>>
>>>>
>>>>
>>>
>>>> This makes a lot of sense. Perhaps there is a way to provide
>>>> free-function overloads which can be replaced by specific free functio=
ns,
>>>> without any concerns about backward compatibility:
>>>>
>>>> struct Foo {
>>>> bool empty() const;
>>>> std::size_t size() const;
>>>> };
>>>>
>>>> using auto Foo::*; // bring all public member functions of Foo into
>>>> the outer namespace as free functions
>>>>
>>>> // but with lower 'weight' than an actual free function declaration:
>>>> std::size_t size(Foo const& f); // auto-synthesised Foo::size(Foo
>>>> const&) is now hidden in preference to ::size(Foo const&)
>>>>
>>>
>>>
>>> Richard, this is the behavior suggested under UFCS, but was rejected.
>>> Here is a great example why
>>> <https://www.reddit.com/r/cpp/comments/4d19gk/awesome_wg21_paper_about_=
alternative_unified_call/d1uqkpz>
>>> .
>>>
>>
>> You mean we lost the chance to gain an important, amazing language
>> feature for the sake of one unimaginative luddite who has a code base so
>> ancient that he's unlikely to ever actually switch on the -std=3Dc++20
>> feature at all?
>>
>
>
> Richard, new code will be at risk. The moment someone changes x.f(y) to
> f(x, y) he is no longer sure what is called as there *might* be some
> 'using' or even some co-worker "friendly wrapper" which hides the call.
>
> Honestly, the risk of you or a co-worker breaking your code is the bigges=
t
> risk as there will be no namespace boundary: You refactor your code to us=
e
> some helper functions, but somewhere someone decided a method is not what
> they want exactly and created a free function to use in its place, hiding
> your call as well by incident.
> And the sad part is, there will be no warning - why should it be? Isn't
> this the expected behavior for free functions to hide members? Should the
> co-worker be warned not to use free functions with the same name as
> members?
>
> Nasty situation, this is because we have lost intend by unifying the
> syntax. Actually, it is not problem with the syntax - intend can be
> expressed by qualified call - but the fact we had different defaults for =
so
> long.
>
>
> The other default is also not acceptable - to overload all. This will
> *both* change (pick "better" overloaded) *and* break (redefinitions).
> One might be able to fix the breakages, but the silent-and-correct change=
s
> will be impossible to find and fix on a scale, not without rock-solid too=
ls
> we don't have (yet?).
>
> Even then, will people be happy with the fact free functions now *always*
> must be qualified in order to be "free"?
>
>
> The only way out in foreseeable future (or probably ever) is an opt-in.
>
I have proposed an opt-in that would work further up the chain:
namespace foo {
struct bar {
void baz();
void baz2();
};
#if (__has_auto_free_functions)
using auto foo::baz; // automatically synthesises ::foo::baz(foo::bar&)
- this is an opt-in by the author of bar
using auto foo::*; // automatically synthesises ::foo::baz(foo::bar&)
and ::foo::baz2(foo::bar&) - this is also an opt-in by the author of bar
#endif
}
This would also allow newly modified libraries to be compatible with older
client codebases.
If older code-bases have free-function overloads that have the same name as
members with different effects, this is certainly an ambiguity of design
that needs addressing. However, in the face of intransigence, a compiler
switch would suffice:
$cc -std=3Dc++20 -fno-auto-free-functions nod.cpp #
__has_auto_free_functions is now false
>
>
>
>
>
>
>>
>> This is why we can't have nice things. The ridiculous idea that
>> everything in a new version of X must be compatible with every previous
>> version of X has been the bane of the computing industry since the
>> demon-spawn of MSDOS.
>>
>>
>>
>>>
>>> What we want is for local size *not to* hide. If the user wants to hide
>>> he should use a qualified called, so to be explicit.
>>>
>>> This will match current behavior.
>>>
>>> Currently, if the user wants to hide, he must use a free standing
>>> function which will force him to be explicit on the call site by changi=
ng
>>> the call syntax
>>>
>>> from f.size() to size(f)
>>>
>>> In the unified world, if the user wants to hide, he must again change
>>> the call syntax, this time
>>>
>>> from size(f) to ::size(f)
>>>
>>>
>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> Now, if someone adds
>>>>>
>>>>> void func(C&, size_t);
>>>>>
>>>>> By the current rules
>>>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0301r0.html=
>
>>>>> this will *hide* the member function, but now the condition is an
>>>>> error as the call to func is ambiguous.
>>>>>
>>>>> (Needless to say, the above could be used in the future not to
>>>>> *enable* UFCS, but to *override* the rules.)
>>>>>
>>>>> In n4586 it says *"...Some people wanted additional opt-in mechanisms
>>>>> to enable the new behavior, which was discussed in great detail, but
>>>>> rejected"*
>>>>> What were those opt-ins? Was something like this considered, or the
>>>>> opt-ins were on the declaration side (be it on the member/class or
>>>>> function) or on the call site?
>>>>>
>>>>>
>>>>> --
>>>>> 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, sen=
d
>>>>> an email to std-proposal...@isocpp.org.
>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca=
-3079-4619-9db0-c993dba7a8b6%40isocpp.org
>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9c=
a-3079-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium=3Demail&utm_source=3D=
footer>
>>>>> .
>>>>>
>>>> --
>>> 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-proposal...@isocpp.org.
>>> To post to this group, send email to std-pr...@isocpp.org.
>>> To view this discussion on the web visit
>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4=
f04-4e26-a630-ce4b41363d19%40isocpp.org
>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-=
4f04-4e26-a630-ce4b41363d19%40isocpp.org?utm_medium=3Demail&utm_source=3Dfo=
oter>
>>> .
>>>
>> --
> 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/1eb57a3b-836=
f-4a6b-8842-b2196293d30f%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1eb57a3b-83=
6f-4a6b-8842-b2196293d30f%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>
--=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/CALvx3hbBbAaOf_4O%3DwqWoq0zGxLu8Ax9cDWYRKj8T3H8h=
Brjsw%40mail.gmail.com.
--000000000000024ff8057314c5cf
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri=
, 10 Aug 2018 at 14:57, <<a href=3D"mailto:mihailnajdenov@gmail.com">mih=
ailnajdenov@gmail.com</a>> wrote:<br></div><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex=
"><div dir=3D"ltr"><br><br>On Friday, August 10, 2018 at 1:35:31 PM UTC+3, =
Richard Hodges wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;ma=
rgin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"lt=
r"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri, 10 Aug 2018 =
at 09:01, <<a rel=3D"nofollow">mihailn...@gmail.com</a>> wrote:<br></=
div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef=
t:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><br>On Thursday, Au=
gust 9, 2018 at 11:47:08 AM UTC+3, Richard Hodges wrote:<blockquote class=
=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc s=
olid;padding-left:1ex"><div dir=3D"ltr"><br><br><div class=3D"gmail_quote">=
<div dir=3D"ltr">On Thu, 9 Aug 2018 at 10:05, <<a rel=3D"nofollow">mihai=
ln...@gmail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div=
dir=3D"ltr"><br><br>On Wednesday, August 8, 2018 at 4:41:58 PM UTC+3, Olan=
rewaju Adetula wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;ma=
rgin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"lt=
r">If by defining member function for example, an associated free function =
can be synthesized by the compiler or vice-versa, then we can call such fun=
ction using either syntax.</div><div><br></div></blockquote><div><br></div>=
<div>I see, note however that if this is enabled it will be a breaking chan=
ge.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin=
:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div=
class=3D"gmail_quote">On Mon, Aug 6, 2018 at 4:26 PM, <span dir=3D"ltr">&=
lt;<a rel=3D"nofollow">mihailn...@gmail.com</a>></span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
solid;padding-left:1ex"><div dir=3D"ltr"><span><br><br>On Monday, August 6=
, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula wrote:<blockquote class=3D"g=
mail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;=
padding-left:1ex"><div dir=3D"ltr">
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0<br>If there is a completion there is potentia=
l code break or code change if suddenly the member is the better match, if =
there is a preferred call, there is a potential silent code change.</blockq=
uote>
Or the type author can define one and the language synthesizes the other vi=
a opt-in. With that, it won't matter anymore which syntax is used to in=
voke the function and any attempt to define any other will error as a resul=
t of redeclaration.<div><br></div></div></blockquote><div><br></div></span>=
<div>Can you elaborate?=C2=A0</div><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr"><div></div></div><div><br><div class=3D"g=
mail_quote"><span>On Mon, Aug 6, 2018 at 4:01 PM, <span dir=3D"ltr"><<a=
rel=3D"nofollow">mihailn...@gmail.com</a>></span> wrote:<br></span><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><span><div dir=3D"ltr"><div>Forgot to mention th=
e elephant in the room - this does not solve the fundamental issue, how do =
we define concept requirements for a class, is it in terms of member functi=
ons or in terms of free-standing ones.</div><div><br></div><div>However, th=
is can be a stepping stone towards UCS - after a period of time we could ma=
ke one of the two options the default.=C2=A0</div><div><span style=3D"displ=
ay:inline!important;float:none;background-color:transparent;color:rgb(34,34=
,34);font-family:"Arial","Helvetica",sans-serif;font-si=
ze:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacin=
g:normal;text-align:left;text-decoration:none;text-indent:0px;text-transfor=
m:none;white-space:normal;word-spacing:0px">It will be a non-breaking chang=
e, a</span>fter which the syntax will be used to let the user override the =
default behavior. =C2=A0</div><div><br></div><div>Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0</div><div>If there is a completion there is p=
otential code break or code change if suddenly the member is the better mat=
ch, if there is a preferred call, there is a potential silent code change.<=
/div><div><br></div><div>Silent code change is not so silent as it is not b=
y the class author but by the client code, introducing a free function can =
<i>hide</i> a class member function, called as free function.</div><div>See=
ms to me this is unavoidable, as other options, are either breaking (overlo=
ading) or still code changing (pick member always) and almost certainly mor=
e surprising, yet hides like this are something new.</div><div><br></div><d=
iv><br></div><div>Comments are welcome, I might write a proposal to give th=
is feature another go.</div><div>I personally can't decide for myself i=
f I want full UFC or just a way to call functions using member access synta=
x.</div></div></span><span><font color=3D"#888888"><span>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span><br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/dd460620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org</a>.<br>
</span></font></span></blockquote></div><br></div>
</blockquote></div><span>
<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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<br></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org</a>.<br>
</blockquote></div><br></div></blockquote><div><br></div><div><br></div><di=
v>In any case, I investigated the UFCS situation further and, to my surpris=
e, it turned out, in its last stages only f(x,y) calling x.f(y) was conside=
red.</div><div>I wonder, were all the people asking for UFCS at CppConn las=
t year even aware of that! One can read more <a href=3D"https://isocpp.org/=
blog/2016/02/a-bit-of-background-for-the-unified-call-proposal" rel=3D"nofo=
llow" target=3D"_blank">here</a> and <a href=3D"http://www.open-std.org/JTC=
1/SC22/WG21/docs/papers/2016/n4586.pdf" rel=3D"nofollow" target=3D"_blank">=
here</a> (n4586, search down for "unified").</div><div><br></div>=
<div>Aside from the fact literally no one has ever requested <span style=3D=
"display:inline!important;float:none;background-color:transparent;color:rgb=
(34,34,34);font-family:"Arial","Helvetica",sans-serif;f=
ont-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-=
spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-tr=
ansform:none;white-space:normal;word-spacing:0px">f(x,y) calling x.f(y), fo=
r obvious reasons, and the only people to whom it is useful are library wri=
ters, I am not surprised at all that even that was not accepted.</span></di=
v><div><span style=3D"display:inline!important;float:none;background-color:=
transparent;color:rgb(34,34,34);font-family:"Arial","Helveti=
ca",sans-serif;font-size:13px;font-style:normal;font-variant:normal;fo=
nt-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;te=
xt-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Hell=
, even Bjarne <a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers=
/2015/p0131r0.pdf" rel=3D"nofollow" target=3D"_blank">says</a> </span><span=
style=3D"text-align:left;color:rgb(34,34,34);text-transform:none;text-inde=
nt:0px;letter-spacing:normal;font-family:"Arial","Helvetica&=
quot;,sans-serif;font-size:13px;font-variant:normal;font-weight:400;text-de=
coration:none;word-spacing:0px;display:inline!important;white-space:normal;=
float:none;background-color:transparent"><i>"People who fear side effe=
cts from generalization might then prefer x.f(y)<span style=3D"text-align:l=
eft;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:=
normal;font-family:"Arial","Helvetica",sans-serif;font-=
size:13px;font-variant:normal;font-weight:400;text-decoration:none;word-spa=
cing:0px;display:inline!important;white-space:normal;float:none;background-=
color:transparent"> [to generalize]</span> because it is more restrictive&q=
uot;.</i><br></span></div><div><br></div><div>Indeed, the possibility tor t=
rivially hide a class member function, is not pretty indeed.=C2=A0</div><di=
v><br></div><div><br></div><div>With all that said, I still believe there i=
s hope. In n4586, it is noted<i> "Spicer liked the goal of the proposa=
l, but wanted opt-in which would then consider members and non-members equa=
lly in an overload set."</i></div><div>and <i>"Yasskin said he=E2=
=80=99d feel more comfortable being able to see the feature in use for a lo=
ng period of time, and would feel more comfortable seeing it in a TS. "=
;</i></div><div><i><br></i></div><div>These are doable. We introduce UFCS a=
s a scoped, user-side opt-in which will bring both free and member function=
s into one overloading set.</div><div><br></div><div><font face=3D"courier =
new,monospace">struct C</font></div><div><font face=3D"courier new,monospac=
e">{</font></div><div><font face=3D"courier new,monospace">=C2=A0 void func=
(double) {}</font></div><div><font face=3D"courier new,monospace">};</font>=
</div><div><font face=3D"courier new,monospace"></font><br></div><div><font=
face=3D"courier new,monospace">// user</font></div><div><font face=3D"cour=
ier new,monospace"></font><br></div><div><font face=3D"courier new,monospac=
e">void f(C& c)</font></div><div><font face=3D"courier new,monospace">{=
</font></div><div><font face=3D"courier new,monospace">=C2=A0 using C::func=
; //< bring func into the overloading set=C2=A0</font></div><div><font f=
ace=3D"courier new,monospace"></font><br></div><div><font face=3D"courier n=
ew,monospace">=C2=A0 func(c, -1);</font></div><div><font face=3D"courier ne=
w,monospace">}</font></div></div></blockquote><div><br></div></div></div></=
blockquote><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div di=
r=3D"ltr"><div class=3D"gmail_quote"><div></div><div>This makes a lot of se=
nse. Perhaps there is a way to provide free-function overloads which can be=
replaced by specific free functions, without any concerns about backward c=
ompatibility:</div><div><br></div><div><font face=3D"monospace, monospace">=
struct Foo {</font></div><div><font face=3D"monospace, monospace">=C2=A0 bo=
ol empty() const;</font></div><div><font face=3D"monospace, monospace">=C2=
=A0 std::size_t size() const;</font></div><div><font face=3D"monospace, mon=
ospace">};</font></div><div><font face=3D"monospace, monospace"><br></font>=
</div><div><font face=3D"monospace, monospace">using auto Foo::*;=C2=A0 =C2=
=A0// bring all public member functions of Foo into the outer namespace as =
free functions</font></div><div><font face=3D"monospace, monospace"><br></f=
ont></div><div><font face=3D"monospace, monospace">// but with lower 'w=
eight' than an actual free function declaration:</font></div><div><font=
face=3D"monospace, monospace">std::size_t size(Foo const& f);=C2=A0 =
=C2=A0 // auto-synthesised Foo::size(Foo const&) is now hidden in prefe=
rence to ::size(Foo const&)</font></div></div></div></blockquote><div><=
br></div><div><br></div><div>Richard, this is the behavior suggested under =
UFCS, but was rejected. Here is <a href=3D"https://www.reddit.com/r/cpp/com=
ments/4d19gk/awesome_wg21_paper_about_alternative_unified_call/d1uqkpz" rel=
=3D"nofollow" target=3D"_blank">a great example why</a><font color=3D"#0040=
00">.</font> =C2=A0</div></div></blockquote><div><br></div><div>You mean we=
lost the chance to gain an important, amazing language feature for the sak=
e of one unimaginative luddite who has a code base so ancient that he's=
unlikely to ever actually switch on the -std=3Dc++20 feature at all?</div>=
</div></div></blockquote><div><br></div><div><div><div style=3D"background-=
color:transparent;border-bottom-color:rgb(34,34,34);border-bottom-style:non=
e;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-style=
:none;border-left-width:0px;border-right-color:rgb(34,34,34);border-right-s=
tyle:none;border-right-width:0px;border-top-color:rgb(34,34,34);border-top-=
style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;font-sty=
le:normal;font-variant:normal;font-weight:400;letter-spacing:normal;margin-=
bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0=
px;padding-left:0px;padding-right:0px;padding-top:0px;text-align:left;text-=
decoration:none;text-indent:0px;text-transform:none;white-space:normal;word=
-spacing:0px"><br style=3D"background-clip:border-box;background-color:tran=
sparent;background-image:none;background-origin:padding-box;background-repe=
at:repeat;background-size:auto;border-bottom-color:rgb(34,34,34);border-bot=
tom-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);bord=
er-left-style:none;border-left-width:0px;border-right-color:rgb(34,34,34);b=
order-right-style:none;border-right-width:0px;border-top-color:rgb(34,34,34=
);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-size:=
13px;height:auto;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-=
top:0px;min-width:0px;overflow:visible;overflow-x:visible;overflow-y:visibl=
e;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px"></=
div><div style=3D"background-color:transparent;border-bottom-color:rgb(34,3=
4,34);border-bottom-style:none;border-bottom-width:0px;border-left-color:rg=
b(34,34,34);border-left-style:none;border-left-width:0px;border-right-color=
:rgb(34,34,34);border-right-style:none;border-right-width:0px;border-top-co=
lor:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,3=
4,34);font-size:13px;font-style:normal;font-variant:normal;font-weight:400;=
letter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-right:0px;ma=
rgin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-=
top:0px;text-align:left;text-decoration:none;text-indent:0px;text-transform=
:none;white-space:normal;word-spacing:0px">Richard, new code will be at ris=
k.=C2=A0 The moment someone changes x.f(y) to f(x, y) he is no longer sure =
what is called as there <i style=3D"background-clip:border-box;background-c=
olor:transparent;background-image:none;background-origin:padding-box;backgr=
ound-repeat:repeat;background-size:auto;border-bottom-color:rgb(34,34,34);b=
order-bottom-style:none;border-bottom-width:0px;border-left-color:rgb(34,34=
,34);border-left-style:none;border-left-width:0px;border-right-color:rgb(34=
,34,34);border-right-style:none;border-right-width:0px;border-top-color:rgb=
(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);f=
ont-size:13px;height:auto;margin-bottom:0px;margin-left:0px;margin-right:0p=
x;margin-top:0px;min-width:0px;overflow:visible;overflow-x:visible;overflow=
-y:visible;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-to=
p:0px">might</i> be some 'using' or even some co-worker "frien=
dly wrapper" which hides the call.=C2=A0</div><div style=3D"background=
-color:transparent;border-bottom-color:rgb(34,34,34);border-bottom-style:no=
ne;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-styl=
e:none;border-left-width:0px;border-right-color:rgb(34,34,34);border-right-=
style:none;border-right-width:0px;border-top-color:rgb(34,34,34);border-top=
-style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;font-st=
yle:normal;font-variant:normal;font-weight:400;letter-spacing:normal;margin=
-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:=
0px;padding-left:0px;padding-right:0px;padding-top:0px;text-align:left;text=
-decoration:none;text-indent:0px;text-transform:none;white-space:normal;wor=
d-spacing:0px"><br style=3D"background-clip:border-box;background-color:tra=
nsparent;background-image:none;background-origin:padding-box;background-rep=
eat:repeat;background-size:auto;border-bottom-color:rgb(34,34,34);border-bo=
ttom-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);bor=
der-left-style:none;border-left-width:0px;border-right-color:rgb(34,34,34);=
border-right-style:none;border-right-width:0px;border-top-color:rgb(34,34,3=
4);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-size=
:13px;height:auto;margin-bottom:0px;margin-left:0px;margin-right:0px;margin=
-top:0px;min-width:0px;overflow:visible;overflow-x:visible;overflow-y:visib=
le;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px"><=
/div><div style=3D"background-color:transparent;border-bottom-color:rgb(34,=
34,34);border-bottom-style:none;border-bottom-width:0px;border-left-color:r=
gb(34,34,34);border-left-style:none;border-left-width:0px;border-right-colo=
r:rgb(34,34,34);border-right-style:none;border-right-width:0px;border-top-c=
olor:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,=
34,34);font-size:13px;font-style:normal;font-variant:normal;font-weight:400=
;letter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-right:0px;m=
argin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;padding=
-top:0px;text-align:left;text-decoration:none;text-indent:0px;text-transfor=
m:none;white-space:normal;word-spacing:0px">Honestly, the risk of you or a =
co-worker breaking your code is the biggest risk as there will be no namesp=
ace boundary: You refactor your code to use some helper functions, but some=
where someone decided a method is not what they want exactly and created a =
free function to use in its place, hiding your call as well by incident.</d=
iv><div style=3D"background-color:transparent;border-bottom-color:rgb(34,34=
,34);border-bottom-style:none;border-bottom-width:0px;border-left-color:rgb=
(34,34,34);border-left-style:none;border-left-width:0px;border-right-color:=
rgb(34,34,34);border-right-style:none;border-right-width:0px;border-top-col=
or:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,34=
,34);font-size:13px;font-style:normal;font-variant:normal;font-weight:400;l=
etter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-right:0px;mar=
gin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-t=
op:0px;text-align:left;text-decoration:none;text-indent:0px;text-transform:=
none;white-space:normal;word-spacing:0px">And the sad part is, there will b=
e no warning - why should it be? Isn't this the expected behavior for f=
ree functions to hide members? Should the co-worker be warned not to use fr=
ee functions with the same name as members?=C2=A0</div><div style=3D"backgr=
ound-color:transparent;border-bottom-color:rgb(34,34,34);border-bottom-styl=
e:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-=
style:none;border-left-width:0px;border-right-color:rgb(34,34,34);border-ri=
ght-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);border=
-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;fon=
t-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;ma=
rgin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bot=
tom:0px;padding-left:0px;padding-right:0px;padding-top:0px;text-align:left;=
text-decoration:none;text-indent:0px;text-transform:none;white-space:normal=
;word-spacing:0px"><br style=3D"background-clip:border-box;background-color=
:transparent;background-image:none;background-origin:padding-box;background=
-repeat:repeat;background-size:auto;border-bottom-color:rgb(34,34,34);borde=
r-bottom-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34)=
;border-left-style:none;border-left-width:0px;border-right-color:rgb(34,34,=
34);border-right-style:none;border-right-width:0px;border-top-color:rgb(34,=
34,34);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-=
size:13px;height:auto;margin-bottom:0px;margin-left:0px;margin-right:0px;ma=
rgin-top:0px;min-width:0px;overflow:visible;overflow-x:visible;overflow-y:v=
isible;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0p=
x"></div><div style=3D"background-color:transparent;border-bottom-color:rgb=
(34,34,34);border-bottom-style:none;border-bottom-width:0px;border-left-col=
or:rgb(34,34,34);border-left-style:none;border-left-width:0px;border-right-=
color:rgb(34,34,34);border-right-style:none;border-right-width:0px;border-t=
op-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb=
(34,34,34);font-size:13px;font-style:normal;font-variant:normal;font-weight=
:400;letter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-right:0=
px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;pad=
ding-top:0px;text-align:left;text-decoration:none;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px">Nasty situation, this is be=
cause we have lost intend by unifying the syntax. Actually, it is not probl=
em with the syntax - intend can be expressed by qualified call - but the fa=
ct we had different defaults for so long.</div><div style=3D"background-col=
or:transparent;border-bottom-color:rgb(34,34,34);border-bottom-style:none;b=
order-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-style:no=
ne;border-left-width:0px;border-right-color:rgb(34,34,34);border-right-styl=
e:none;border-right-width:0px;border-top-color:rgb(34,34,34);border-top-sty=
le:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;font-style:=
normal;font-variant:normal;font-weight:400;letter-spacing:normal;margin-bot=
tom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;=
padding-left:0px;padding-right:0px;padding-top:0px;text-align:left;text-dec=
oration:none;text-indent:0px;text-transform:none;white-space:normal;word-sp=
acing:0px"><br style=3D"background-clip:border-box;background-color:transpa=
rent;background-image:none;background-origin:padding-box;background-repeat:=
repeat;background-size:auto;border-bottom-color:rgb(34,34,34);border-bottom=
-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-=
left-style:none;border-left-width:0px;border-right-color:rgb(34,34,34);bord=
er-right-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);b=
order-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13p=
x;height:auto;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top=
:0px;min-width:0px;overflow:visible;overflow-x:visible;overflow-y:visible;p=
adding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px"></div=
><div style=3D"background-color:transparent;border-bottom-color:rgb(34,34,3=
4);border-bottom-style:none;border-bottom-width:0px;border-left-color:rgb(3=
4,34,34);border-left-style:none;border-left-width:0px;border-right-color:rg=
b(34,34,34);border-right-style:none;border-right-width:0px;border-top-color=
:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,34,3=
4);font-size:13px;font-style:normal;font-variant:normal;font-weight:400;let=
ter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-right:0px;margi=
n-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top=
:0px;text-align:left;text-decoration:none;text-indent:0px;text-transform:no=
ne;white-space:normal;word-spacing:0px"><br style=3D"background-clip:border=
-box;background-color:transparent;background-image:none;background-origin:p=
adding-box;background-repeat:repeat;background-size:auto;border-bottom-colo=
r:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px;border-lef=
t-color:rgb(34,34,34);border-left-style:none;border-left-width:0px;border-r=
ight-color:rgb(34,34,34);border-right-style:none;border-right-width:0px;bor=
der-top-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;colo=
r:rgb(34,34,34);font-size:13px;height:auto;margin-bottom:0px;margin-left:0p=
x;margin-right:0px;margin-top:0px;min-width:0px;overflow:visible;overflow-x=
:visible;overflow-y:visible;padding-bottom:0px;padding-left:0px;padding-rig=
ht:0px;padding-top:0px"></div><div style=3D"background-color:transparent;bo=
rder-bottom-color:rgb(34,34,34);border-bottom-style:none;border-bottom-widt=
h:0px;border-left-color:rgb(34,34,34);border-left-style:none;border-left-wi=
dth:0px;border-right-color:rgb(34,34,34);border-right-style:none;border-rig=
ht-width:0px;border-top-color:rgb(34,34,34);border-top-style:none;border-to=
p-width:0px;color:rgb(34,34,34);font-size:13px;font-style:normal;font-varia=
nt:normal;font-weight:400;letter-spacing:normal;margin-bottom:0px;margin-le=
ft:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:0px;=
padding-right:0px;padding-top:0px;text-align:left;text-decoration:none;text=
-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">The ot=
her default is also not acceptable - to overload all. This will <i style=3D=
"background-clip:border-box;background-color:transparent;background-image:n=
one;background-origin:padding-box;background-repeat:repeat;background-size:=
auto;border-bottom-color:rgb(34,34,34);border-bottom-style:none;border-bott=
om-width:0px;border-left-color:rgb(34,34,34);border-left-style:none;border-=
left-width:0px;border-right-color:rgb(34,34,34);border-right-style:none;bor=
der-right-width:0px;border-top-color:rgb(34,34,34);border-top-style:none;bo=
rder-top-width:0px;color:rgb(34,34,34);font-size:13px;height:auto;margin-bo=
ttom:0px;margin-left:0px;margin-right:0px;margin-top:0px;min-width:0px;over=
flow:visible;overflow-x:visible;overflow-y:visible;padding-bottom:0px;paddi=
ng-left:0px;padding-right:0px;padding-top:0px">both</i> change (pick "=
better" overloaded) <i style=3D"background-clip:border-box;background-=
color:transparent;background-image:none;background-origin:padding-box;backg=
round-repeat:repeat;background-size:auto;border-bottom-color:rgb(34,34,34);=
border-bottom-style:none;border-bottom-width:0px;border-left-color:rgb(34,3=
4,34);border-left-style:none;border-left-width:0px;border-right-color:rgb(3=
4,34,34);border-right-style:none;border-right-width:0px;border-top-color:rg=
b(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);=
font-size:13px;height:auto;margin-bottom:0px;margin-left:0px;margin-right:0=
px;margin-top:0px;min-width:0px;overflow:visible;overflow-x:visible;overflo=
w-y:visible;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-t=
op:0px">and</i> break (redefinitions).=C2=A0</div><div style=3D"background-=
color:transparent;border-bottom-color:rgb(34,34,34);border-bottom-style:non=
e;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-style=
:none;border-left-width:0px;border-right-color:rgb(34,34,34);border-right-s=
tyle:none;border-right-width:0px;border-top-color:rgb(34,34,34);border-top-=
style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;font-sty=
le:normal;font-variant:normal;font-weight:400;letter-spacing:normal;margin-=
bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0=
px;padding-left:0px;padding-right:0px;padding-top:0px;text-align:left;text-=
decoration:none;text-indent:0px;text-transform:none;white-space:normal;word=
-spacing:0px">One might be able to fix the breakages, but the silent-and-co=
rrect changes will be impossible to find and fix on a scale, not without ro=
ck-solid tools we don't have (yet?).</div><div style=3D"background-colo=
r:transparent;border-bottom-color:rgb(34,34,34);border-bottom-style:none;bo=
rder-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-style:non=
e;border-left-width:0px;border-right-color:rgb(34,34,34);border-right-style=
:none;border-right-width:0px;border-top-color:rgb(34,34,34);border-top-styl=
e:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;font-style:n=
ormal;font-variant:normal;font-weight:400;letter-spacing:normal;margin-bott=
om:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;p=
adding-left:0px;padding-right:0px;padding-top:0px;text-align:left;text-deco=
ration:none;text-indent:0px;text-transform:none;white-space:normal;word-spa=
cing:0px"><br></div><div style=3D"background-color:transparent;border-botto=
m-color:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px;bord=
er-left-color:rgb(34,34,34);border-left-style:none;border-left-width:0px;bo=
rder-right-color:rgb(34,34,34);border-right-style:none;border-right-width:0=
px;border-top-color:rgb(34,34,34);border-top-style:none;border-top-width:0p=
x;color:rgb(34,34,34);font-size:13px;font-style:normal;font-variant:normal;=
font-weight:400;letter-spacing:normal;margin-bottom:0px;margin-left:0px;mar=
gin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-ri=
ght:0px;padding-top:0px;text-align:left;text-decoration:none;text-indent:0p=
x;text-transform:none;white-space:normal;word-spacing:0px">Even then, will =
people be happy with the fact free functions now <i style=3D"border-bottom-=
color:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px;border=
-left-color:rgb(34,34,34);border-left-style:none;border-left-width:0px;bord=
er-right-color:rgb(34,34,34);border-right-style:none;border-right-width:0px=
;border-top-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;=
margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-b=
ottom:0px;padding-left:0px;padding-right:0px;padding-top:0px">always</i> mu=
st be qualified in order to be "free"?=C2=A0</div><div style=3D"b=
ackground-color:transparent;border-bottom-color:rgb(34,34,34);border-bottom=
-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-=
left-style:none;border-left-width:0px;border-right-color:rgb(34,34,34);bord=
er-right-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);b=
order-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13p=
x;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:norm=
al;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;paddin=
g-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;text-align:=
left;text-decoration:none;text-indent:0px;text-transform:none;white-space:n=
ormal;word-spacing:0px"><br></div><div style=3D"background-color:transparen=
t;border-bottom-color:rgb(34,34,34);border-bottom-style:none;border-bottom-=
width:0px;border-left-color:rgb(34,34,34);border-left-style:none;border-lef=
t-width:0px;border-right-color:rgb(34,34,34);border-right-style:none;border=
-right-width:0px;border-top-color:rgb(34,34,34);border-top-style:none;borde=
r-top-width:0px;color:rgb(34,34,34);font-size:13px;font-style:normal;font-v=
ariant:normal;font-weight:400;letter-spacing:normal;margin-bottom:0px;margi=
n-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:=
0px;padding-right:0px;padding-top:0px;text-align:left;text-decoration:none;=
text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><b=
r style=3D"background-clip:border-box;background-color:transparent;backgrou=
nd-image:none;background-origin:padding-box;background-repeat:repeat;backgr=
ound-size:auto;border-bottom-color:rgb(34,34,34);border-bottom-style:none;b=
order-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-style:no=
ne;border-left-width:0px;border-right-color:rgb(34,34,34);border-right-styl=
e:none;border-right-width:0px;border-top-color:rgb(34,34,34);border-top-sty=
le:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;height:auto=
;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;min-widt=
h:0px;overflow:visible;overflow-x:visible;overflow-y:visible;padding-bottom=
:0px;padding-left:0px;padding-right:0px;padding-top:0px"></div><div style=
=3D"background-color:transparent;border-bottom-color:rgb(34,34,34);border-b=
ottom-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);bo=
rder-left-style:none;border-left-width:0px;border-right-color:rgb(34,34,34)=
;border-right-style:none;border-right-width:0px;border-top-color:rgb(34,34,=
34);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-siz=
e:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing=
:normal;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;p=
adding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;text-a=
lign:left;text-decoration:none;text-indent:0px;text-transform:none;white-sp=
ace:normal;word-spacing:0px">The only way out in foreseeable<span style=3D"=
display:inline!important;float:none;background-color:transparent;color:rgb(=
34,34,34);font-family:"Arial","Helvetica",sans-serif;fo=
nt-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-s=
pacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-tra=
nsform:none;white-space:normal;word-spacing:0px"> future</span> (or probabl=
y ever) is an opt-in.</div></div></div></div></blockquote><div><br></div><d=
iv>I have proposed an opt-in that would work further up the chain:</div><di=
v><br></div><div><font face=3D"monospace, monospace">namespace foo {</font>=
</div><div><font face=3D"monospace, monospace">=C2=A0 struct bar {</font></=
div><div><font face=3D"monospace, monospace">=C2=A0 =C2=A0 void baz();</fon=
t></div><div><font face=3D"monospace, monospace">=C2=A0 =C2=A0 void baz2();=
</font></div><div><font face=3D"monospace, monospace">=C2=A0 };<br></font><=
/div><div><font face=3D"monospace, monospace"><br></font></div><div><font f=
ace=3D"monospace, monospace">#if (__has_auto_free_functions)</font></div><d=
iv><div><font face=3D"monospace, monospace">=C2=A0 using auto foo::baz;=C2=
=A0 // automatically synthesises ::foo::baz(foo::bar&) - this is an opt=
-in by the author of bar</font></div><div><font face=3D"monospace, monospac=
e"><br></font></div><div><font face=3D"monospace, monospace">=C2=A0 using a=
uto foo::*;=C2=A0 // automatically synthesises ::foo::baz(foo::bar&)=C2=
=A0 and ::foo::baz2(foo::bar&) - this is also an opt-in by the author o=
f bar</font></div></div><div><font face=3D"monospace, monospace">#endif=C2=
=A0=C2=A0</font></div><div><font face=3D"monospace, monospace">}</font></di=
v><div><br></div><div>This would also allow newly modified libraries to be =
compatible with older client codebases.</div><div><br></div><div>If older c=
ode-bases have free-function overloads that have the same name as members w=
ith different effects, this is certainly an ambiguity of design that needs =
addressing. However, in the face of intransigence, a compiler switch would =
suffice:</div><div><br></div><div><font face=3D"monospace, monospace">$cc -=
std=3Dc++20 -fno-auto-free-functions nod.cpp=C2=A0 # __has_auto_free_functi=
ons is now false</font></div><div><br></div><div><br><br></div><div>=C2=A0<=
/div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-le=
ft:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div><div style=
=3D"background-color:transparent;border-bottom-color:rgb(34,34,34);border-b=
ottom-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);bo=
rder-left-style:none;border-left-width:0px;border-right-color:rgb(34,34,34)=
;border-right-style:none;border-right-width:0px;border-top-color:rgb(34,34,=
34);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-siz=
e:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing=
:normal;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;p=
adding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;text-a=
lign:left;text-decoration:none;text-indent:0px;text-transform:none;white-sp=
ace:normal;word-spacing:0px"><br style=3D"background-clip:border-box;backgr=
ound-color:transparent;background-image:none;background-origin:padding-box;=
background-repeat:repeat;background-size:auto;border-bottom-color:rgb(34,34=
,34);border-bottom-style:none;border-bottom-width:0px;border-left-color:rgb=
(34,34,34);border-left-style:none;border-left-width:0px;border-right-color:=
rgb(34,34,34);border-right-style:none;border-right-width:0px;border-top-col=
or:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,34=
,34);font-size:13px;height:auto;margin-bottom:0px;margin-left:0px;margin-ri=
ght:0px;margin-top:0px;min-width:0px;overflow:visible;overflow-x:visible;ov=
erflow-y:visible;padding-bottom:0px;padding-left:0px;padding-right:0px;padd=
ing-top:0px"></div><div style=3D"background-color:transparent;border-bottom=
-color:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px;borde=
r-left-color:rgb(34,34,34);border-left-style:none;border-left-width:0px;bor=
der-right-color:rgb(34,34,34);border-right-style:none;border-right-width:0p=
x;border-top-color:rgb(34,34,34);border-top-style:none;border-top-width:0px=
;color:rgb(34,34,34);font-size:13px;font-style:normal;font-variant:normal;f=
ont-weight:400;letter-spacing:normal;margin-bottom:0px;margin-left:0px;marg=
in-right:0px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-rig=
ht:0px;padding-top:0px;text-align:left;text-decoration:none;text-indent:0px=
;text-transform:none;white-space:normal;word-spacing:0px"><br style=3D"bord=
er-bottom-color:rgb(34,34,34);border-bottom-style:none;border-bottom-width:=
0px;border-left-color:rgb(34,34,34);border-left-style:none;border-left-widt=
h:0px;border-right-color:rgb(34,34,34);border-right-style:none;border-right=
-width:0px;border-top-color:rgb(34,34,34);border-top-style:none;border-top-=
width:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px=
;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px"></d=
iv></div><div>=C2=A0</div><b></b><i></i><u></u><sub></sub><sup></sup><strik=
e></strike><br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1e=
x"><div dir=3D"ltr"><div class=3D"gmail_quote"><div><br></div><div>This is =
why we can't have nice things. The ridiculous idea that everything in a=
new version of X must be compatible with every previous version of X has b=
een the bane of the computing industry since the demon-spawn of MSDOS.</div=
><div><br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D=
"ltr"><div><br></div><div>What we want is for local <font face=3D"courier n=
ew,monospace">size</font> <i>not to</i> hide. If the user wants to hide he =
should use a qualified called, so to be explicit.=C2=A0</div><div><br></div=
><div>This will match current behavior.=C2=A0</div><div><br></div><div>Curr=
ently, if the user wants to hide, he must use a free standing function whic=
h will force him to be explicit on the call site by changing the call synta=
x</div><div><font face=3D"courier new,monospace"><br></font></div><div><fon=
t face=3D"arial,sans-serif">from</font><font face=3D"courier new,monospace"=
> f.size() <font face=3D"arial,sans-serif">to</font> size(f)</font></div><d=
iv><font face=3D"courier new,monospace"></font><br></div><div>In the unifie=
d world, if the user wants to hide, he must again change the call syntax, t=
his time</div><div><br></div><div>from <font face=3D"courier new,monospace"=
>size(f) </font><font face=3D"arial,sans-serif">to</font><font face=3D"cour=
ier new,monospace"> ::size(f)</font></div><div><font face=3D"courier new,mo=
nospace"></font>=C2=A0</div><div><br></div><blockquote class=3D"gmail_quote=
" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-le=
ft:1ex"><div dir=3D"ltr"><div class=3D"gmail_quote"><div><br></div><div><br=
></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0=
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><di=
v><font face=3D"courier new,monospace"><br></font></div><div><font face=3D"=
arial,sans-serif">Now, if someone adds=C2=A0</font></div><div><font face=3D=
"courier new,monospace"><font face=3D"arial,sans-serif"></font><br></font><=
/div><div><font face=3D"courier new,monospace"><span style=3D"text-align:le=
ft;text-transform:none;text-indent:0px;letter-spacing:normal;font-family:co=
urier new,monospace;font-size:13px;font-style:normal;font-variant:normal;fo=
nt-weight:400;text-decoration:none;word-spacing:0px;display:inline!importan=
t;white-space:normal;float:none;background-color:transparent">void func(C&a=
mp;, size_t);</span></font></div><div><font face=3D"courier new,monospace">=
<b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br></font></di=
v><div><font face=3D"arial,sans-serif">By </font><font face=3D"arial,sans-s=
erif"><a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0=
301r0.html" rel=3D"nofollow" target=3D"_blank">the current rules</a> this w=
ill <i>hide</i> the member function, but now the condition is an error as t=
he call to func is ambiguous.</font></div><div><font face=3D"arial,sans-ser=
if"><br></font></div><div><font face=3D"arial,sans-serif"><div>(Needless to=
say, the above could be used in the future not to <i>enable</i>=C2=A0<span=
>UFCS, but to <i style=3D"border-bottom-color:rgb(34,34,34);border-bottom-s=
tyle:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-le=
ft-style:none;border-left-width:0px;border-right-color:rgb(34,34,34);border=
-right-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);bor=
der-top-style:none;border-top-width:0px;margin-bottom:0px;margin-left:0px;m=
argin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-=
right:0px;padding-top:0px">override</i> the rules.)</span><br></div></font>=
</div><div><font face=3D"arial,sans-serif"><b></b><i></i><u></u><sub></sub>=
<sup></sup><strike></strike><br></font></div><div>In n4586 it says <i>"=
;...Some people wanted additional opt-in mechanisms to enable the new behav=
ior, which was discussed in great detail, but rejected"</i><i><br></i>=
</div><div>What were those opt-ins? Was something like this considered, or =
the opt-ins were on the declaration side (be it on the member/class or func=
tion) or on the call site?</div><div><br></div><div><br></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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</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/7464c9ca-3079-4619-9db0-c993dba7a8b6%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/7464c9ca-3079-4619-9db0-c993dba7a8b6%40isocpp.org</a>.<br>
</blockquote></div></div>
</blockquote></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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</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/9e1318cb-4f04-4e26-a630-ce4b41363d19%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/9e1318cb-4f04-4e26-a630-ce4b41363d19%40isocpp.org</a>.<br>
</blockquote></div></div>
</blockquote></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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/1eb57a3b-836f-4a6b-8842-b2196293d30f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1eb57a3b-836f-=
4a6b-8842-b2196293d30f%40isocpp.org</a>.<br>
</blockquote></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/CALvx3hbBbAaOf_4O%3DwqWoq0zGxLu8Ax9cD=
WYRKj8T3H8hBrjsw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALvx3hbBbAaOf_=
4O%3DwqWoq0zGxLu8Ax9cDWYRKj8T3H8hBrjsw%40mail.gmail.com</a>.<br />
--000000000000024ff8057314c5cf--
.
Author: mihailnajdenov@gmail.com
Date: Fri, 10 Aug 2018 07:57:29 -0700 (PDT)
Raw View
------=_Part_794_1068884719.1533913049542
Content-Type: multipart/alternative;
boundary="----=_Part_795_813294755.1533913049545"
------=_Part_795_813294755.1533913049545
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Friday, August 10, 2018 at 4:32:07 PM UTC+3, Richard Hodges wrote:
>
>
>
> On Fri, 10 Aug 2018 at 14:57, <mihailn...@gmail.com <javascript:>> wrote:
>
>>
>>
>> On Friday, August 10, 2018 at 1:35:31 PM UTC+3, Richard Hodges wrote:
>>>
>>>
>>>
>>> On Fri, 10 Aug 2018 at 09:01, <mihailn...@gmail.com> wrote:
>>>
>>>>
>>>>
>>>> On Thursday, August 9, 2018 at 11:47:08 AM UTC+3, Richard Hodges wrote=
:
>>>>>
>>>>>
>>>>>
>>>>> On Thu, 9 Aug 2018 at 10:05, <mihailn...@gmail.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Wednesday, August 8, 2018 at 4:41:58 PM UTC+3, Olanrewaju Adetula=
=20
>>>>>> wrote:
>>>>>>>
>>>>>>> If by defining member function for example, an associated free=20
>>>>>>> function can be synthesized by the compiler or vice-versa, then we =
can call=20
>>>>>>> such function using either syntax.
>>>>>>>
>>>>>>>
>>>>>> I see, note however that if this is enabled it will be a breaking=20
>>>>>> change.
>>>>>> =20
>>>>>>
>>>>>>> On Mon, Aug 6, 2018 at 4:26 PM, <mihailn...@gmail.com> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula=
=20
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Of course going full UCS introduces the mirror set of=20
>>>>>>>>>> vulnerability-to-change problems. If we can call members using f=
ree=20
>>>>>>>>>> standing, then these are either in competition or there is a pre=
ferred=20
>>>>>>>>>> call.=20
>>>>>>>>>> If there is a completion there is potential code break or code=
=20
>>>>>>>>>> change if suddenly the member is the better match, if there is a=
preferred=20
>>>>>>>>>> call, there is a potential silent code change.
>>>>>>>>>
>>>>>>>>> Or the type author can define one and the language synthesizes th=
e=20
>>>>>>>>> other via opt-in. With that, it won't matter anymore which syntax=
is used=20
>>>>>>>>> to invoke the function and any attempt to define any other will e=
rror as a=20
>>>>>>>>> result of redeclaration.
>>>>>>>>>
>>>>>>>>>
>>>>>>>> Can you elaborate?=20
>>>>>>>> =20
>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Aug 6, 2018 at 4:01 PM, <mihailn...@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Forgot to mention the elephant in the room - this does not solve=
=20
>>>>>>>>>> the fundamental issue, how do we define concept requirements for=
a class,=20
>>>>>>>>>> is it in terms of member functions or in terms of free-standing =
ones.
>>>>>>>>>>
>>>>>>>>>> However, this can be a stepping stone towards UCS - after a=20
>>>>>>>>>> period of time we could make one of the two options the default.=
=20
>>>>>>>>>> It will be a non-breaking change, after which the syntax will be=
=20
>>>>>>>>>> used to let the user override the default behavior. =20
>>>>>>>>>>
>>>>>>>>>> Of course going full UCS introduces the mirror set of=20
>>>>>>>>>> vulnerability-to-change problems. If we can call members using f=
ree=20
>>>>>>>>>> standing, then these are either in competition or there is a pre=
ferred=20
>>>>>>>>>> call.=20
>>>>>>>>>> If there is a completion there is potential code break or code=
=20
>>>>>>>>>> change if suddenly the member is the better match, if there is a=
preferred=20
>>>>>>>>>> call, there is a potential silent code change.
>>>>>>>>>>
>>>>>>>>>> Silent code change is not so silent as it is not by the class=20
>>>>>>>>>> author but by the client code, introducing a free function can=
=20
>>>>>>>>>> *hide* a class member function, called as free function.
>>>>>>>>>> Seems to me this is unavoidable, as other options, are either=20
>>>>>>>>>> breaking (overloading) or still code changing (pick member alway=
s) and=20
>>>>>>>>>> almost certainly more surprising, yet hides like this are someth=
ing new.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Comments are welcome, I might write a proposal to give this=20
>>>>>>>>>> feature another go.
>>>>>>>>>> I personally can't decide for myself if I want full UFC or just =
a=20
>>>>>>>>>> way to call functions using member access syntax.
>>>>>>>>>>
>>>>>>>>>> --=20
>>>>>>>>>> You received this message because you are subscribed to the=20
>>>>>>>>>> Google Groups "ISO C++ Standard - Future Proposals" group.
>>>>>>>>>> To unsubscribe from this group and stop receiving emails from it=
,=20
>>>>>>>>>> send an email to std-proposal...@isocpp.org.
>>>>>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>>>>>> To view this discussion on the web visit=20
>>>>>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd4=
60620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org=20
>>>>>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd=
460620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_sour=
ce=3Dfooter>
>>>>>>>>>> .
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --=20
>>>>>>>> You received this message because you are subscribed to the Google=
=20
>>>>>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,=
=20
>>>>>>>> send an email to std-proposal...@isocpp.org.
>>>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>>>> To view this discussion on the web visit=20
>>>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc=
99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org=20
>>>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734b=
c99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=3Demail&utm_source=
=3Dfooter>
>>>>>>>> .
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> In any case, I investigated the UFCS situation further and, to my=20
>>>>>> surprise, it turned out, in its last stages only f(x,y) calling x.f(=
y) was=20
>>>>>> considered.
>>>>>> I wonder, were all the people asking for UFCS at CppConn last year=
=20
>>>>>> even aware of that! One can read more here=20
>>>>>> <https://isocpp.org/blog/2016/02/a-bit-of-background-for-the-unified=
-call-proposal>=20
>>>>>> and here=20
>>>>>> <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/n4586.pdf>=
=20
>>>>>> (n4586, search down for "unified").
>>>>>>
>>>>>> Aside from the fact literally no one has ever requested f(x,y)=20
>>>>>> calling x.f(y), for obvious reasons, and the only people to whom it =
is=20
>>>>>> useful are library writers, I am not surprised at all that even that=
was=20
>>>>>> not accepted.
>>>>>> Hell, even Bjarne says=20
>>>>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0131r0.pdf=
> *"People=20
>>>>>> who fear side effects from generalization might then prefer x.f(y) [=
to=20
>>>>>> generalize] because it is more restrictive".*
>>>>>>
>>>>>> Indeed, the possibility tor trivially hide a class member function,=
=20
>>>>>> is not pretty indeed.=20
>>>>>>
>>>>>>
>>>>>> With all that said, I still believe there is hope. In n4586, it is=
=20
>>>>>> noted* "Spicer liked the goal of the proposal, but wanted opt-in=20
>>>>>> which would then consider members and non-members equally in an over=
load=20
>>>>>> set."*
>>>>>> and *"Yasskin said he=E2=80=99d feel more comfortable being able to =
see the=20
>>>>>> feature in use for a long period of time, and would feel more comfor=
table=20
>>>>>> seeing it in a TS. "*
>>>>>>
>>>>>> These are doable. We introduce UFCS as a scoped, user-side opt-in=20
>>>>>> which will bring both free and member functions into one overloading=
set.
>>>>>>
>>>>>> struct C
>>>>>> {
>>>>>> void func(double) {}
>>>>>> };
>>>>>>
>>>>>> // user
>>>>>>
>>>>>> void f(C& c)
>>>>>> {
>>>>>> using C::func; //< bring func into the overloading set=20
>>>>>>
>>>>>> func(c, -1);
>>>>>> }
>>>>>>
>>>>>
>>>>> =20
>>>>
>>>>> This makes a lot of sense. Perhaps there is a way to provide=20
>>>>> free-function overloads which can be replaced by specific free functi=
ons,=20
>>>>> without any concerns about backward compatibility:
>>>>>
>>>>> struct Foo {
>>>>> bool empty() const;
>>>>> std::size_t size() const;
>>>>> };
>>>>>
>>>>> using auto Foo::*; // bring all public member functions of Foo into=
=20
>>>>> the outer namespace as free functions
>>>>>
>>>>> // but with lower 'weight' than an actual free function declaration:
>>>>> std::size_t size(Foo const& f); // auto-synthesised Foo::size(Foo=
=20
>>>>> const&) is now hidden in preference to ::size(Foo const&)
>>>>>
>>>>
>>>>
>>>> Richard, this is the behavior suggested under UFCS, but was rejected.=
=20
>>>> Here is a great example why=20
>>>> <https://www.reddit.com/r/cpp/comments/4d19gk/awesome_wg21_paper_about=
_alternative_unified_call/d1uqkpz>
>>>> . =20
>>>>
>>>
>>> You mean we lost the chance to gain an important, amazing language=20
>>> feature for the sake of one unimaginative luddite who has a code base s=
o=20
>>> ancient that he's unlikely to ever actually switch on the -std=3Dc++20=
=20
>>> feature at all?
>>>
>>
>>
>> Richard, new code will be at risk. The moment someone changes x.f(y) to=
=20
>> f(x, y) he is no longer sure what is called as there *might* be some=20
>> 'using' or even some co-worker "friendly wrapper" which hides the call.=
=20
>>
>> Honestly, the risk of you or a co-worker breaking your code is the=20
>> biggest risk as there will be no namespace boundary: You refactor your c=
ode=20
>> to use some helper functions, but somewhere someone decided a method is =
not=20
>> what they want exactly and created a free function to use in its place,=
=20
>> hiding your call as well by incident.
>> And the sad part is, there will be no warning - why should it be? Isn't=
=20
>> this the expected behavior for free functions to hide members? Should th=
e=20
>> co-worker be warned not to use free functions with the same name as=20
>> members?=20
>>
>> Nasty situation, this is because we have lost intend by unifying the=20
>> syntax. Actually, it is not problem with the syntax - intend can be=20
>> expressed by qualified call - but the fact we had different defaults for=
so=20
>> long.
>>
>>
>> The other default is also not acceptable - to overload all. This will=20
>> *both* change (pick "better" overloaded) *and* break (redefinitions).=20
>> One might be able to fix the breakages, but the silent-and-correct=20
>> changes will be impossible to find and fix on a scale, not without=20
>> rock-solid tools we don't have (yet?).
>>
>> Even then, will people be happy with the fact free functions now *always=
*=20
>> must be qualified in order to be "free"?=20
>>
>>
>> The only way out in foreseeable future (or probably ever) is an opt-in.
>>
>
> I have proposed an opt-in that would work further up the chain:
>
> namespace foo {
> struct bar {
> void baz();
> void baz2();
> };
>
> #if (__has_auto_free_functions)
> using auto foo::baz; // automatically synthesises ::foo::baz(foo::bar&=
)=20
> - this is an opt-in by the author of bar
>
> using auto foo::*; // automatically synthesises ::foo::baz(foo::bar&) =
=20
> and ::foo::baz2(foo::bar&) - this is also an opt-in by the author of bar
> #endif =20
> }
>
> This would also allow newly modified libraries to be compatible with olde=
r=20
> client codebases.
>
> If older code-bases have free-function overloads that have the same name=
=20
> as members with different effects, this is certainly an ambiguity of desi=
gn=20
> that needs addressing. However, in the face of intransigence, a compiler=
=20
> switch would suffice:
>
> $cc -std=3Dc++20 -fno-auto-free-functions nod.cpp #=20
> __has_auto_free_functions is now false
>
Not sure how is this different then what I described, *as long as* there is=
=20
no hiding. The fact that the library author opts in preemptively?=20
Sure one can do that, but then the user will have to deal with=20
redefinitions if he is using foo and has a function baz and wants UCF
In any case, the point was, the opt in is not on the declaration (not part=
=20
of the class/function) and is not on the call site (the .f() alternative)
It is in scope/TU. Yes, it can be the library author that injects into the=
=20
user TU by defining it like that.
Much the same way we can expect a library which extends its classes using=
=20
free functions to let the user also use these methods=20
namespace lib {
class Image{};
void save(const Image&, String) {}
class Image using=20
{=20
using save;
};
} //< lib
// user
using lib::save;
img.save("path");=20
And the user user can add his save methods as overloads in the same way. =
=20
=20
>
>
>
> =20
>
>>
>>
>> =20
>>
>> =20
>>
>>>
>>> This is why we can't have nice things. The ridiculous idea that=20
>>> everything in a new version of X must be compatible with every previous=
=20
>>> version of X has been the bane of the computing industry since the=20
>>> demon-spawn of MSDOS.
>>>
>>> =20
>>>
>>>>
>>>> What we want is for local size *not to* hide. If the user wants to=20
>>>> hide he should use a qualified called, so to be explicit.=20
>>>>
>>>> This will match current behavior.=20
>>>>
>>>> Currently, if the user wants to hide, he must use a free standing=20
>>>> function which will force him to be explicit on the call site by chang=
ing=20
>>>> the call syntax
>>>>
>>>> from f.size() to size(f)
>>>>
>>>> In the unified world, if the user wants to hide, he must again change=
=20
>>>> the call syntax, this time
>>>>
>>>> from size(f) to ::size(f)
>>>> =20
>>>>
>>>>
>>>>>
>>>>> =20
>>>>>
>>>>>>
>>>>>> Now, if someone adds=20
>>>>>>
>>>>>> void func(C&, size_t);
>>>>>>
>>>>>> By the current rules=20
>>>>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0301r0.htm=
l>=20
>>>>>> this will *hide* the member function, but now the condition is an=20
>>>>>> error as the call to func is ambiguous.
>>>>>>
>>>>>> (Needless to say, the above could be used in the future not to=20
>>>>>> *enable* UFCS, but to *override* the rules.)
>>>>>>
>>>>>> In n4586 it says *"...Some people wanted additional opt-in=20
>>>>>> mechanisms to enable the new behavior, which was discussed in great =
detail,=20
>>>>>> but rejected"*
>>>>>> What were those opt-ins? Was something like this considered, or the=
=20
>>>>>> opt-ins were on the declaration side (be it on the member/class or=
=20
>>>>>> function) or on the call site?
>>>>>>
>>>>>>
>>>>>> --=20
>>>>>> You received this message because you are subscribed to the Google=
=20
>>>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,=20
>>>>>> send an email to std-proposal...@isocpp.org.
>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>> To view this discussion on the web visit=20
>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9c=
a-3079-4619-9db0-c993dba7a8b6%40isocpp.org=20
>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9=
ca-3079-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium=3Demail&utm_source=
=3Dfooter>
>>>>>> .
>>>>>>
>>>>> --=20
>>>> You received this message because you are subscribed to the Google=20
>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send=
=20
>>>> an email to std-proposal...@isocpp.org.
>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>> To view this discussion on the web visit=20
>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-=
4f04-4e26-a630-ce4b41363d19%40isocpp.org=20
>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb=
-4f04-4e26-a630-ce4b41363d19%40isocpp.org?utm_medium=3Demail&utm_source=3Df=
ooter>
>>>> .
>>>>
>>> --=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit=20
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1eb57a3b-83=
6f-4a6b-8842-b2196293d30f%40isocpp.org=20
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1eb57a3b-8=
36f-4a6b-8842-b2196293d30f%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoo=
ter>
>> .
>>
>
--=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/19e44df2-5580-4c2c-9221-c82357f3b682%40isocpp.or=
g.
------=_Part_795_813294755.1533913049545
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Friday, August 10, 2018 at 4:32:07 PM UTC+3, Ri=
chard Hodges wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;mar=
gin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D=
"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri, 10 Aug 20=
18 at 14:57, <<a onmousedown=3D"this.href=3D'javascript:';return=
true;" onclick=3D"this.href=3D'javascript:';return true;" href=3D"=
javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"s4=
twKEpADQAJ">mihailn...@gmail.com</a>> wrote:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex"><div dir=3D"ltr"><br><br>On Friday, August 10, 2018 at 1:35:3=
1 PM UTC+3, Richard Hodges wrote:<blockquote class=3D"gmail_quote" style=3D=
"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><d=
iv dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri, =
10 Aug 2018 at 09:01, <<a rel=3D"nofollow">mihailn...@gmail.com</a>> =
wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><br>On =
Thursday, August 9, 2018 at 11:47:08 AM UTC+3, Richard Hodges wrote:<blockq=
uote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:=
1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><br><div class=3D"gma=
il_quote"><div dir=3D"ltr">On Thu, 9 Aug 2018 at 10:05, <<a rel=3D"nofol=
low">mihailn...@gmail.com</a>> wrote:<br></div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex"><div dir=3D"ltr"><br><br>On Wednesday, August 8, 2018 at 4:41:58 PM U=
TC+3, Olanrewaju Adetula wrote:<blockquote class=3D"gmail_quote" style=3D"m=
argin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div=
dir=3D"ltr">If by defining member function for example, an associated free=
function can be synthesized by the compiler or vice-versa, then we can cal=
l such function using either syntax.</div><div><br></div></blockquote><div>=
<br></div><div>I see, note however that if this is enabled it will be a bre=
aking change.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=
=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"=
><div><div class=3D"gmail_quote">On Mon, Aug 6, 2018 at 4:26 PM, <span dir=
=3D"ltr"><<a rel=3D"nofollow">mihailn...@gmail.com</a>></span> wrote:=
<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef=
t:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><span><br><br>On Monday=
, August 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula wrote:<blockquote =
class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #=
ccc solid;padding-left:1ex"><div dir=3D"ltr">
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0<br>If there is a completion there is potentia=
l code break or code change if suddenly the member is the better match, if =
there is a preferred call, there is a potential silent code change.</blockq=
uote>
Or the type author can define one and the language synthesizes the other vi=
a opt-in. With that, it won't matter anymore which syntax is used to in=
voke the function and any attempt to define any other will error as a resul=
t of redeclaration.<div><br></div></div></blockquote><div><br></div></span>=
<div>Can you elaborate?=C2=A0</div><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr"><div></div></div><div><br><div class=3D"g=
mail_quote"><span>On Mon, Aug 6, 2018 at 4:01 PM, <span dir=3D"ltr"><<a=
rel=3D"nofollow">mihailn...@gmail.com</a>></span> wrote:<br></span><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><span><div dir=3D"ltr"><div>Forgot to mention th=
e elephant in the room - this does not solve the fundamental issue, how do =
we define concept requirements for a class, is it in terms of member functi=
ons or in terms of free-standing ones.</div><div><br></div><div>However, th=
is can be a stepping stone towards UCS - after a period of time we could ma=
ke one of the two options the default.=C2=A0</div><div><span style=3D"displ=
ay:inline!important;float:none;background-color:transparent;color:rgb(34,34=
,34);font-family:"Arial","Helvetica",sans-serif;font-si=
ze:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacin=
g:normal;text-align:left;text-decoration:none;text-indent:0px;text-transfor=
m:none;white-space:normal;word-spacing:0px">It will be a non-breaking chang=
e, a</span>fter which the syntax will be used to let the user override the =
default behavior. =C2=A0</div><div><br></div><div>Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0</div><div>If there is a completion there is p=
otential code break or code change if suddenly the member is the better mat=
ch, if there is a preferred call, there is a potential silent code change.<=
/div><div><br></div><div>Silent code change is not so silent as it is not b=
y the class author but by the client code, introducing a free function can =
<i>hide</i> a class member function, called as free function.</div><div>See=
ms to me this is unavoidable, as other options, are either breaking (overlo=
ading) or still code changing (pick member always) and almost certainly mor=
e surprising, yet hides like this are something new.</div><div><br></div><d=
iv><br></div><div>Comments are welcome, I might write a proposal to give th=
is feature another go.</div><div>I personally can't decide for myself i=
f I want full UFC or just a way to call functions using member access synta=
x.</div></div></span><span><font color=3D"#888888"><span>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span><br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7=
-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd46=
0620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/dd460620-2bc7-47fd-<wbr>8e39-=
68a85003d9be%40isocpp.org</a><wbr>.<br>
</span></font></span></blockquote></div><br></div>
</blockquote></div><span>
<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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<br></span>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3=
-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734b=
c99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/734bc99d-2aa3-4af6-<wbr>b0b6-=
fb3ec3452d17%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></div></blockquote><div><br></div><div><br></div><di=
v>In any case, I investigated the UFCS situation further and, to my surpris=
e, it turned out, in its last stages only f(x,y) calling x.f(y) was conside=
red.</div><div>I wonder, were all the people asking for UFCS at CppConn las=
t year even aware of that! One can read more <a onmousedown=3D"this.href=3D=
'https://www.google.com/url?q\x3dhttps%3A%2F%2Fisocpp.org%2Fblog%2F2016=
%2F02%2Fa-bit-of-background-for-the-unified-call-proposal\x26sa\x3dD\x26snt=
z\x3d1\x26usg\x3dAFQjCNFrXRMjCPvNitAsGlOY6O1LyA1ddQ';return true;" oncl=
ick=3D"this.href=3D'https://www.google.com/url?q\x3dhttps%3A%2F%2Fisocp=
p.org%2Fblog%2F2016%2F02%2Fa-bit-of-background-for-the-unified-call-proposa=
l\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFrXRMjCPvNitAsGlOY6O1LyA1ddQ'=
;return true;" href=3D"https://isocpp.org/blog/2016/02/a-bit-of-background-=
for-the-unified-call-proposal" target=3D"_blank" rel=3D"nofollow">here</a> =
and <a onmousedown=3D"this.href=3D'http://www.google.com/url?q\x3dhttp%=
3A%2F%2Fwww.open-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F2016%2Fn458=
6.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1g7MRLKGRCtwaUkePf7cLyyRyMg&=
#39;;return true;" onclick=3D"this.href=3D'http://www.google.com/url?q\=
x3dhttp%3A%2F%2Fwww.open-std.org%2FJTC1%2FSC22%2FWG21%2Fdocs%2Fpapers%2F201=
6%2Fn4586.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1g7MRLKGRCtwaUkePf7c=
LyyRyMg';return true;" href=3D"http://www.open-std.org/JTC1/SC22/WG21/d=
ocs/papers/2016/n4586.pdf" target=3D"_blank" rel=3D"nofollow">here</a> (n45=
86, search down for "unified").</div><div><br></div><div>Aside fr=
om the fact literally no one has ever requested <span style=3D"display:inli=
ne!important;float:none;background-color:transparent;color:rgb(34,34,34);fo=
nt-family:"Arial","Helvetica",sans-serif;font-size:13px=
;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:norma=
l;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;=
white-space:normal;word-spacing:0px">f(x,y) calling x.f(y), for obvious rea=
sons, and the only people to whom it is useful are library writers, I am no=
t surprised at all that even that was not accepted.</span></div><div><span =
style=3D"display:inline!important;float:none;background-color:transparent;c=
olor:rgb(34,34,34);font-family:"Arial","Helvetica",sans=
-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:400=
;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px=
;text-transform:none;white-space:normal;word-spacing:0px">Hell, even Bjarne=
<a onmousedown=3D"this.href=3D'http://www.google.com/url?q\x3dhttp%3A%=
2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2015%2Fp0131r0=
..pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFgArzPPqWPRJyeFIsqQqR6veJ1Ew&#=
39;;return true;" onclick=3D"this.href=3D'http://www.google.com/url?q\x=
3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2015=
%2Fp0131r0.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFgArzPPqWPRJyeFIsqQq=
R6veJ1Ew';return true;" href=3D"http://www.open-std.org/jtc1/sc22/wg21/=
docs/papers/2015/p0131r0.pdf" target=3D"_blank" rel=3D"nofollow">says</a> <=
/span><span style=3D"text-align:left;color:rgb(34,34,34);text-transform:non=
e;text-indent:0px;letter-spacing:normal;font-family:"Arial","=
;Helvetica",sans-serif;font-size:13px;font-variant:normal;font-weight:=
400;text-decoration:none;word-spacing:0px;display:inline!important;white-sp=
ace:normal;float:none;background-color:transparent"><i>"People who fea=
r side effects from generalization might then prefer x.f(y)<span style=3D"t=
ext-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;lett=
er-spacing:normal;font-family:"Arial","Helvetica",sans-=
serif;font-size:13px;font-variant:normal;font-weight:400;text-decoration:no=
ne;word-spacing:0px;display:inline!important;white-space:normal;float:none;=
background-color:transparent"> [to generalize]</span> because it is more re=
strictive".</i><br></span></div><div><br></div><div>Indeed, the possib=
ility tor trivially hide a class member function, is not pretty indeed.=C2=
=A0</div><div><br></div><div><br></div><div>With all that said, I still bel=
ieve there is hope. In n4586, it is noted<i> "Spicer liked the goal of=
the proposal, but wanted opt-in which would then consider members and non-=
members equally in an overload set."</i></div><div>and <i>"Yasski=
n said he=E2=80=99d feel more comfortable being able to see the feature in =
use for a long period of time, and would feel more comfortable seeing it in=
a TS. "</i></div><div><i><br></i></div><div>These are doable. We intr=
oduce UFCS as a scoped, user-side opt-in which will bring both free and mem=
ber functions into one overloading set.</div><div><br></div><div><font face=
=3D"courier new,monospace">struct C</font></div><div><font face=3D"courier =
new,monospace">{</font></div><div><font face=3D"courier new,monospace">=C2=
=A0 void func(double) {}</font></div><div><font face=3D"courier new,monospa=
ce">};</font></div><div><font face=3D"courier new,monospace"></font><br></d=
iv><div><font face=3D"courier new,monospace">// user</font></div><div><font=
face=3D"courier new,monospace"></font><br></div><div><font face=3D"courier=
new,monospace">void f(C& c)</font></div><div><font face=3D"courier new=
,monospace">{</font></div><div><font face=3D"courier new,monospace">=C2=A0 =
using C::func; //< bring func into the overloading set=C2=A0</font></div=
><div><font face=3D"courier new,monospace"></font><br></div><div><font face=
=3D"courier new,monospace">=C2=A0 func(c, -1);</font></div><div><font face=
=3D"courier new,monospace">}</font></div></div></blockquote><div><br></div>=
</div></div></blockquote><div>=C2=A0</div><blockquote class=3D"gmail_quote"=
style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-lef=
t:1ex"><div dir=3D"ltr"><div class=3D"gmail_quote"><div></div><div>This mak=
es a lot of sense. Perhaps there is a way to provide free-function overload=
s which can be replaced by specific free functions, without any concerns ab=
out backward compatibility:</div><div><br></div><div><font face=3D"monospac=
e, monospace">struct Foo {</font></div><div><font face=3D"monospace, monosp=
ace">=C2=A0 bool empty() const;</font></div><div><font face=3D"monospace, m=
onospace">=C2=A0 std::size_t size() const;</font></div><div><font face=3D"m=
onospace, monospace">};</font></div><div><font face=3D"monospace, monospace=
"><br></font></div><div><font face=3D"monospace, monospace">using auto Foo:=
:*;=C2=A0 =C2=A0// bring all public member functions of Foo into the outer =
namespace as free functions</font></div><div><font face=3D"monospace, monos=
pace"><br></font></div><div><font face=3D"monospace, monospace">// but with=
lower 'weight' than an actual free function declaration:</font></d=
iv><div><font face=3D"monospace, monospace">std::size_t size(Foo const&=
f);=C2=A0 =C2=A0 // auto-synthesised Foo::size(Foo const&) is now hidd=
en in preference to ::size(Foo const&)</font></div></div></div></blockq=
uote><div><br></div><div><br></div><div>Richard, this is the behavior sugge=
sted under UFCS, but was rejected. Here is <a onmousedown=3D"this.href=3D&#=
39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.reddit.com%2Fr%2Fcpp%2=
Fcomments%2F4d19gk%2Fawesome_wg21_paper_about_alternative_unified_call%2Fd1=
uqkpz\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_yuplzvGKf5i4U2IToOz0Dq-PQg&=
#39;;return true;" onclick=3D"this.href=3D'https://www.google.com/url?q=
\x3dhttps%3A%2F%2Fwww.reddit.com%2Fr%2Fcpp%2Fcomments%2F4d19gk%2Fawesome_wg=
21_paper_about_alternative_unified_call%2Fd1uqkpz\x26sa\x3dD\x26sntz\x3d1\x=
26usg\x3dAFQjCNH_yuplzvGKf5i4U2IToOz0Dq-PQg';return true;" href=3D"http=
s://www.reddit.com/r/cpp/comments/4d19gk/awesome_wg21_paper_about_alternati=
ve_unified_call/d1uqkpz" target=3D"_blank" rel=3D"nofollow">a great example=
why</a><font color=3D"#004000">.</font> =C2=A0</div></div></blockquote><di=
v><br></div><div>You mean we lost the chance to gain an important, amazing =
language feature for the sake of one unimaginative luddite who has a code b=
ase so ancient that he's unlikely to ever actually switch on the -std=
=3Dc++20 feature at all?</div></div></div></blockquote><div><br></div><div>=
<div><div style=3D"background-color:transparent;border-bottom-color:rgb(34,=
34,34);border-bottom-style:none;border-bottom-width:0px;border-left-color:r=
gb(34,34,34);border-left-style:none;border-left-width:0px;border-right-colo=
r:rgb(34,34,34);border-right-style:none;border-right-width:0px;border-top-c=
olor:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,=
34,34);font-size:13px;font-style:normal;font-variant:normal;font-weight:400=
;letter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-right:0px;m=
argin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;padding=
-top:0px;text-align:left;text-decoration:none;text-indent:0px;text-transfor=
m:none;white-space:normal;word-spacing:0px"><br style=3D"background-color:t=
ransparent;background-image:none;background-repeat:repeat;border-bottom-col=
or:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px;border-le=
ft-color:rgb(34,34,34);border-left-style:none;border-left-width:0px;border-=
right-color:rgb(34,34,34);border-right-style:none;border-right-width:0px;bo=
rder-top-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;col=
or:rgb(34,34,34);font-size:13px;min-height:auto;margin-bottom:0px;margin-le=
ft:0px;margin-right:0px;margin-top:0px;min-width:0px;overflow:visible;overf=
low-x:visible;overflow-y:visible;padding-bottom:0px;padding-left:0px;paddin=
g-right:0px;padding-top:0px"></div><div style=3D"background-color:transpare=
nt;border-bottom-color:rgb(34,34,34);border-bottom-style:none;border-bottom=
-width:0px;border-left-color:rgb(34,34,34);border-left-style:none;border-le=
ft-width:0px;border-right-color:rgb(34,34,34);border-right-style:none;borde=
r-right-width:0px;border-top-color:rgb(34,34,34);border-top-style:none;bord=
er-top-width:0px;color:rgb(34,34,34);font-size:13px;font-style:normal;font-=
variant:normal;font-weight:400;letter-spacing:normal;margin-bottom:0px;marg=
in-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left=
:0px;padding-right:0px;padding-top:0px;text-align:left;text-decoration:none=
;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">R=
ichard, new code will be at risk.=C2=A0 The moment someone changes x.f(y) t=
o f(x, y) he is no longer sure what is called as there <i style=3D"backgrou=
nd-color:transparent;background-image:none;background-repeat:repeat;border-=
bottom-color:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px=
;border-left-color:rgb(34,34,34);border-left-style:none;border-left-width:0=
px;border-right-color:rgb(34,34,34);border-right-style:none;border-right-wi=
dth:0px;border-top-color:rgb(34,34,34);border-top-style:none;border-top-wid=
th:0px;color:rgb(34,34,34);font-size:13px;min-height:auto;margin-bottom:0px=
;margin-left:0px;margin-right:0px;margin-top:0px;min-width:0px;overflow:vis=
ible;overflow-x:visible;overflow-y:visible;padding-bottom:0px;padding-left:=
0px;padding-right:0px;padding-top:0px">might</i> be some 'using' or=
even some co-worker "friendly wrapper" which hides the call.=C2=
=A0</div><div style=3D"background-color:transparent;border-bottom-color:rgb=
(34,34,34);border-bottom-style:none;border-bottom-width:0px;border-left-col=
or:rgb(34,34,34);border-left-style:none;border-left-width:0px;border-right-=
color:rgb(34,34,34);border-right-style:none;border-right-width:0px;border-t=
op-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb=
(34,34,34);font-size:13px;font-style:normal;font-variant:normal;font-weight=
:400;letter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-right:0=
px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;pad=
ding-top:0px;text-align:left;text-decoration:none;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><br style=3D"background-col=
or:transparent;background-image:none;background-repeat:repeat;border-bottom=
-color:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px;borde=
r-left-color:rgb(34,34,34);border-left-style:none;border-left-width:0px;bor=
der-right-color:rgb(34,34,34);border-right-style:none;border-right-width:0p=
x;border-top-color:rgb(34,34,34);border-top-style:none;border-top-width:0px=
;color:rgb(34,34,34);font-size:13px;min-height:auto;margin-bottom:0px;margi=
n-left:0px;margin-right:0px;margin-top:0px;min-width:0px;overflow:visible;o=
verflow-x:visible;overflow-y:visible;padding-bottom:0px;padding-left:0px;pa=
dding-right:0px;padding-top:0px"></div><div style=3D"background-color:trans=
parent;border-bottom-color:rgb(34,34,34);border-bottom-style:none;border-bo=
ttom-width:0px;border-left-color:rgb(34,34,34);border-left-style:none;borde=
r-left-width:0px;border-right-color:rgb(34,34,34);border-right-style:none;b=
order-right-width:0px;border-top-color:rgb(34,34,34);border-top-style:none;=
border-top-width:0px;color:rgb(34,34,34);font-size:13px;font-style:normal;f=
ont-variant:normal;font-weight:400;letter-spacing:normal;margin-bottom:0px;=
margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-=
left:0px;padding-right:0px;padding-top:0px;text-align:left;text-decoration:=
none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0p=
x">Honestly, the risk of you or a co-worker breaking your code is the bigge=
st risk as there will be no namespace boundary: You refactor your code to u=
se some helper functions, but somewhere someone decided a method is not wha=
t they want exactly and created a free function to use in its place, hiding=
your call as well by incident.</div><div style=3D"background-color:transpa=
rent;border-bottom-color:rgb(34,34,34);border-bottom-style:none;border-bott=
om-width:0px;border-left-color:rgb(34,34,34);border-left-style:none;border-=
left-width:0px;border-right-color:rgb(34,34,34);border-right-style:none;bor=
der-right-width:0px;border-top-color:rgb(34,34,34);border-top-style:none;bo=
rder-top-width:0px;color:rgb(34,34,34);font-size:13px;font-style:normal;fon=
t-variant:normal;font-weight:400;letter-spacing:normal;margin-bottom:0px;ma=
rgin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-le=
ft:0px;padding-right:0px;padding-top:0px;text-align:left;text-decoration:no=
ne;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"=
>And the sad part is, there will be no warning - why should it be? Isn'=
t this the expected behavior for free functions to hide members? Should the=
co-worker be warned not to use free functions with the same name as member=
s?=C2=A0</div><div style=3D"background-color:transparent;border-bottom-colo=
r:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px;border-lef=
t-color:rgb(34,34,34);border-left-style:none;border-left-width:0px;border-r=
ight-color:rgb(34,34,34);border-right-style:none;border-right-width:0px;bor=
der-top-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;colo=
r:rgb(34,34,34);font-size:13px;font-style:normal;font-variant:normal;font-w=
eight:400;letter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-ri=
ght:0px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0p=
x;padding-top:0px;text-align:left;text-decoration:none;text-indent:0px;text=
-transform:none;white-space:normal;word-spacing:0px"><br style=3D"backgroun=
d-color:transparent;background-image:none;background-repeat:repeat;border-b=
ottom-color:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px;=
border-left-color:rgb(34,34,34);border-left-style:none;border-left-width:0p=
x;border-right-color:rgb(34,34,34);border-right-style:none;border-right-wid=
th:0px;border-top-color:rgb(34,34,34);border-top-style:none;border-top-widt=
h:0px;color:rgb(34,34,34);font-size:13px;min-height:auto;margin-bottom:0px;=
margin-left:0px;margin-right:0px;margin-top:0px;min-width:0px;overflow:visi=
ble;overflow-x:visible;overflow-y:visible;padding-bottom:0px;padding-left:0=
px;padding-right:0px;padding-top:0px"></div><div style=3D"background-color:=
transparent;border-bottom-color:rgb(34,34,34);border-bottom-style:none;bord=
er-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-style:none;=
border-left-width:0px;border-right-color:rgb(34,34,34);border-right-style:n=
one;border-right-width:0px;border-top-color:rgb(34,34,34);border-top-style:=
none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;font-style:nor=
mal;font-variant:normal;font-weight:400;letter-spacing:normal;margin-bottom=
:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;pad=
ding-left:0px;padding-right:0px;padding-top:0px;text-align:left;text-decora=
tion:none;text-indent:0px;text-transform:none;white-space:normal;word-spaci=
ng:0px">Nasty situation, this is because we have lost intend by unifying th=
e syntax. Actually, it is not problem with the syntax - intend can be expre=
ssed by qualified call - but the fact we had different defaults for so long=
..</div><div style=3D"background-color:transparent;border-bottom-color:rgb(3=
4,34,34);border-bottom-style:none;border-bottom-width:0px;border-left-color=
:rgb(34,34,34);border-left-style:none;border-left-width:0px;border-right-co=
lor:rgb(34,34,34);border-right-style:none;border-right-width:0px;border-top=
-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(3=
4,34,34);font-size:13px;font-style:normal;font-variant:normal;font-weight:4=
00;letter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-right:0px=
;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;paddi=
ng-top:0px;text-align:left;text-decoration:none;text-indent:0px;text-transf=
orm:none;white-space:normal;word-spacing:0px"><br style=3D"background-color=
:transparent;background-image:none;background-repeat:repeat;border-bottom-c=
olor:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px;border-=
left-color:rgb(34,34,34);border-left-style:none;border-left-width:0px;borde=
r-right-color:rgb(34,34,34);border-right-style:none;border-right-width:0px;=
border-top-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;c=
olor:rgb(34,34,34);font-size:13px;min-height:auto;margin-bottom:0px;margin-=
left:0px;margin-right:0px;margin-top:0px;min-width:0px;overflow:visible;ove=
rflow-x:visible;overflow-y:visible;padding-bottom:0px;padding-left:0px;padd=
ing-right:0px;padding-top:0px"></div><div style=3D"background-color:transpa=
rent;border-bottom-color:rgb(34,34,34);border-bottom-style:none;border-bott=
om-width:0px;border-left-color:rgb(34,34,34);border-left-style:none;border-=
left-width:0px;border-right-color:rgb(34,34,34);border-right-style:none;bor=
der-right-width:0px;border-top-color:rgb(34,34,34);border-top-style:none;bo=
rder-top-width:0px;color:rgb(34,34,34);font-size:13px;font-style:normal;fon=
t-variant:normal;font-weight:400;letter-spacing:normal;margin-bottom:0px;ma=
rgin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-le=
ft:0px;padding-right:0px;padding-top:0px;text-align:left;text-decoration:no=
ne;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"=
><br style=3D"background-color:transparent;background-image:none;background=
-repeat:repeat;border-bottom-color:rgb(34,34,34);border-bottom-style:none;b=
order-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-style:no=
ne;border-left-width:0px;border-right-color:rgb(34,34,34);border-right-styl=
e:none;border-right-width:0px;border-top-color:rgb(34,34,34);border-top-sty=
le:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;min-height:=
auto;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;min-=
width:0px;overflow:visible;overflow-x:visible;overflow-y:visible;padding-bo=
ttom:0px;padding-left:0px;padding-right:0px;padding-top:0px"></div><div sty=
le=3D"background-color:transparent;border-bottom-color:rgb(34,34,34);border=
-bottom-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);=
border-left-style:none;border-left-width:0px;border-right-color:rgb(34,34,3=
4);border-right-style:none;border-right-width:0px;border-top-color:rgb(34,3=
4,34);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-s=
ize:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spaci=
ng:normal;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px=
;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;text=
-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-=
space:normal;word-spacing:0px">The other default is also not acceptable - t=
o overload all. This will <i style=3D"background-color:transparent;backgrou=
nd-image:none;background-repeat:repeat;border-bottom-color:rgb(34,34,34);bo=
rder-bottom-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,=
34);border-left-style:none;border-left-width:0px;border-right-color:rgb(34,=
34,34);border-right-style:none;border-right-width:0px;border-top-color:rgb(=
34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);fo=
nt-size:13px;min-height:auto;margin-bottom:0px;margin-left:0px;margin-right=
:0px;margin-top:0px;min-width:0px;overflow:visible;overflow-x:visible;overf=
low-y:visible;padding-bottom:0px;padding-left:0px;padding-right:0px;padding=
-top:0px">both</i> change (pick "better" overloaded) <i style=3D"=
background-color:transparent;background-image:none;background-repeat:repeat=
;border-bottom-color:rgb(34,34,34);border-bottom-style:none;border-bottom-w=
idth:0px;border-left-color:rgb(34,34,34);border-left-style:none;border-left=
-width:0px;border-right-color:rgb(34,34,34);border-right-style:none;border-=
right-width:0px;border-top-color:rgb(34,34,34);border-top-style:none;border=
-top-width:0px;color:rgb(34,34,34);font-size:13px;min-height:auto;margin-bo=
ttom:0px;margin-left:0px;margin-right:0px;margin-top:0px;min-width:0px;over=
flow:visible;overflow-x:visible;overflow-y:visible;padding-bottom:0px;paddi=
ng-left:0px;padding-right:0px;padding-top:0px">and</i> break (redefinitions=
).=C2=A0</div><div style=3D"background-color:transparent;border-bottom-colo=
r:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px;border-lef=
t-color:rgb(34,34,34);border-left-style:none;border-left-width:0px;border-r=
ight-color:rgb(34,34,34);border-right-style:none;border-right-width:0px;bor=
der-top-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;colo=
r:rgb(34,34,34);font-size:13px;font-style:normal;font-variant:normal;font-w=
eight:400;letter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-ri=
ght:0px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0p=
x;padding-top:0px;text-align:left;text-decoration:none;text-indent:0px;text=
-transform:none;white-space:normal;word-spacing:0px">One might be able to f=
ix the breakages, but the silent-and-correct changes will be impossible to =
find and fix on a scale, not without rock-solid tools we don't have (ye=
t?).</div><div style=3D"background-color:transparent;border-bottom-color:rg=
b(34,34,34);border-bottom-style:none;border-bottom-width:0px;border-left-co=
lor:rgb(34,34,34);border-left-style:none;border-left-width:0px;border-right=
-color:rgb(34,34,34);border-right-style:none;border-right-width:0px;border-=
top-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rg=
b(34,34,34);font-size:13px;font-style:normal;font-variant:normal;font-weigh=
t:400;letter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-right:=
0px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;pa=
dding-top:0px;text-align:left;text-decoration:none;text-indent:0px;text-tra=
nsform:none;white-space:normal;word-spacing:0px"><br></div><div style=3D"ba=
ckground-color:transparent;border-bottom-color:rgb(34,34,34);border-bottom-=
style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-l=
eft-style:none;border-left-width:0px;border-right-color:rgb(34,34,34);borde=
r-right-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);bo=
rder-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px=
;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:norma=
l;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding=
-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;text-align:l=
eft;text-decoration:none;text-indent:0px;text-transform:none;white-space:no=
rmal;word-spacing:0px">Even then, will people be happy with the fact free f=
unctions now <i style=3D"border-bottom-color:rgb(34,34,34);border-bottom-st=
yle:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-lef=
t-style:none;border-left-width:0px;border-right-color:rgb(34,34,34);border-=
right-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);bord=
er-top-style:none;border-top-width:0px;margin-bottom:0px;margin-left:0px;ma=
rgin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-r=
ight:0px;padding-top:0px">always</i> must be qualified in order to be "=
;free"?=C2=A0</div><div style=3D"background-color:transparent;border-b=
ottom-color:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px;=
border-left-color:rgb(34,34,34);border-left-style:none;border-left-width:0p=
x;border-right-color:rgb(34,34,34);border-right-style:none;border-right-wid=
th:0px;border-top-color:rgb(34,34,34);border-top-style:none;border-top-widt=
h:0px;color:rgb(34,34,34);font-size:13px;font-style:normal;font-variant:nor=
mal;font-weight:400;letter-spacing:normal;margin-bottom:0px;margin-left:0px=
;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:0px;paddin=
g-right:0px;padding-top:0px;text-align:left;text-decoration:none;text-inden=
t:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><d=
iv style=3D"background-color:transparent;border-bottom-color:rgb(34,34,34);=
border-bottom-style:none;border-bottom-width:0px;border-left-color:rgb(34,3=
4,34);border-left-style:none;border-left-width:0px;border-right-color:rgb(3=
4,34,34);border-right-style:none;border-right-width:0px;border-top-color:rg=
b(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);=
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;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0p=
x;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;=
white-space:normal;word-spacing:0px"><br style=3D"background-color:transpar=
ent;background-image:none;background-repeat:repeat;border-bottom-color:rgb(=
34,34,34);border-bottom-style:none;border-bottom-width:0px;border-left-colo=
r:rgb(34,34,34);border-left-style:none;border-left-width:0px;border-right-c=
olor:rgb(34,34,34);border-right-style:none;border-right-width:0px;border-to=
p-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(=
34,34,34);font-size:13px;min-height:auto;margin-bottom:0px;margin-left:0px;=
margin-right:0px;margin-top:0px;min-width:0px;overflow:visible;overflow-x:v=
isible;overflow-y:visible;padding-bottom:0px;padding-left:0px;padding-right=
:0px;padding-top:0px"></div><div style=3D"background-color:transparent;bord=
er-bottom-color:rgb(34,34,34);border-bottom-style:none;border-bottom-width:=
0px;border-left-color:rgb(34,34,34);border-left-style:none;border-left-widt=
h:0px;border-right-color:rgb(34,34,34);border-right-style:none;border-right=
-width:0px;border-top-color:rgb(34,34,34);border-top-style:none;border-top-=
width:0px;color:rgb(34,34,34);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-top:0px;padding-bottom:0px;padding-left:0px;pa=
dding-right:0px;padding-top:0px;text-align:left;text-decoration:none;text-i=
ndent:0px;text-transform:none;white-space:normal;word-spacing:0px">The only=
way out in foreseeable<span style=3D"display:inline!important;float:none;b=
ackground-color:transparent;color:rgb(34,34,34);font-family:"Arial&quo=
t;,"Helvetica",sans-serif;font-size:13px;font-style:normal;font-v=
ariant:normal;font-weight:400;letter-spacing:normal;text-align:left;text-de=
coration:none;text-indent:0px;text-transform:none;white-space:normal;word-s=
pacing:0px"> future</span> (or probably ever) is an opt-in.</div></div></di=
v></div></blockquote><div><br></div><div>I have proposed an opt-in that wou=
ld work further up the chain:</div><div><br></div><div><font face=3D"monosp=
ace, monospace">namespace foo {</font></div><div><font face=3D"monospace, m=
onospace">=C2=A0 struct bar {</font></div><div><font face=3D"monospace, mon=
ospace">=C2=A0 =C2=A0 void baz();</font></div><div><font face=3D"monospace,=
monospace">=C2=A0 =C2=A0 void baz2();</font></div><div><font face=3D"monos=
pace, monospace">=C2=A0 };<br></font></div><div><font face=3D"monospace, mo=
nospace"><br></font></div><div><font face=3D"monospace, monospace">#if (__h=
as_auto_free_functions)</font></div><div><div><font face=3D"monospace, mono=
space">=C2=A0 using auto foo::baz;=C2=A0 // automatically synthesises ::foo=
::baz(foo::bar&) - this is an opt-in by the author of bar</font></div><=
div><font face=3D"monospace, monospace"><br></font></div><div><font face=3D=
"monospace, monospace">=C2=A0 using auto foo::*;=C2=A0 // automatically syn=
thesises ::foo::baz(foo::bar&)=C2=A0 and ::foo::baz2(foo::bar&) - t=
his is also an opt-in by the author of bar</font></div></div><div><font fac=
e=3D"monospace, monospace">#endif=C2=A0=C2=A0</font></div><div><font face=
=3D"monospace, monospace">}</font></div><div><br></div><div>This would also=
allow newly modified libraries to be compatible with older client codebase=
s.</div><div><br></div><div>If older code-bases have free-function overload=
s that have the same name as members with different effects, this is certai=
nly an ambiguity of design that needs addressing. However, in the face of i=
ntransigence, a compiler switch would suffice:</div><div><br></div><div><fo=
nt face=3D"monospace, monospace">$cc -std=3Dc++20 -fno-auto-free-functions =
nod.cpp=C2=A0 # __has_auto_free_functions is now false</font></div></div></=
div></blockquote><div><br></div><div><br></div><div>Not sure how is this di=
fferent then what I described, <i>as long as</i> there is no hiding. The fa=
ct that the library author opts in preemptively?=C2=A0</div><div>Sure one c=
an do that, but then the user will have to deal with redefinitions if he is=
<font face=3D"courier new,monospace">using foo <font face=3D"arial,sans-se=
rif">and has a function</font> baz</font> and wants UCF</div><div><br></div=
><div>In any case, the point was, the opt in is not on the declaration (not=
part of the class/function) and is not on the call site (the <font face=3D=
"courier new,monospace">.f() </font>alternative)</div><div><br></div><div>I=
t is in scope/TU. Yes, it can be the library author that injects into the u=
ser TU by defining it like that.</div><div><br></div><div>Much the same way=
we can expect a library which extends its classes using free functions to =
let the user also use these methods=C2=A0<br></div><div><font face=3D"couri=
er new,monospace"></font><br></div><div><font face=3D"courier new,monospace=
">namespace lib {</font></div><div><font face=3D"courier new,monospace"></f=
ont><br></div><div><font face=3D"courier new,monospace">class Image{};</fon=
t></div><div><font face=3D"courier new,monospace"></font><br></div><div><fo=
nt face=3D"courier new,monospace">void save(const Image&, String) {}</f=
ont></div><div><font face=3D"courier new,monospace"></font><br></div><div><=
font face=3D"courier new,monospace">class <span style=3D"text-align: left; =
color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spac=
ing: normal; font-size: 13px; font-style: normal; font-variant: normal; fon=
t-weight: 400; text-decoration: none; word-spacing: 0px; display: inline !i=
mportant; white-space: normal; orphans: 2; float: none; -webkit-text-stroke=
-width: 0px; background-color: transparent;">Image using=C2=A0</span></font=
></div><div><span style=3D"text-align: left; color: rgb(34, 34, 34); text-t=
ransform: none; text-indent: 0px; letter-spacing: normal; font-size: 13px; =
font-style: normal; font-variant: normal; font-weight: 400; text-decoration=
: none; word-spacing: 0px; display: inline !important; white-space: normal;=
orphans: 2; float: none; -webkit-text-stroke-width: 0px; background-color:=
transparent;"><font face=3D"courier new,monospace">{=C2=A0</font></span></=
div><div><span style=3D"text-align: left; color: rgb(34, 34, 34); text-tran=
sform: none; text-indent: 0px; letter-spacing: normal; font-size: 13px; fon=
t-style: normal; font-variant: normal; font-weight: 400; text-decoration: n=
one; word-spacing: 0px; display: inline !important; white-space: normal; or=
phans: 2; float: none; -webkit-text-stroke-width: 0px; background-color: tr=
ansparent;"><font face=3D"courier new,monospace">=C2=A0 using <span style=
=3D"text-align: left; color: rgb(34, 34, 34); text-transform: none; text-in=
dent: 0px; letter-spacing: normal; font-size: 13px; font-style: normal; fon=
t-variant: normal; font-weight: 400; text-decoration: none; word-spacing: 0=
px; display: inline !important; white-space: normal; orphans: 2; float: non=
e; -webkit-text-stroke-width: 0px; background-color: transparent;">save;</s=
pan></font></span></div><div><span style=3D"text-align: left; color: rgb(34=
, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; =
font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400=
; text-decoration: none; word-spacing: 0px; display: inline !important; whi=
te-space: normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; =
background-color: transparent;"><font face=3D"courier new,monospace">};</fo=
nt></span></div><div><b></b><i></i><u></u><sub></sub><sup></sup><strike></s=
trike><font face=3D"courier new,monospace"></font><br></div><div><font face=
=3D"courier new,monospace">} //< lib</font></div><div><br></div><div><fo=
nt face=3D"courier new,monospace">// user</font></div><div><font face=3D"co=
urier new,monospace"><br></font></div><div><font face=3D"courier new,monosp=
ace">using lib::save;</font></div><div><span style=3D"background-color: tra=
nsparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; =
border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stre=
tch; border-image-slice: 100%; border-image-source: none; border-image-widt=
h: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; border-l=
eft-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: no=
ne; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-=
style: none; border-top-width: 0px; color: rgb(34, 34, 34); display: inline=
; float: none; font-family: &quot;Arial&quot;,&quot;Helvetica&a=
mp;quot;,sans-serif; font-size: 13px; font-style: normal; font-variant: nor=
mal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin-l=
eft: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0=
px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: le=
ft; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-=
text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"><br></span=
></div><div><span style=3D"background-color: transparent; border-bottom-col=
or: rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px; b=
order-image-outset: 0; border-image-repeat: stretch; border-image-slice: 10=
0%; border-image-source: none; border-image-width: 1; border-left-color: rg=
b(34, 34, 34); border-left-style: none; border-left-width: 0px; border-righ=
t-color: rgb(34, 34, 34); border-right-style: none; border-right-width: 0px=
; border-top-color: rgb(34, 34, 34); border-top-style: none; border-top-wid=
th: 0px; color: rgb(34, 34, 34); display: inline; float: none; 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; margin-bottom: 0px; margin-left: 0px; margin-right: 0px=
; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padd=
ing-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; =
text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; whi=
te-space: normal; word-spacing: 0px;"><br></span></div><div><div style=3D"b=
ackground-color: transparent; border-bottom-color: rgb(34, 34, 34); border-=
bottom-style: none; border-bottom-width: 0px; border-image-outset: 0; borde=
r-image-repeat: stretch; border-image-slice: 100%; border-image-source: non=
e; border-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-s=
tyle: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); bo=
rder-right-style: none; border-right-width: 0px; border-top-color: rgb(34, =
34, 34); border-top-style: none; border-top-width: 0px; color: 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; margin-bottom: 0px; margin-left: 0px; =
margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; paddin=
g-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-d=
ecoration: none; text-indent: 0px; text-transform: none; -webkit-text-strok=
e-width: 0px; white-space: normal; word-spacing: 0px;"><span style=3D"backg=
round-color: transparent; border-bottom-color: rgb(34, 34, 34); border-bott=
om-style: none; border-bottom-width: 0px; border-image-outset: 0; border-im=
age-repeat: stretch; border-image-slice: 100%; border-image-source: none; b=
order-image-width: 1; border-left-color: rgb(34, 34, 34); border-left-style=
: none; border-left-width: 0px; border-right-color: rgb(34, 34, 34); border=
-right-style: none; border-right-width: 0px; border-top-color: rgb(34, 34, =
34); border-top-style: none; border-top-width: 0px; color: rgb(34, 34, 34);=
display: inline; float: none; font-family: &quot;Arial&quot;,&=
quot;Helvetica&quot;,sans-serif; font-size: 13px; font-style: normal; f=
ont-variant: normal; font-weight: 400; letter-spacing: normal; margin-botto=
m: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; p=
adding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px=
; text-align: left; text-decoration: none; text-indent: 0px; text-transform=
: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: =
0px;"><font face=3D"courier new,monospace">img.save("path");=C2=
=A0</font></span></div><div style=3D"background-color: transparent; border-=
bottom-color: rgb(34, 34, 34); border-bottom-style: none; border-bottom-wid=
th: 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(34, 34, 34); border-left-style: none; border-left-width: 0px; b=
order-right-color: rgb(34, 34, 34); border-right-style: none; border-right-=
width: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; bord=
er-top-width: 0px; color: rgb(34, 34, 34); font-family: &quot;Arial&=
;quot;,&quot;Helvetica&quot;,sans-serif; font-size: 13px; font-styl=
e: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; =
margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; o=
rphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padd=
ing-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; te=
xt-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; wo=
rd-spacing: 0px;"><span style=3D"background-color: transparent; border-bott=
om-color: rgb(34, 34, 34); 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(34, 34, 34); border-left-style: none; border-left-width: 0px; borde=
r-right-color: rgb(34, 34, 34); border-right-style: none; border-right-widt=
h: 0px; border-top-color: rgb(34, 34, 34); border-top-style: none; border-t=
op-width: 0px; color: rgb(34, 34, 34); display: inline; float: none; font-f=
amily: &quot;Arial&quot;,&quot;Helvetica&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-righ=
t: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px=
; padding-right: 0px; padding-top: 0px; text-align: left; text-decoration: =
none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0p=
x; white-space: normal; word-spacing: 0px;"><font face=3D"courier new,monos=
pace"></font><i></i><br></span></div><div style=3D"background-color: transp=
arent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; bor=
der-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(34, 34, 34); border-left-style: none; border-left=
-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none;=
border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-sty=
le: none; border-top-width: 0px; color: rgb(34, 34, 34); font-family: &=
quot;Arial&quot;,&quot;Helvetica&quot;,sans-serif; font-size: 1=
3px; font-style: normal; font-variant: normal; font-weight: 400; letter-spa=
cing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; marg=
in-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-ri=
ght: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-i=
ndent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-spa=
ce: normal; word-spacing: 0px;"><br></div>And the user user can add his sav=
e methods as overloads in the same way. =C2=A0<br></div><div><font face=3D"=
courier new,monospace">=C2=A0</font></div><blockquote class=3D"gmail_quote"=
style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-=
left: 1ex;"><div dir=3D"ltr"><div class=3D"gmail_quote"><div><font face=3D"=
courier new,monospace"></font><br></div><div><br><br></div><div>=C2=A0</div=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div><div style=3D"ba=
ckground-color:transparent;border-bottom-color:rgb(34,34,34);border-bottom-=
style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-l=
eft-style:none;border-left-width:0px;border-right-color:rgb(34,34,34);borde=
r-right-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);bo=
rder-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px=
;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:norma=
l;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding=
-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;text-align:l=
eft;text-decoration:none;text-indent:0px;text-transform:none;white-space:no=
rmal;word-spacing:0px"><br style=3D"background-color:transparent;background=
-image:none;background-repeat:repeat;border-bottom-color:rgb(34,34,34);bord=
er-bottom-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34=
);border-left-style:none;border-left-width:0px;border-right-color:rgb(34,34=
,34);border-right-style:none;border-right-width:0px;border-top-color:rgb(34=
,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);font=
-size:13px;min-height:auto;margin-bottom:0px;margin-left:0px;margin-right:0=
px;margin-top:0px;min-width:0px;overflow:visible;overflow-x:visible;overflo=
w-y:visible;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-t=
op:0px"></div><div style=3D"background-color:transparent;border-bottom-colo=
r:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px;border-lef=
t-color:rgb(34,34,34);border-left-style:none;border-left-width:0px;border-r=
ight-color:rgb(34,34,34);border-right-style:none;border-right-width:0px;bor=
der-top-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;colo=
r:rgb(34,34,34);font-size:13px;font-style:normal;font-variant:normal;font-w=
eight:400;letter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-ri=
ght:0px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0p=
x;padding-top:0px;text-align:left;text-decoration:none;text-indent:0px;text=
-transform:none;white-space:normal;word-spacing:0px"><br style=3D"border-bo=
ttom-color:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px;b=
order-left-color:rgb(34,34,34);border-left-style:none;border-left-width:0px=
;border-right-color:rgb(34,34,34);border-right-style:none;border-right-widt=
h:0px;border-top-color:rgb(34,34,34);border-top-style:none;border-top-width=
:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padd=
ing-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px"></div></=
div><div>=C2=A0</div><b></b><i></i><u></u><sub></sub><sup></sup><strike></s=
trike><br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D=
"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><d=
iv dir=3D"ltr"><div class=3D"gmail_quote"><div><br></div><div>This is why w=
e can't have nice things. The ridiculous idea that everything in a new =
version of X must be compatible with every previous version of X has been t=
he bane of the computing industry since the demon-spawn of MSDOS.</div><div=
><br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"=
><div><br></div><div>What we want is for local <font face=3D"courier new,mo=
nospace">size</font> <i>not to</i> hide. If the user wants to hide he shoul=
d use a qualified called, so to be explicit.=C2=A0</div><div><br></div><div=
>This will match current behavior.=C2=A0</div><div><br></div><div>Currently=
, if the user wants to hide, he must use a free standing function which wil=
l force him to be explicit on the call site by changing the call syntax</di=
v><div><font face=3D"courier new,monospace"><br></font></div><div><font fac=
e=3D"arial,sans-serif">from</font><font face=3D"courier new,monospace"> f.s=
ize() <font face=3D"arial,sans-serif">to</font> size(f)</font></div><div><f=
ont face=3D"courier new,monospace"></font><br></div><div>In the unified wor=
ld, if the user wants to hide, he must again change the call syntax, this t=
ime</div><div><br></div><div>from <font face=3D"courier new,monospace">size=
(f) </font><font face=3D"arial,sans-serif">to</font><font face=3D"courier n=
ew,monospace"> ::size(f)</font></div><div><font face=3D"courier new,monospa=
ce"></font>=C2=A0</div><div><br></div><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1e=
x"><div dir=3D"ltr"><div class=3D"gmail_quote"><div><br></div><div><br></di=
v><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
..8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><fo=
nt face=3D"courier new,monospace"><br></font></div><div><font face=3D"arial=
,sans-serif">Now, if someone adds=C2=A0</font></div><div><font face=3D"cour=
ier new,monospace"><font face=3D"arial,sans-serif"></font><br></font></div>=
<div><font face=3D"courier new,monospace"><span style=3D"text-align:left;te=
xt-transform:none;text-indent:0px;letter-spacing:normal;font-family:courier=
new,monospace;font-size:13px;font-style:normal;font-variant:normal;font-we=
ight:400;text-decoration:none;word-spacing:0px;display:inline!important;whi=
te-space:normal;float:none;background-color:transparent">void func(C&, =
size_t);</span></font></div><div><font face=3D"courier new,monospace"><b></=
b><i></i><u></u><sub></sub><sup></sup><strike></strike><br></font></div><di=
v><font face=3D"arial,sans-serif">By </font><font face=3D"arial,sans-serif"=
><a onmousedown=3D"this.href=3D'http://www.google.com/url?q\x3dhttp%3A%=
2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2016%2Fp0301r0=
..html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG0c9fPByA6sWhcNkdG8HHMR677UQ&=
#39;;return true;" onclick=3D"this.href=3D'http://www.google.com/url?q\=
x3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F201=
6%2Fp0301r0.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG0c9fPByA6sWhcNkdG=
8HHMR677UQ';return true;" href=3D"http://www.open-std.org/jtc1/sc22/wg2=
1/docs/papers/2016/p0301r0.html" target=3D"_blank" rel=3D"nofollow">the cur=
rent rules</a> this will <i>hide</i> the member function, but now the condi=
tion is an error as the call to func is ambiguous.</font></div><div><font f=
ace=3D"arial,sans-serif"><br></font></div><div><font face=3D"arial,sans-ser=
if"><div>(Needless to say, the above could be used in the future not to <i>=
enable</i>=C2=A0<span>UFCS, but to <i style=3D"border-bottom-color:rgb(34,3=
4,34);border-bottom-style:none;border-bottom-width:0px;border-left-color:rg=
b(34,34,34);border-left-style:none;border-left-width:0px;border-right-color=
:rgb(34,34,34);border-right-style:none;border-right-width:0px;border-top-co=
lor:rgb(34,34,34);border-top-style:none;border-top-width:0px;margin-bottom:=
0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padd=
ing-left:0px;padding-right:0px;padding-top:0px">override</i> the rules.)</s=
pan><br></div></font></div><div><font face=3D"arial,sans-serif"><b></b><i><=
/i><u></u><sub></sub><sup></sup><strike></strike><br></font></div><div>In n=
4586 it says <i>"...Some people wanted additional opt-in mechanisms to=
enable the new behavior, which was discussed in great detail, but rejected=
"</i><i><br></i></div><div>What were those opt-ins? Was something like=
this considered, or the opt-ins were on the declaration side (be it on the=
member/class or function) or on the call site?</div><div><br></div><div><b=
r></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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-3079=
-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-3079-4619-9db0-c993dba7a8b6=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464=
c9ca-3079-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/7464c9ca-3079-4619-<wbr>9db0-=
c993dba7a8b6%40isocpp.org</a><wbr>.<br>
</blockquote></div></div>
</blockquote></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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4f04=
-4e26-a630-ce4b41363d19%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4f04-4e26-a630-ce4b41363d19=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e13=
18cb-4f04-4e26-a630-ce4b41363d19%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/9e1318cb-4f04-4e26-<wbr>a630-=
ce4b41363d19%40isocpp.org</a><wbr>.<br>
</blockquote></div></div>
</blockquote></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 onmousedown=3D"this.href=3D'javascript:';return true;" o=
nclick=3D"this.href=3D'javascript:';return true;" href=3D"javascrip=
t:" target=3D"_blank" rel=3D"nofollow" gdf-obfuscated-mailto=3D"s4twKEpADQA=
J">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a onmousedown=3D"this.href=3D'jav=
ascript:';return true;" onclick=3D"this.href=3D'javascript:';re=
turn true;" href=3D"javascript:" target=3D"_blank" rel=3D"nofollow" gdf-obf=
uscated-mailto=3D"s4twKEpADQAJ">std-pr...@isocpp.org</a>.<br>
To view this discussion on the web visit <a onmousedown=3D"this.href=3D'=
;https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1eb57a3b-836f=
-4a6b-8842-b2196293d30f%40isocpp.org?utm_medium\x3demail\x26utm_source\x3df=
ooter';return true;" onclick=3D"this.href=3D'https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/1eb57a3b-836f-4a6b-8842-b2196293d30f=
%40isocpp.org?utm_medium\x3demail\x26utm_source\x3dfooter';return true;=
" href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1eb5=
7a3b-836f-4a6b-8842-b2196293d30f%40isocpp.org?utm_medium=3Demail&utm_so=
urce=3Dfooter" target=3D"_blank" rel=3D"nofollow">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/1eb57a3b-836f-4a6b-<wbr>8842-=
b2196293d30f%40isocpp.org</a><wbr>.<br>
</blockquote></div></div>
</blockquote></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/19e44df2-5580-4c2c-9221-c82357f3b682%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/19e44df2-5580-4c2c-9221-c82357f3b682=
%40isocpp.org</a>.<br />
------=_Part_795_813294755.1533913049545--
------=_Part_794_1068884719.1533913049542--
.
Author: Richard Hodges <hodges.r@gmail.com>
Date: Fri, 10 Aug 2018 16:30:25 +0100
Raw View
--000000000000de508e0573166c4d
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Fri, 10 Aug 2018 at 15:57, <mihailnajdenov@gmail.com> wrote:
>
>
> On Friday, August 10, 2018 at 4:32:07 PM UTC+3, Richard Hodges wrote:
>>
>>
>>
>> On Fri, 10 Aug 2018 at 14:57, <mihailn...@gmail.com> wrote:
>>
>>>
>>>
>>> On Friday, August 10, 2018 at 1:35:31 PM UTC+3, Richard Hodges wrote:
>>>>
>>>>
>>>>
>>>> On Fri, 10 Aug 2018 at 09:01, <mihailn...@gmail.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Thursday, August 9, 2018 at 11:47:08 AM UTC+3, Richard Hodges wrot=
e:
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, 9 Aug 2018 at 10:05, <mihailn...@gmail.com> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wednesday, August 8, 2018 at 4:41:58 PM UTC+3, Olanrewaju Adetul=
a
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> If by defining member function for example, an associated free
>>>>>>>> function can be synthesized by the compiler or vice-versa, then we=
can call
>>>>>>>> such function using either syntax.
>>>>>>>>
>>>>>>>>
>>>>>>> I see, note however that if this is enabled it will be a breaking
>>>>>>> change.
>>>>>>>
>>>>>>>
>>>>>>>> On Mon, Aug 6, 2018 at 4:26 PM, <mihailn...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> Of course going full UCS introduces the mirror set of
>>>>>>>>>>> vulnerability-to-change problems. If we can call members using =
free
>>>>>>>>>>> standing, then these are either in competition or there is a pr=
eferred
>>>>>>>>>>> call.
>>>>>>>>>>> If there is a completion there is potential code break or code
>>>>>>>>>>> change if suddenly the member is the better match, if there is =
a preferred
>>>>>>>>>>> call, there is a potential silent code change.
>>>>>>>>>>
>>>>>>>>>> Or the type author can define one and the language synthesizes
>>>>>>>>>> the other via opt-in. With that, it won't matter anymore which s=
yntax is
>>>>>>>>>> used to invoke the function and any attempt to define any other =
will error
>>>>>>>>>> as a result of redeclaration.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> Can you elaborate?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Mon, Aug 6, 2018 at 4:01 PM, <mihailn...@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Forgot to mention the elephant in the room - this does not solv=
e
>>>>>>>>>>> the fundamental issue, how do we define concept requirements fo=
r a class,
>>>>>>>>>>> is it in terms of member functions or in terms of free-standing=
ones.
>>>>>>>>>>>
>>>>>>>>>>> However, this can be a stepping stone towards UCS - after a
>>>>>>>>>>> period of time we could make one of the two options the default=
..
>>>>>>>>>>> It will be a non-breaking change, after which the syntax will
>>>>>>>>>>> be used to let the user override the default behavior.
>>>>>>>>>>>
>>>>>>>>>>> Of course going full UCS introduces the mirror set of
>>>>>>>>>>> vulnerability-to-change problems. If we can call members using =
free
>>>>>>>>>>> standing, then these are either in competition or there is a pr=
eferred
>>>>>>>>>>> call.
>>>>>>>>>>> If there is a completion there is potential code break or code
>>>>>>>>>>> change if suddenly the member is the better match, if there is =
a preferred
>>>>>>>>>>> call, there is a potential silent code change.
>>>>>>>>>>>
>>>>>>>>>>> Silent code change is not so silent as it is not by the class
>>>>>>>>>>> author but by the client code, introducing a free function can
>>>>>>>>>>> *hide* a class member function, called as free function.
>>>>>>>>>>> Seems to me this is unavoidable, as other options, are either
>>>>>>>>>>> breaking (overloading) or still code changing (pick member alwa=
ys) and
>>>>>>>>>>> almost certainly more surprising, yet hides like this are somet=
hing new.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Comments are welcome, I might write a proposal to give this
>>>>>>>>>>> feature another go.
>>>>>>>>>>> I personally can't decide for myself if I want full UFC or just
>>>>>>>>>>> a way to call functions using member access syntax.
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> 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-proposal...@isocpp.org.
>>>>>>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>>>>>>> To view this discussion on the web visit
>>>>>>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd=
460620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org
>>>>>>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/d=
d460620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_sou=
rce=3Dfooter>
>>>>>>>>>>> .
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>> You received this message because you are subscribed to the Googl=
e
>>>>>>>>> Groups "ISO C++ Standard - Future Proposals" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>>> send an email to std-proposal...@isocpp.org.
>>>>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>>>>> To view this discussion on the web visit
>>>>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734b=
c99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org
>>>>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734=
bc99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=3Demail&utm_sourc=
e=3Dfooter>
>>>>>>>>> .
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> In any case, I investigated the UFCS situation further and, to my
>>>>>>> surprise, it turned out, in its last stages only f(x,y) calling x.f=
(y) was
>>>>>>> considered.
>>>>>>> I wonder, were all the people asking for UFCS at CppConn last year
>>>>>>> even aware of that! One can read more here
>>>>>>> <https://isocpp.org/blog/2016/02/a-bit-of-background-for-the-unifie=
d-call-proposal>
>>>>>>> and here
>>>>>>> <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/n4586.pdf>
>>>>>>> (n4586, search down for "unified").
>>>>>>>
>>>>>>> Aside from the fact literally no one has ever requested f(x,y)
>>>>>>> calling x.f(y), for obvious reasons, and the only people to whom it=
is
>>>>>>> useful are library writers, I am not surprised at all that even tha=
t was
>>>>>>> not accepted.
>>>>>>> Hell, even Bjarne says
>>>>>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0131r0.pd=
f> *"People
>>>>>>> who fear side effects from generalization might then prefer x.f(y) =
[to
>>>>>>> generalize] because it is more restrictive".*
>>>>>>>
>>>>>>> Indeed, the possibility tor trivially hide a class member function,
>>>>>>> is not pretty indeed.
>>>>>>>
>>>>>>>
>>>>>>> With all that said, I still believe there is hope. In n4586, it is
>>>>>>> noted* "Spicer liked the goal of the proposal, but wanted opt-in
>>>>>>> which would then consider members and non-members equally in an ove=
rload
>>>>>>> set."*
>>>>>>> and *"Yasskin said he=E2=80=99d feel more comfortable being able to=
see the
>>>>>>> feature in use for a long period of time, and would feel more comfo=
rtable
>>>>>>> seeing it in a TS. "*
>>>>>>>
>>>>>>> These are doable. We introduce UFCS as a scoped, user-side opt-in
>>>>>>> which will bring both free and member functions into one overloadin=
g set.
>>>>>>>
>>>>>>> struct C
>>>>>>> {
>>>>>>> void func(double) {}
>>>>>>> };
>>>>>>>
>>>>>>> // user
>>>>>>>
>>>>>>> void f(C& c)
>>>>>>> {
>>>>>>> using C::func; //< bring func into the overloading set
>>>>>>>
>>>>>>> func(c, -1);
>>>>>>> }
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>> This makes a lot of sense. Perhaps there is a way to provide
>>>>>> free-function overloads which can be replaced by specific free funct=
ions,
>>>>>> without any concerns about backward compatibility:
>>>>>>
>>>>>> struct Foo {
>>>>>> bool empty() const;
>>>>>> std::size_t size() const;
>>>>>> };
>>>>>>
>>>>>> using auto Foo::*; // bring all public member functions of Foo int=
o
>>>>>> the outer namespace as free functions
>>>>>>
>>>>>> // but with lower 'weight' than an actual free function declaration:
>>>>>> std::size_t size(Foo const& f); // auto-synthesised Foo::size(Foo
>>>>>> const&) is now hidden in preference to ::size(Foo const&)
>>>>>>
>>>>>
>>>>>
>>>>> Richard, this is the behavior suggested under UFCS, but was rejected.
>>>>> Here is a great example why
>>>>> <https://www.reddit.com/r/cpp/comments/4d19gk/awesome_wg21_paper_abou=
t_alternative_unified_call/d1uqkpz>
>>>>> .
>>>>>
>>>>
>>>> You mean we lost the chance to gain an important, amazing language
>>>> feature for the sake of one unimaginative luddite who has a code base =
so
>>>> ancient that he's unlikely to ever actually switch on the -std=3Dc++20
>>>> feature at all?
>>>>
>>>
>>>
>>> Richard, new code will be at risk. The moment someone changes x.f(y) t=
o
>>> f(x, y) he is no longer sure what is called as there *might* be some
>>> 'using' or even some co-worker "friendly wrapper" which hides the call.
>>>
>>> Honestly, the risk of you or a co-worker breaking your code is the
>>> biggest risk as there will be no namespace boundary: You refactor your =
code
>>> to use some helper functions, but somewhere someone decided a method is=
not
>>> what they want exactly and created a free function to use in its place,
>>> hiding your call as well by incident.
>>> And the sad part is, there will be no warning - why should it be? Isn't
>>> this the expected behavior for free functions to hide members? Should t=
he
>>> co-worker be warned not to use free functions with the same name as
>>> members?
>>>
>>> Nasty situation, this is because we have lost intend by unifying the
>>> syntax. Actually, it is not problem with the syntax - intend can be
>>> expressed by qualified call - but the fact we had different defaults fo=
r so
>>> long.
>>>
>>>
>>> The other default is also not acceptable - to overload all. This will
>>> *both* change (pick "better" overloaded) *and* break (redefinitions).
>>> One might be able to fix the breakages, but the silent-and-correct
>>> changes will be impossible to find and fix on a scale, not without
>>> rock-solid tools we don't have (yet?).
>>>
>>> Even then, will people be happy with the fact free functions now
>>> *always* must be qualified in order to be "free"?
>>>
>>>
>>> The only way out in foreseeable future (or probably ever) is an opt-in.
>>>
>>
>> I have proposed an opt-in that would work further up the chain:
>>
>> namespace foo {
>> struct bar {
>> void baz();
>> void baz2();
>> };
>>
>> #if (__has_auto_free_functions)
>> using auto foo::baz; // automatically synthesises
>> ::foo::baz(foo::bar&) - this is an opt-in by the author of bar
>>
>> using auto foo::*; // automatically synthesises ::foo::baz(foo::bar&)
>> and ::foo::baz2(foo::bar&) - this is also an opt-in by the author of bar
>> #endif
>> }
>>
>> This would also allow newly modified libraries to be compatible with
>> older client codebases.
>>
>> If older code-bases have free-function overloads that have the same name
>> as members with different effects, this is certainly an ambiguity of des=
ign
>> that needs addressing. However, in the face of intransigence, a compiler
>> switch would suffice:
>>
>> $cc -std=3Dc++20 -fno-auto-free-functions nod.cpp #
>> __has_auto_free_functions is now false
>>
>
>
> Not sure how is this different then what I described, *as long as* there
> is no hiding. The fact that the library author opts in preemptively?
> Sure one can do that, but then the user will have to deal with
> redefinitions if he is using foo and has a function baz and wants UCF
>
Agreed, but I have indicated that he can avoid doing that by defining a
compiler flag
>
> In any case, the point was, the opt in is not on the declaration (not par=
t
> of the class/function) and is not on the call site (the .f() alternative)
>
Fully agree here.
>
> It is in scope/TU. Yes, it can be the library author that injects into th=
e
> user TU by defining it like that.
>
> Much the same way we can expect a library which extends its classes using
> free functions to let the user also use these methods
>
> namespace lib {
>
> class Image{};
>
> void save(const Image&, String) {}
>
> class Image using
> {
> using save;
> };
>
> } //< lib
>
> // user
>
> using lib::save;
>
>
> img.save("path");
>
>
> And the user user can add his save methods as overloads in the same way.
>
>
>>
>>
>>
>>
>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>>
>>>> This is why we can't have nice things. The ridiculous idea that
>>>> everything in a new version of X must be compatible with every previou=
s
>>>> version of X has been the bane of the computing industry since the
>>>> demon-spawn of MSDOS.
>>>>
>>>>
>>>>
>>>>>
>>>>> What we want is for local size *not to* hide. If the user wants to
>>>>> hide he should use a qualified called, so to be explicit.
>>>>>
>>>>> This will match current behavior.
>>>>>
>>>>> Currently, if the user wants to hide, he must use a free standing
>>>>> function which will force him to be explicit on the call site by chan=
ging
>>>>> the call syntax
>>>>>
>>>>> from f.size() to size(f)
>>>>>
>>>>> In the unified world, if the user wants to hide, he must again change
>>>>> the call syntax, this time
>>>>>
>>>>> from size(f) to ::size(f)
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Now, if someone adds
>>>>>>>
>>>>>>> void func(C&, size_t);
>>>>>>>
>>>>>>> By the current rules
>>>>>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0301r0.ht=
ml>
>>>>>>> this will *hide* the member function, but now the condition is an
>>>>>>> error as the call to func is ambiguous.
>>>>>>>
>>>>>>> (Needless to say, the above could be used in the future not to
>>>>>>> *enable* UFCS, but to *override* the rules.)
>>>>>>>
>>>>>>> In n4586 it says *"...Some people wanted additional opt-in
>>>>>>> mechanisms to enable the new behavior, which was discussed in great=
detail,
>>>>>>> but rejected"*
>>>>>>> What were those opt-ins? Was something like this considered, or the
>>>>>>> opt-ins were on the declaration side (be it on the member/class or
>>>>>>> function) or on the call site?
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> 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-proposal...@isocpp.org.
>>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>>> To view this discussion on the web visit
>>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9=
ca-3079-4619-9db0-c993dba7a8b6%40isocpp.org
>>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c=
9ca-3079-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium=3Demail&utm_source=
=3Dfooter>
>>>>>>> .
>>>>>>>
>>>>>> --
>>>>> 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, sen=
d
>>>>> an email to std-proposal...@isocpp.org.
>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb=
-4f04-4e26-a630-ce4b41363d19%40isocpp.org
>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318c=
b-4f04-4e26-a630-ce4b41363d19%40isocpp.org?utm_medium=3Demail&utm_source=3D=
footer>
>>>>> .
>>>>>
>>>> --
>>> 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-proposal...@isocpp.org.
>>> To post to this group, send email to std-pr...@isocpp.org.
>>> To view this discussion on the web visit
>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1eb57a3b-8=
36f-4a6b-8842-b2196293d30f%40isocpp.org
>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1eb57a3b-=
836f-4a6b-8842-b2196293d30f%40isocpp.org?utm_medium=3Demail&utm_source=3Dfo=
oter>
>>> .
>>>
>> --
> 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/19e44df2-558=
0-4c2c-9221-c82357f3b682%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/19e44df2-55=
80-4c2c-9221-c82357f3b682%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>
--=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/CALvx3hbbfd7-soh16t5fF02OuFAraL4jdcKKowV840N-kgx=
z_w%40mail.gmail.com.
--000000000000de508e0573166c4d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri=
, 10 Aug 2018 at 15:57, <<a href=3D"mailto:mihailnajdenov@gmail.com">mih=
ailnajdenov@gmail.com</a>> wrote:<br></div><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex=
"><div dir=3D"ltr"><br><br>On Friday, August 10, 2018 at 4:32:07 PM UTC+3, =
Richard Hodges wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;ma=
rgin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"lt=
r"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri, 10 Aug 2018 =
at 14:57, <<a rel=3D"nofollow">mihailn...@gmail.com</a>> wrote:<br></=
div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef=
t:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><br>On Friday, Augu=
st 10, 2018 at 1:35:31 PM UTC+3, Richard Hodges wrote:<blockquote class=3D"=
gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid=
;padding-left:1ex"><div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div=
dir=3D"ltr">On Fri, 10 Aug 2018 at 09:01, <<a rel=3D"nofollow">mihailn.=
...@gmail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div di=
r=3D"ltr"><br><br>On Thursday, August 9, 2018 at 11:47:08 AM UTC+3, Richard=
Hodges wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-le=
ft:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br>=
<br><div class=3D"gmail_quote"><div dir=3D"ltr">On Thu, 9 Aug 2018 at 10:05=
, <<a rel=3D"nofollow">mihailn...@gmail.com</a>> wrote:<br></div><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><div dir=3D"ltr"><br><br>On Wednesday, August 8,=
2018 at 4:41:58 PM UTC+3, Olanrewaju Adetula wrote:<blockquote class=3D"gm=
ail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr">If by defining member function for exampl=
e, an associated free function can be synthesized by the compiler or vice-v=
ersa, then we can call such function using either syntax.</div><div><br></d=
iv></blockquote><div><br></div><div>I see, note however that if this is ena=
bled it will be a breaking change.</div><div>=C2=A0</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc s=
olid;padding-left:1ex"><div><div class=3D"gmail_quote">On Mon, Aug 6, 2018 =
at 4:26 PM, <span dir=3D"ltr"><<a rel=3D"nofollow">mihailn...@gmail.com=
</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin=
:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><=
span><br><br>On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adet=
ula wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0=
..8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0<br>If there is a completion there is potentia=
l code break or code change if suddenly the member is the better match, if =
there is a preferred call, there is a potential silent code change.</blockq=
uote>
Or the type author can define one and the language synthesizes the other vi=
a opt-in. With that, it won't matter anymore which syntax is used to in=
voke the function and any attempt to define any other will error as a resul=
t of redeclaration.<div><br></div></div></blockquote><div><br></div></span>=
<div>Can you elaborate?=C2=A0</div><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr"><div></div></div><div><br><div class=3D"g=
mail_quote"><span>On Mon, Aug 6, 2018 at 4:01 PM, <span dir=3D"ltr"><<a=
rel=3D"nofollow">mihailn...@gmail.com</a>></span> wrote:<br></span><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><span><div dir=3D"ltr"><div>Forgot to mention th=
e elephant in the room - this does not solve the fundamental issue, how do =
we define concept requirements for a class, is it in terms of member functi=
ons or in terms of free-standing ones.</div><div><br></div><div>However, th=
is can be a stepping stone towards UCS - after a period of time we could ma=
ke one of the two options the default.=C2=A0</div><div><span style=3D"displ=
ay:inline!important;float:none;background-color:transparent;color:rgb(34,34=
,34);font-family:"Arial","Helvetica",sans-serif;font-si=
ze:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacin=
g:normal;text-align:left;text-decoration:none;text-indent:0px;text-transfor=
m:none;white-space:normal;word-spacing:0px">It will be a non-breaking chang=
e, a</span>fter which the syntax will be used to let the user override the =
default behavior. =C2=A0</div><div><br></div><div>Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0</div><div>If there is a completion there is p=
otential code break or code change if suddenly the member is the better mat=
ch, if there is a preferred call, there is a potential silent code change.<=
/div><div><br></div><div>Silent code change is not so silent as it is not b=
y the class author but by the client code, introducing a free function can =
<i>hide</i> a class member function, called as free function.</div><div>See=
ms to me this is unavoidable, as other options, are either breaking (overlo=
ading) or still code changing (pick member always) and almost certainly mor=
e surprising, yet hides like this are something new.</div><div><br></div><d=
iv><br></div><div>Comments are welcome, I might write a proposal to give th=
is feature another go.</div><div>I personally can't decide for myself i=
f I want full UFC or just a way to call functions using member access synta=
x.</div></div></span><span><font color=3D"#888888"><span>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span><br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/dd460620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org</a>.<br>
</span></font></span></blockquote></div><br></div>
</blockquote></div><span>
<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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<br></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org</a>.<br>
</blockquote></div><br></div></blockquote><div><br></div><div><br></div><di=
v>In any case, I investigated the UFCS situation further and, to my surpris=
e, it turned out, in its last stages only f(x,y) calling x.f(y) was conside=
red.</div><div>I wonder, were all the people asking for UFCS at CppConn las=
t year even aware of that! One can read more <a href=3D"https://isocpp.org/=
blog/2016/02/a-bit-of-background-for-the-unified-call-proposal" rel=3D"nofo=
llow" target=3D"_blank">here</a> and <a href=3D"http://www.open-std.org/JTC=
1/SC22/WG21/docs/papers/2016/n4586.pdf" rel=3D"nofollow" target=3D"_blank">=
here</a> (n4586, search down for "unified").</div><div><br></div>=
<div>Aside from the fact literally no one has ever requested <span style=3D=
"display:inline!important;float:none;background-color:transparent;color:rgb=
(34,34,34);font-family:"Arial","Helvetica",sans-serif;f=
ont-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-=
spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-tr=
ansform:none;white-space:normal;word-spacing:0px">f(x,y) calling x.f(y), fo=
r obvious reasons, and the only people to whom it is useful are library wri=
ters, I am not surprised at all that even that was not accepted.</span></di=
v><div><span style=3D"display:inline!important;float:none;background-color:=
transparent;color:rgb(34,34,34);font-family:"Arial","Helveti=
ca",sans-serif;font-size:13px;font-style:normal;font-variant:normal;fo=
nt-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;te=
xt-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Hell=
, even Bjarne <a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers=
/2015/p0131r0.pdf" rel=3D"nofollow" target=3D"_blank">says</a> </span><span=
style=3D"text-align:left;color:rgb(34,34,34);text-transform:none;text-inde=
nt:0px;letter-spacing:normal;font-family:"Arial","Helvetica&=
quot;,sans-serif;font-size:13px;font-variant:normal;font-weight:400;text-de=
coration:none;word-spacing:0px;display:inline!important;white-space:normal;=
float:none;background-color:transparent"><i>"People who fear side effe=
cts from generalization might then prefer x.f(y)<span style=3D"text-align:l=
eft;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:=
normal;font-family:"Arial","Helvetica",sans-serif;font-=
size:13px;font-variant:normal;font-weight:400;text-decoration:none;word-spa=
cing:0px;display:inline!important;white-space:normal;float:none;background-=
color:transparent"> [to generalize]</span> because it is more restrictive&q=
uot;.</i><br></span></div><div><br></div><div>Indeed, the possibility tor t=
rivially hide a class member function, is not pretty indeed.=C2=A0</div><di=
v><br></div><div><br></div><div>With all that said, I still believe there i=
s hope. In n4586, it is noted<i> "Spicer liked the goal of the proposa=
l, but wanted opt-in which would then consider members and non-members equa=
lly in an overload set."</i></div><div>and <i>"Yasskin said he=E2=
=80=99d feel more comfortable being able to see the feature in use for a lo=
ng period of time, and would feel more comfortable seeing it in a TS. "=
;</i></div><div><i><br></i></div><div>These are doable. We introduce UFCS a=
s a scoped, user-side opt-in which will bring both free and member function=
s into one overloading set.</div><div><br></div><div><font face=3D"courier =
new,monospace">struct C</font></div><div><font face=3D"courier new,monospac=
e">{</font></div><div><font face=3D"courier new,monospace">=C2=A0 void func=
(double) {}</font></div><div><font face=3D"courier new,monospace">};</font>=
</div><div><font face=3D"courier new,monospace"></font><br></div><div><font=
face=3D"courier new,monospace">// user</font></div><div><font face=3D"cour=
ier new,monospace"></font><br></div><div><font face=3D"courier new,monospac=
e">void f(C& c)</font></div><div><font face=3D"courier new,monospace">{=
</font></div><div><font face=3D"courier new,monospace">=C2=A0 using C::func=
; //< bring func into the overloading set=C2=A0</font></div><div><font f=
ace=3D"courier new,monospace"></font><br></div><div><font face=3D"courier n=
ew,monospace">=C2=A0 func(c, -1);</font></div><div><font face=3D"courier ne=
w,monospace">}</font></div></div></blockquote><div><br></div></div></div></=
blockquote><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div di=
r=3D"ltr"><div class=3D"gmail_quote"><div></div><div>This makes a lot of se=
nse. Perhaps there is a way to provide free-function overloads which can be=
replaced by specific free functions, without any concerns about backward c=
ompatibility:</div><div><br></div><div><font face=3D"monospace, monospace">=
struct Foo {</font></div><div><font face=3D"monospace, monospace">=C2=A0 bo=
ol empty() const;</font></div><div><font face=3D"monospace, monospace">=C2=
=A0 std::size_t size() const;</font></div><div><font face=3D"monospace, mon=
ospace">};</font></div><div><font face=3D"monospace, monospace"><br></font>=
</div><div><font face=3D"monospace, monospace">using auto Foo::*;=C2=A0 =C2=
=A0// bring all public member functions of Foo into the outer namespace as =
free functions</font></div><div><font face=3D"monospace, monospace"><br></f=
ont></div><div><font face=3D"monospace, monospace">// but with lower 'w=
eight' than an actual free function declaration:</font></div><div><font=
face=3D"monospace, monospace">std::size_t size(Foo const& f);=C2=A0 =
=C2=A0 // auto-synthesised Foo::size(Foo const&) is now hidden in prefe=
rence to ::size(Foo const&)</font></div></div></div></blockquote><div><=
br></div><div><br></div><div>Richard, this is the behavior suggested under =
UFCS, but was rejected. Here is <a href=3D"https://www.reddit.com/r/cpp/com=
ments/4d19gk/awesome_wg21_paper_about_alternative_unified_call/d1uqkpz" rel=
=3D"nofollow" target=3D"_blank">a great example why</a><font color=3D"#0040=
00">.</font> =C2=A0</div></div></blockquote><div><br></div><div>You mean we=
lost the chance to gain an important, amazing language feature for the sak=
e of one unimaginative luddite who has a code base so ancient that he's=
unlikely to ever actually switch on the -std=3Dc++20 feature at all?</div>=
</div></div></blockquote><div><br></div><div><div><div style=3D"background-=
color:transparent;border-bottom-color:rgb(34,34,34);border-bottom-style:non=
e;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-style=
:none;border-left-width:0px;border-right-color:rgb(34,34,34);border-right-s=
tyle:none;border-right-width:0px;border-top-color:rgb(34,34,34);border-top-=
style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;font-sty=
le:normal;font-variant:normal;font-weight:400;letter-spacing:normal;margin-=
bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0=
px;padding-left:0px;padding-right:0px;padding-top:0px;text-align:left;text-=
decoration:none;text-indent:0px;text-transform:none;white-space:normal;word=
-spacing:0px"><br style=3D"background-color:transparent;background-image:no=
ne;background-repeat:repeat;border-bottom-color:rgb(34,34,34);border-bottom=
-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-=
left-style:none;border-left-width:0px;border-right-color:rgb(34,34,34);bord=
er-right-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);b=
order-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13p=
x;min-height:auto;margin-bottom:0px;margin-left:0px;margin-right:0px;margin=
-top:0px;min-width:0px;overflow:visible;overflow-x:visible;overflow-y:visib=
le;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px"><=
/div><div style=3D"background-color:transparent;border-bottom-color:rgb(34,=
34,34);border-bottom-style:none;border-bottom-width:0px;border-left-color:r=
gb(34,34,34);border-left-style:none;border-left-width:0px;border-right-colo=
r:rgb(34,34,34);border-right-style:none;border-right-width:0px;border-top-c=
olor:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,=
34,34);font-size:13px;font-style:normal;font-variant:normal;font-weight:400=
;letter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-right:0px;m=
argin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;padding=
-top:0px;text-align:left;text-decoration:none;text-indent:0px;text-transfor=
m:none;white-space:normal;word-spacing:0px">Richard, new code will be at ri=
sk.=C2=A0 The moment someone changes x.f(y) to f(x, y) he is no longer sure=
what is called as there <i style=3D"background-color:transparent;backgroun=
d-image:none;background-repeat:repeat;border-bottom-color:rgb(34,34,34);bor=
der-bottom-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,3=
4);border-left-style:none;border-left-width:0px;border-right-color:rgb(34,3=
4,34);border-right-style:none;border-right-width:0px;border-top-color:rgb(3=
4,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);fon=
t-size:13px;min-height:auto;margin-bottom:0px;margin-left:0px;margin-right:=
0px;margin-top:0px;min-width:0px;overflow:visible;overflow-x:visible;overfl=
ow-y:visible;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-=
top:0px">might</i> be some 'using' or even some co-worker "fri=
endly wrapper" which hides the call.=C2=A0</div><div style=3D"backgrou=
nd-color:transparent;border-bottom-color:rgb(34,34,34);border-bottom-style:=
none;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-st=
yle:none;border-left-width:0px;border-right-color:rgb(34,34,34);border-righ=
t-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);border-t=
op-style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;font-=
style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;marg=
in-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-botto=
m:0px;padding-left:0px;padding-right:0px;padding-top:0px;text-align:left;te=
xt-decoration:none;text-indent:0px;text-transform:none;white-space:normal;w=
ord-spacing:0px"><br style=3D"background-color:transparent;background-image=
:none;background-repeat:repeat;border-bottom-color:rgb(34,34,34);border-bot=
tom-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);bord=
er-left-style:none;border-left-width:0px;border-right-color:rgb(34,34,34);b=
order-right-style:none;border-right-width:0px;border-top-color:rgb(34,34,34=
);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-size:=
13px;min-height:auto;margin-bottom:0px;margin-left:0px;margin-right:0px;mar=
gin-top:0px;min-width:0px;overflow:visible;overflow-x:visible;overflow-y:vi=
sible;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px=
"></div><div style=3D"background-color:transparent;border-bottom-color:rgb(=
34,34,34);border-bottom-style:none;border-bottom-width:0px;border-left-colo=
r:rgb(34,34,34);border-left-style:none;border-left-width:0px;border-right-c=
olor:rgb(34,34,34);border-right-style:none;border-right-width:0px;border-to=
p-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(=
34,34,34);font-size:13px;font-style:normal;font-variant:normal;font-weight:=
400;letter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-right:0p=
x;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;padd=
ing-top:0px;text-align:left;text-decoration:none;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px">Honestly, the risk of you or=
a co-worker breaking your code is the biggest risk as there will be no nam=
espace boundary: You refactor your code to use some helper functions, but s=
omewhere someone decided a method is not what they want exactly and created=
a free function to use in its place, hiding your call as well by incident.=
</div><div style=3D"background-color:transparent;border-bottom-color:rgb(34=
,34,34);border-bottom-style:none;border-bottom-width:0px;border-left-color:=
rgb(34,34,34);border-left-style:none;border-left-width:0px;border-right-col=
or:rgb(34,34,34);border-right-style:none;border-right-width:0px;border-top-=
color:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34=
,34,34);font-size:13px;font-style:normal;font-variant:normal;font-weight:40=
0;letter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-right:0px;=
margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;paddin=
g-top:0px;text-align:left;text-decoration:none;text-indent:0px;text-transfo=
rm:none;white-space:normal;word-spacing:0px">And the sad part is, there wil=
l be no warning - why should it be? Isn't this the expected behavior fo=
r free functions to hide members? Should the co-worker be warned not to use=
free functions with the same name as members?=C2=A0</div><div style=3D"bac=
kground-color:transparent;border-bottom-color:rgb(34,34,34);border-bottom-s=
tyle:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-le=
ft-style:none;border-left-width:0px;border-right-color:rgb(34,34,34);border=
-right-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);bor=
der-top-style:none;border-top-width:0px;color:rgb(34,34,34);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-top:0px;padding-=
bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;text-align:le=
ft;text-decoration:none;text-indent:0px;text-transform:none;white-space:nor=
mal;word-spacing:0px"><br style=3D"background-color:transparent;background-=
image:none;background-repeat:repeat;border-bottom-color:rgb(34,34,34);borde=
r-bottom-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34)=
;border-left-style:none;border-left-width:0px;border-right-color:rgb(34,34,=
34);border-right-style:none;border-right-width:0px;border-top-color:rgb(34,=
34,34);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-=
size:13px;min-height:auto;margin-bottom:0px;margin-left:0px;margin-right:0p=
x;margin-top:0px;min-width:0px;overflow:visible;overflow-x:visible;overflow=
-y:visible;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-to=
p:0px"></div><div style=3D"background-color:transparent;border-bottom-color=
:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px;border-left=
-color:rgb(34,34,34);border-left-style:none;border-left-width:0px;border-ri=
ght-color:rgb(34,34,34);border-right-style:none;border-right-width:0px;bord=
er-top-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;color=
:rgb(34,34,34);font-size:13px;font-style:normal;font-variant:normal;font-we=
ight:400;letter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-rig=
ht:0px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px=
;padding-top:0px;text-align:left;text-decoration:none;text-indent:0px;text-=
transform:none;white-space:normal;word-spacing:0px">Nasty situation, this i=
s because we have lost intend by unifying the syntax. Actually, it is not p=
roblem with the syntax - intend can be expressed by qualified call - but th=
e fact we had different defaults for so long.</div><div style=3D"background=
-color:transparent;border-bottom-color:rgb(34,34,34);border-bottom-style:no=
ne;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-styl=
e:none;border-left-width:0px;border-right-color:rgb(34,34,34);border-right-=
style:none;border-right-width:0px;border-top-color:rgb(34,34,34);border-top=
-style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;font-st=
yle:normal;font-variant:normal;font-weight:400;letter-spacing:normal;margin=
-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:=
0px;padding-left:0px;padding-right:0px;padding-top:0px;text-align:left;text=
-decoration:none;text-indent:0px;text-transform:none;white-space:normal;wor=
d-spacing:0px"><br style=3D"background-color:transparent;background-image:n=
one;background-repeat:repeat;border-bottom-color:rgb(34,34,34);border-botto=
m-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);border=
-left-style:none;border-left-width:0px;border-right-color:rgb(34,34,34);bor=
der-right-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);=
border-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13=
px;min-height:auto;margin-bottom:0px;margin-left:0px;margin-right:0px;margi=
n-top:0px;min-width:0px;overflow:visible;overflow-x:visible;overflow-y:visi=
ble;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px">=
</div><div style=3D"background-color:transparent;border-bottom-color:rgb(34=
,34,34);border-bottom-style:none;border-bottom-width:0px;border-left-color:=
rgb(34,34,34);border-left-style:none;border-left-width:0px;border-right-col=
or:rgb(34,34,34);border-right-style:none;border-right-width:0px;border-top-=
color:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34=
,34,34);font-size:13px;font-style:normal;font-variant:normal;font-weight:40=
0;letter-spacing:normal;margin-bottom:0px;margin-left:0px;margin-right:0px;=
margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;paddin=
g-top:0px;text-align:left;text-decoration:none;text-indent:0px;text-transfo=
rm:none;white-space:normal;word-spacing:0px"><br style=3D"background-color:=
transparent;background-image:none;background-repeat:repeat;border-bottom-co=
lor:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0px;border-l=
eft-color:rgb(34,34,34);border-left-style:none;border-left-width:0px;border=
-right-color:rgb(34,34,34);border-right-style:none;border-right-width:0px;b=
order-top-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;co=
lor:rgb(34,34,34);font-size:13px;min-height:auto;margin-bottom:0px;margin-l=
eft:0px;margin-right:0px;margin-top:0px;min-width:0px;overflow:visible;over=
flow-x:visible;overflow-y:visible;padding-bottom:0px;padding-left:0px;paddi=
ng-right:0px;padding-top:0px"></div><div style=3D"background-color:transpar=
ent;border-bottom-color:rgb(34,34,34);border-bottom-style:none;border-botto=
m-width:0px;border-left-color:rgb(34,34,34);border-left-style:none;border-l=
eft-width:0px;border-right-color:rgb(34,34,34);border-right-style:none;bord=
er-right-width:0px;border-top-color:rgb(34,34,34);border-top-style:none;bor=
der-top-width:0px;color:rgb(34,34,34);font-size:13px;font-style:normal;font=
-variant:normal;font-weight:400;letter-spacing:normal;margin-bottom:0px;mar=
gin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-lef=
t:0px;padding-right:0px;padding-top:0px;text-align:left;text-decoration:non=
e;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">=
The other default is also not acceptable - to overload all. This will <i st=
yle=3D"background-color:transparent;background-image:none;background-repeat=
:repeat;border-bottom-color:rgb(34,34,34);border-bottom-style:none;border-b=
ottom-width:0px;border-left-color:rgb(34,34,34);border-left-style:none;bord=
er-left-width:0px;border-right-color:rgb(34,34,34);border-right-style:none;=
border-right-width:0px;border-top-color:rgb(34,34,34);border-top-style:none=
;border-top-width:0px;color:rgb(34,34,34);font-size:13px;min-height:auto;ma=
rgin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;min-width:0=
px;overflow:visible;overflow-x:visible;overflow-y:visible;padding-bottom:0p=
x;padding-left:0px;padding-right:0px;padding-top:0px">both</i> change (pick=
"better" overloaded) <i style=3D"background-color:transparent;ba=
ckground-image:none;background-repeat:repeat;border-bottom-color:rgb(34,34,=
34);border-bottom-style:none;border-bottom-width:0px;border-left-color:rgb(=
34,34,34);border-left-style:none;border-left-width:0px;border-right-color:r=
gb(34,34,34);border-right-style:none;border-right-width:0px;border-top-colo=
r:rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,34,=
34);font-size:13px;min-height:auto;margin-bottom:0px;margin-left:0px;margin=
-right:0px;margin-top:0px;min-width:0px;overflow:visible;overflow-x:visible=
;overflow-y:visible;padding-bottom:0px;padding-left:0px;padding-right:0px;p=
adding-top:0px">and</i> break (redefinitions).=C2=A0</div><div style=3D"bac=
kground-color:transparent;border-bottom-color:rgb(34,34,34);border-bottom-s=
tyle:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-le=
ft-style:none;border-left-width:0px;border-right-color:rgb(34,34,34);border=
-right-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);bor=
der-top-style:none;border-top-width:0px;color:rgb(34,34,34);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-top:0px;padding-=
bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;text-align:le=
ft;text-decoration:none;text-indent:0px;text-transform:none;white-space:nor=
mal;word-spacing:0px">One might be able to fix the breakages, but the silen=
t-and-correct changes will be impossible to find and fix on a scale, not wi=
thout rock-solid tools we don't have (yet?).</div><div style=3D"backgro=
und-color:transparent;border-bottom-color:rgb(34,34,34);border-bottom-style=
:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-s=
tyle:none;border-left-width:0px;border-right-color:rgb(34,34,34);border-rig=
ht-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);border-=
top-style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;font=
-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;mar=
gin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bott=
om:0px;padding-left:0px;padding-right:0px;padding-top:0px;text-align:left;t=
ext-decoration:none;text-indent:0px;text-transform:none;white-space:normal;=
word-spacing:0px"><br></div><div style=3D"background-color:transparent;bord=
er-bottom-color:rgb(34,34,34);border-bottom-style:none;border-bottom-width:=
0px;border-left-color:rgb(34,34,34);border-left-style:none;border-left-widt=
h:0px;border-right-color:rgb(34,34,34);border-right-style:none;border-right=
-width:0px;border-top-color:rgb(34,34,34);border-top-style:none;border-top-=
width:0px;color:rgb(34,34,34);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-top:0px;padding-bottom:0px;padding-left:0px;pa=
dding-right:0px;padding-top:0px;text-align:left;text-decoration:none;text-i=
ndent:0px;text-transform:none;white-space:normal;word-spacing:0px">Even the=
n, will people be happy with the fact free functions now <i style=3D"border=
-bottom-color:rgb(34,34,34);border-bottom-style:none;border-bottom-width:0p=
x;border-left-color:rgb(34,34,34);border-left-style:none;border-left-width:=
0px;border-right-color:rgb(34,34,34);border-right-style:none;border-right-w=
idth:0px;border-top-color:rgb(34,34,34);border-top-style:none;border-top-wi=
dth:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;p=
adding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px">alway=
s</i> must be qualified in order to be "free"?=C2=A0</div><div st=
yle=3D"background-color:transparent;border-bottom-color:rgb(34,34,34);borde=
r-bottom-style:none;border-bottom-width:0px;border-left-color:rgb(34,34,34)=
;border-left-style:none;border-left-width:0px;border-right-color:rgb(34,34,=
34);border-right-style:none;border-right-width:0px;border-top-color:rgb(34,=
34,34);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-=
size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spac=
ing:normal;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0p=
x;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;tex=
t-align:left;text-decoration:none;text-indent:0px;text-transform:none;white=
-space:normal;word-spacing:0px"><br></div><div style=3D"background-color:tr=
ansparent;border-bottom-color:rgb(34,34,34);border-bottom-style:none;border=
-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-style:none;bo=
rder-left-width:0px;border-right-color:rgb(34,34,34);border-right-style:non=
e;border-right-width:0px;border-top-color:rgb(34,34,34);border-top-style:no=
ne;border-top-width:0px;color:rgb(34,34,34);font-size:13px;font-style:norma=
l;font-variant:normal;font-weight:400;letter-spacing:normal;margin-bottom:0=
px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;paddi=
ng-left:0px;padding-right:0px;padding-top:0px;text-align:left;text-decorati=
on:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing=
:0px"><br style=3D"background-color:transparent;background-image:none;backg=
round-repeat:repeat;border-bottom-color:rgb(34,34,34);border-bottom-style:n=
one;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-sty=
le:none;border-left-width:0px;border-right-color:rgb(34,34,34);border-right=
-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);border-to=
p-style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;min-he=
ight:auto;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px=
;min-width:0px;overflow:visible;overflow-x:visible;overflow-y:visible;paddi=
ng-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px"></div><di=
v style=3D"background-color:transparent;border-bottom-color:rgb(34,34,34);b=
order-bottom-style:none;border-bottom-width:0px;border-left-color:rgb(34,34=
,34);border-left-style:none;border-left-width:0px;border-right-color:rgb(34=
,34,34);border-right-style:none;border-right-width:0px;border-top-color:rgb=
(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,34,34);f=
ont-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-=
spacing:normal;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-to=
p:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px=
;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;w=
hite-space:normal;word-spacing:0px">The only way out in foreseeable<span st=
yle=3D"display:inline!important;float:none;background-color:transparent;col=
or:rgb(34,34,34);font-family:"Arial","Helvetica",sans-s=
erif;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;l=
etter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;t=
ext-transform:none;white-space:normal;word-spacing:0px"> future</span> (or =
probably ever) is an opt-in.</div></div></div></div></blockquote><div><br><=
/div><div>I have proposed an opt-in that would work further up the chain:</=
div><div><br></div><div><font face=3D"monospace, monospace">namespace foo {=
</font></div><div><font face=3D"monospace, monospace">=C2=A0 struct bar {</=
font></div><div><font face=3D"monospace, monospace">=C2=A0 =C2=A0 void baz(=
);</font></div><div><font face=3D"monospace, monospace">=C2=A0 =C2=A0 void =
baz2();</font></div><div><font face=3D"monospace, monospace">=C2=A0 };<br><=
/font></div><div><font face=3D"monospace, monospace"><br></font></div><div>=
<font face=3D"monospace, monospace">#if (__has_auto_free_functions)</font><=
/div><div><div><font face=3D"monospace, monospace">=C2=A0 using auto foo::b=
az;=C2=A0 // automatically synthesises ::foo::baz(foo::bar&) - this is =
an opt-in by the author of bar</font></div><div><font face=3D"monospace, mo=
nospace"><br></font></div><div><font face=3D"monospace, monospace">=C2=A0 u=
sing auto foo::*;=C2=A0 // automatically synthesises ::foo::baz(foo::bar&am=
p;)=C2=A0 and ::foo::baz2(foo::bar&) - this is also an opt-in by the au=
thor of bar</font></div></div><div><font face=3D"monospace, monospace">#end=
if=C2=A0=C2=A0</font></div><div><font face=3D"monospace, monospace">}</font=
></div><div><br></div><div>This would also allow newly modified libraries t=
o be compatible with older client codebases.</div><div><br></div><div>If ol=
der code-bases have free-function overloads that have the same name as memb=
ers with different effects, this is certainly an ambiguity of design that n=
eeds addressing. However, in the face of intransigence, a compiler switch w=
ould suffice:</div><div><br></div><div><font face=3D"monospace, monospace">=
$cc -std=3Dc++20 -fno-auto-free-functions nod.cpp=C2=A0 # __has_auto_free_f=
unctions is now false</font></div></div></div></blockquote><div><br></div><=
div><br></div><div>Not sure how is this different then what I described, <i=
>as long as</i> there is no hiding. The fact that the library author opts i=
n preemptively?=C2=A0</div><div>Sure one can do that, but then the user wil=
l have to deal with redefinitions if he is <font face=3D"courier new,monosp=
ace">using foo <font face=3D"arial,sans-serif">and has a function</font> ba=
z</font> and wants UCF</div></div></blockquote><div><br></div><div>Agreed, =
but I have indicated that he can avoid doing that by defining a compiler fl=
ag=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><br></di=
v><div>In any case, the point was, the opt in is not on the declaration (no=
t part of the class/function) and is not on the call site (the <font face=
=3D"courier new,monospace">.f() </font>alternative)</div></div></blockquote=
><div><br></div><div>Fully agree here.</div><div>=C2=A0</div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr"><div><br></div><div>It is in scope/TU. Ye=
s, it can be the library author that injects into the user TU by defining i=
t like that.</div><div><br></div><div>Much the same way we can expect a lib=
rary which extends its classes using free functions to let the user also us=
e these methods=C2=A0<br></div><div><font face=3D"courier new,monospace"></=
font><br></div><div><font face=3D"courier new,monospace">namespace lib {</f=
ont></div><div><font face=3D"courier new,monospace"></font><br></div><div><=
font face=3D"courier new,monospace">class Image{};</font></div><div><font f=
ace=3D"courier new,monospace"></font><br></div><div><font face=3D"courier n=
ew,monospace">void save(const Image&, String) {}</font></div><div><font=
face=3D"courier new,monospace"></font><br></div><div><font face=3D"courier=
new,monospace">class <span style=3D"text-align:left;color:rgb(34,34,34);te=
xt-transform:none;text-indent:0px;letter-spacing:normal;font-size:13px;font=
-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word=
-spacing:0px;display:inline!important;white-space:normal;float:none;backgro=
und-color:transparent">Image using=C2=A0</span></font></div><div><span styl=
e=3D"text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0p=
x;letter-spacing:normal;font-size:13px;font-style:normal;font-variant:norma=
l;font-weight:400;text-decoration:none;word-spacing:0px;display:inline!impo=
rtant;white-space:normal;float:none;background-color:transparent"><font fac=
e=3D"courier new,monospace">{=C2=A0</font></span></div><div><span style=3D"=
text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;let=
ter-spacing:normal;font-size:13px;font-style:normal;font-variant:normal;fon=
t-weight:400;text-decoration:none;word-spacing:0px;display:inline!important=
;white-space:normal;float:none;background-color:transparent"><font face=3D"=
courier new,monospace">=C2=A0 using <span style=3D"text-align:left;color:rg=
b(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;font-=
size:13px;font-style:normal;font-variant:normal;font-weight:400;text-decora=
tion:none;word-spacing:0px;display:inline!important;white-space:normal;floa=
t:none;background-color:transparent">save;</span></font></span></div><div><=
span style=3D"text-align:left;color:rgb(34,34,34);text-transform:none;text-=
indent:0px;letter-spacing:normal;font-size:13px;font-style:normal;font-vari=
ant:normal;font-weight:400;text-decoration:none;word-spacing:0px;display:in=
line!important;white-space:normal;float:none;background-color:transparent">=
<font face=3D"courier new,monospace">};</font></span></div><div><b></b><i><=
/i><u></u><sub></sub><sup></sup><strike></strike><font face=3D"courier new,=
monospace"></font><br></div><div><font face=3D"courier new,monospace">} //&=
lt; lib</font></div><div><br></div><div><font face=3D"courier new,monospace=
">// user</font></div><div><font face=3D"courier new,monospace"><br></font>=
</div><div><font face=3D"courier new,monospace">using lib::save;</font></di=
v><div><span><br></span></div><div><span><br></span></div><div><div><span><=
font face=3D"courier new,monospace">img.save("path");=C2=A0</font=
></span></div><div><span><font face=3D"courier new,monospace"></font><i></i=
><br></span></div><div><br></div>And the user user can add his save methods=
as overloads in the same way. =C2=A0<br></div><div><font face=3D"courier n=
ew,monospace">=C2=A0</font></div><blockquote class=3D"gmail_quote" style=3D=
"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><d=
iv dir=3D"ltr"><div class=3D"gmail_quote"><div><font face=3D"courier new,mo=
nospace"></font><br></div><div><br><br></div><div>=C2=A0</div><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;=
padding-left:1ex"><div dir=3D"ltr"><div><div><div style=3D"background-color=
:transparent;border-bottom-color:rgb(34,34,34);border-bottom-style:none;bor=
der-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-style:none=
;border-left-width:0px;border-right-color:rgb(34,34,34);border-right-style:=
none;border-right-width:0px;border-top-color:rgb(34,34,34);border-top-style=
:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;font-style:no=
rmal;font-variant:normal;font-weight:400;letter-spacing:normal;margin-botto=
m:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;pa=
dding-left:0px;padding-right:0px;padding-top:0px;text-align:left;text-decor=
ation:none;text-indent:0px;text-transform:none;white-space:normal;word-spac=
ing:0px"><br style=3D"background-color:transparent;background-image:none;ba=
ckground-repeat:repeat;border-bottom-color:rgb(34,34,34);border-bottom-styl=
e:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-=
style:none;border-left-width:0px;border-right-color:rgb(34,34,34);border-ri=
ght-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);border=
-top-style:none;border-top-width:0px;color:rgb(34,34,34);font-size:13px;min=
-height:auto;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:=
0px;min-width:0px;overflow:visible;overflow-x:visible;overflow-y:visible;pa=
dding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px"></div>=
<div style=3D"background-color:transparent;border-bottom-color:rgb(34,34,34=
);border-bottom-style:none;border-bottom-width:0px;border-left-color:rgb(34=
,34,34);border-left-style:none;border-left-width:0px;border-right-color:rgb=
(34,34,34);border-right-style:none;border-right-width:0px;border-top-color:=
rgb(34,34,34);border-top-style:none;border-top-width:0px;color:rgb(34,34,34=
);font-size:13px;font-style:normal;font-variant:normal;font-weight:400;lett=
er-spacing:normal;margin-bottom:0px;margin-left:0px;margin-right:0px;margin=
-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:=
0px;text-align:left;text-decoration:none;text-indent:0px;text-transform:non=
e;white-space:normal;word-spacing:0px"><br style=3D"border-bottom-color:rgb=
(34,34,34);border-bottom-style:none;border-bottom-width:0px;border-left-col=
or:rgb(34,34,34);border-left-style:none;border-left-width:0px;border-right-=
color:rgb(34,34,34);border-right-style:none;border-right-width:0px;border-t=
op-color:rgb(34,34,34);border-top-style:none;border-top-width:0px;margin-bo=
ttom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px=
;padding-left:0px;padding-right:0px;padding-top:0px"></div></div><div>=C2=
=A0</div><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br></=
div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0;ma=
rgin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"lt=
r"><div class=3D"gmail_quote"><div><br></div><div>This is why we can't =
have nice things. The ridiculous idea that everything in a new version of X=
must be compatible with every previous version of X has been the bane of t=
he computing industry since the demon-spawn of MSDOS.</div><div><br></div><=
div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><br></=
div><div>What we want is for local <font face=3D"courier new,monospace">siz=
e</font> <i>not to</i> hide. If the user wants to hide he should use a qual=
ified called, so to be explicit.=C2=A0</div><div><br></div><div>This will m=
atch current behavior.=C2=A0</div><div><br></div><div>Currently, if the use=
r wants to hide, he must use a free standing function which will force him =
to be explicit on the call site by changing the call syntax</div><div><font=
face=3D"courier new,monospace"><br></font></div><div><font face=3D"arial,s=
ans-serif">from</font><font face=3D"courier new,monospace"> f.size() <font =
face=3D"arial,sans-serif">to</font> size(f)</font></div><div><font face=3D"=
courier new,monospace"></font><br></div><div>In the unified world, if the u=
ser wants to hide, he must again change the call syntax, this time</div><di=
v><br></div><div>from <font face=3D"courier new,monospace">size(f) </font><=
font face=3D"arial,sans-serif">to</font><font face=3D"courier new,monospace=
"> ::size(f)</font></div><div><font face=3D"courier new,monospace"></font>=
=C2=A0</div><div><br></div><blockquote class=3D"gmail_quote" style=3D"margi=
n:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=
=3D"ltr"><div class=3D"gmail_quote"><div><br></div><div><br></div><div>=C2=
=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;borde=
r-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><font face=3D=
"courier new,monospace"><br></font></div><div><font face=3D"arial,sans-seri=
f">Now, if someone adds=C2=A0</font></div><div><font face=3D"courier new,mo=
nospace"><font face=3D"arial,sans-serif"></font><br></font></div><div><font=
face=3D"courier new,monospace"><span style=3D"text-align:left;text-transfo=
rm:none;text-indent:0px;letter-spacing:normal;font-family:courier new,monos=
pace;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;t=
ext-decoration:none;word-spacing:0px;display:inline!important;white-space:n=
ormal;float:none;background-color:transparent">void func(C&, size_t);</=
span></font></div><div><font face=3D"courier new,monospace"><b></b><i></i><=
u></u><sub></sub><sup></sup><strike></strike><br></font></div><div><font fa=
ce=3D"arial,sans-serif">By </font><font face=3D"arial,sans-serif"><a href=
=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0301r0.html" r=
el=3D"nofollow" target=3D"_blank">the current rules</a> this will <i>hide</=
i> the member function, but now the condition is an error as the call to fu=
nc is ambiguous.</font></div><div><font face=3D"arial,sans-serif"><br></fon=
t></div><div><font face=3D"arial,sans-serif"><div>(Needless to say, the abo=
ve could be used in the future not to <i>enable</i>=C2=A0<span>UFCS, but to=
<i style=3D"border-bottom-color:rgb(34,34,34);border-bottom-style:none;bor=
der-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-style:none=
;border-left-width:0px;border-right-color:rgb(34,34,34);border-right-style:=
none;border-right-width:0px;border-top-color:rgb(34,34,34);border-top-style=
:none;border-top-width:0px;margin-bottom:0px;margin-left:0px;margin-right:0=
px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;pad=
ding-top:0px">override</i> the rules.)</span><br></div></font></div><div><f=
ont face=3D"arial,sans-serif"><b></b><i></i><u></u><sub></sub><sup></sup><s=
trike></strike><br></font></div><div>In n4586 it says <i>"...Some peop=
le wanted additional opt-in mechanisms to enable the new behavior, which wa=
s discussed in great detail, but rejected"</i><i><br></i></div><div>Wh=
at were those opt-ins? Was something like this considered, or the opt-ins w=
ere on the declaration side (be it on the member/class or function) or on t=
he call site?</div><div><br></div><div><br></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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</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/7464c9ca-3079-4619-9db0-c993dba7a8b6%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/7464c9ca-3079-4619-9db0-c993dba7a8b6%40isocpp.org</a>.<br>
</blockquote></div></div>
</blockquote></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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</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/9e1318cb-4f04-4e26-a630-ce4b41363d19%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/9e1318cb-4f04-4e26-a630-ce4b41363d19%40isocpp.org</a>.<br>
</blockquote></div></div>
</blockquote></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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</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/1eb57a3b-836f-4a6b-8842-b2196293d30f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/1eb57a3b-836f-4a6b-8842-b2196293d30f%40isocpp.org</a>.<br>
</blockquote></div></div>
</blockquote></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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/19e44df2-5580-4c2c-9221-c82357f3b682%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/19e44df2-5580-=
4c2c-9221-c82357f3b682%40isocpp.org</a>.<br>
</blockquote></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/CALvx3hbbfd7-soh16t5fF02OuFAraL4jdcKK=
owV840N-kgxz_w%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALvx3hbbfd7-soh1=
6t5fF02OuFAraL4jdcKKowV840N-kgxz_w%40mail.gmail.com</a>.<br />
--000000000000de508e0573166c4d--
.
Author: Hyman Rosen <hyman.rosen@gmail.com>
Date: Fri, 10 Aug 2018 12:04:29 -0400
Raw View
--000000000000c55c5c057316e6f8
Content-Type: text/plain; charset="UTF-8"
On Fri, Aug 10, 2018 at 11:30 AM Richard Hodges <hodges.r@gmail.com> wrote:
> Agreed, but I have indicated that he can avoid doing that by defining a
> compiler flag
>
Note that some large programming shops compile code for many platforms, and
the
build system may be maintained by a group separate from the programmers.
Requiring
specialized compilation flags for individual source files is difficult in
such an environment,
and in any case wouldn't be viable for header files, since there could then
be potential
conflicting requirements on source files that include them.
Creating subsets and dialects of C++ through compiler flags has, I believe,
served the
language and the community badly. We should not be making things worse.
--
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/CAHSYqdbcb7e8YVvq0KkQk6DjJXckuqZmsdhutDi4xcmrb%3DoznA%40mail.gmail.com.
--000000000000c55c5c057316e6f8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri, Aug 10=
, 2018 at 11:30 AM Richard Hodges <<a href=3D"mailto:hodges.r@gmail.com"=
>hodges.r@gmail.com</a>> wrote:</div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div=
dir=3D"ltr"><div class=3D"gmail_quote"><div>Agreed, but I have indicated t=
hat he can avoid doing that by defining a compiler flag=C2=A0</div></div></=
div></blockquote><div><br>Note that some large programming shops compile co=
de for many platforms, and the<br>build system may be maintained by a group=
separate from the programmers.=C2=A0 Requiring<br>specialized compilation =
flags for individual source files is difficult in such an environment,<br>a=
nd in any case wouldn't be viable for header files, since there could t=
hen be potential<br>conflicting requirements on source files that include t=
hem.<br><br>Creating subsets and dialects of C++ through compiler flags has=
, I believe, served the<br>language and the community badly.=C2=A0 We shoul=
d not be making things worse.</div></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/CAHSYqdbcb7e8YVvq0KkQk6DjJXckuqZmsdhu=
tDi4xcmrb%3DoznA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAHSYqdbcb7e8YV=
vq0KkQk6DjJXckuqZmsdhutDi4xcmrb%3DoznA%40mail.gmail.com</a>.<br />
--000000000000c55c5c057316e6f8--
.
Author: Richard Hodges <hodges.r@gmail.com>
Date: Fri, 10 Aug 2018 18:23:51 +0200
Raw View
--000000000000ff13280573172b38
Content-Type: text/plain; charset="UTF-8"
On Fri, 10 Aug 2018 at 18:04, Hyman Rosen <hyman.rosen@gmail.com> wrote:
> On Fri, Aug 10, 2018 at 11:30 AM Richard Hodges <hodges.r@gmail.com>
> wrote:
>
>> Agreed, but I have indicated that he can avoid doing that by defining a
>> compiler flag
>>
>
> Note that some large programming shops compile code for many platforms,
> and the
> build system may be maintained by a group separate from the programmers.
> Requiring
> specialized compilation flags for individual source files is difficult in
> such an environment,
> and in any case wouldn't be viable for header files, since there could
> then be potential
> conflicting requirements on source files that include them.
>
> Creating subsets and dialects of C++ through compiler flags has, I
> believe, served the
> language and the community badly. We should not be making things worse.
>
I mention it as a band-aid fix for laggards.
What serves the community best is everyone being willing to move forward.
I would argue that pandering to stay-behinds is what serves the wider
community worst. It guarantees that we all stay firmly in the stone age.
> --
> 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/CAHSYqdbcb7e8YVvq0KkQk6DjJXckuqZmsdhutDi4xcmrb%3DoznA%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAHSYqdbcb7e8YVvq0KkQk6DjJXckuqZmsdhutDi4xcmrb%3DoznA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
--
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/CALvx3hYVSnu2kkFrKeO2RdCY2mjqLXXnh%3DtGfVZd3nZg%3DUsntg%40mail.gmail.com.
--000000000000ff13280573172b38
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri=
, 10 Aug 2018 at 18:04, Hyman Rosen <<a href=3D"mailto:hyman.rosen@gmail=
..com">hyman.rosen@gmail.com</a>> wrote:<br></div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le=
ft:1ex"><div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri=
, Aug 10, 2018 at 11:30 AM Richard Hodges <<a href=3D"mailto:hodges.r@gm=
ail.com" target=3D"_blank">hodges.r@gmail.com</a>> wrote:</div><blockquo=
te class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc so=
lid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_quote"><div>Agre=
ed, but I have indicated that he can avoid doing that by defining a compile=
r flag=C2=A0</div></div></div></blockquote><div><br>Note that some large pr=
ogramming shops compile code for many platforms, and the<br>build system ma=
y be maintained by a group separate from the programmers.=C2=A0 Requiring<b=
r>specialized compilation flags for individual source files is difficult in=
such an environment,<br>and in any case wouldn't be viable for header =
files, since there could then be potential<br>conflicting requirements on s=
ource files that include them.<br><br>Creating subsets and dialects of C++ =
through compiler flags has, I believe, served the<br>language and the commu=
nity badly.=C2=A0 We should not be making things worse.</div></div></div></=
blockquote><div><br></div><div>I mention it as a band-aid fix for laggards.=
=C2=A0</div><div><br></div><div>What serves the community best is everyone =
being willing to move forward.</div><div><br></div><div>I would argue that =
pandering to stay-behinds is what serves the wider community worst. It guar=
antees that we all stay firmly in the stone age.</div><div>=C2=A0</div><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex">
<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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/CAHSYqdbcb7e8YVvq0KkQk6DjJXckuqZmsdhu=
tDi4xcmrb%3DoznA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r" target=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-pro=
posals/CAHSYqdbcb7e8YVvq0KkQk6DjJXckuqZmsdhutDi4xcmrb%3DoznA%40mail.gmail.c=
om</a>.<br>
</blockquote></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/CALvx3hYVSnu2kkFrKeO2RdCY2mjqLXXnh%3D=
tGfVZd3nZg%3DUsntg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALvx3hYVSnu2=
kkFrKeO2RdCY2mjqLXXnh%3DtGfVZd3nZg%3DUsntg%40mail.gmail.com</a>.<br />
--000000000000ff13280573172b38--
.
Author: Ryan McDougall <mcdougall.ryan@gmail.com>
Date: Mon, 13 Aug 2018 12:35:41 -0700
Raw View
--000000000000a2b6100573563369
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Fri, Aug 10, 2018 at 3:35 AM Richard Hodges <hodges.r@gmail.com> wrote:
>
>
> On Fri, 10 Aug 2018 at 09:01, <mihailnajdenov@gmail.com> wrote:
>
>>
>>
>> On Thursday, August 9, 2018 at 11:47:08 AM UTC+3, Richard Hodges wrote:
>>>
>>>
>>>
>>> On Thu, 9 Aug 2018 at 10:05, <mihailn...@gmail.com> wrote:
>>>
>>>>
>>>>
>>>> On Wednesday, August 8, 2018 at 4:41:58 PM UTC+3, Olanrewaju Adetula
>>>> wrote:
>>>>>
>>>>> If by defining member function for example, an associated free
>>>>> function can be synthesized by the compiler or vice-versa, then we ca=
n call
>>>>> such function using either syntax.
>>>>>
>>>>>
>>>> I see, note however that if this is enabled it will be a breaking
>>>> change.
>>>>
>>>>
>>>>> On Mon, Aug 6, 2018 at 4:26 PM, <mihailn...@gmail.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Monday, August 6, 2018 at 6:14:30 PM UTC+3, Olanrewaju Adetula
>>>>>> wrote:
>>>>>>>
>>>>>>> Of course going full UCS introduces the mirror set of
>>>>>>>> vulnerability-to-change problems. If we can call members using fre=
e
>>>>>>>> standing, then these are either in competition or there is a prefe=
rred
>>>>>>>> call.
>>>>>>>> If there is a completion there is potential code break or code
>>>>>>>> change if suddenly the member is the better match, if there is a p=
referred
>>>>>>>> call, there is a potential silent code change.
>>>>>>>
>>>>>>> Or the type author can define one and the language synthesizes the
>>>>>>> other via opt-in. With that, it won't matter anymore which syntax i=
s used
>>>>>>> to invoke the function and any attempt to define any other will err=
or as a
>>>>>>> result of redeclaration.
>>>>>>>
>>>>>>>
>>>>>> Can you elaborate?
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> On Mon, Aug 6, 2018 at 4:01 PM, <mihailn...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Forgot to mention the elephant in the room - this does not solve
>>>>>>>> the fundamental issue, how do we define concept requirements for a=
class,
>>>>>>>> is it in terms of member functions or in terms of free-standing on=
es.
>>>>>>>>
>>>>>>>> However, this can be a stepping stone towards UCS - after a period
>>>>>>>> of time we could make one of the two options the default.
>>>>>>>> It will be a non-breaking change, after which the syntax will be
>>>>>>>> used to let the user override the default behavior.
>>>>>>>>
>>>>>>>> Of course going full UCS introduces the mirror set of
>>>>>>>> vulnerability-to-change problems. If we can call members using fre=
e
>>>>>>>> standing, then these are either in competition or there is a prefe=
rred
>>>>>>>> call.
>>>>>>>> If there is a completion there is potential code break or code
>>>>>>>> change if suddenly the member is the better match, if there is a p=
referred
>>>>>>>> call, there is a potential silent code change.
>>>>>>>>
>>>>>>>> Silent code change is not so silent as it is not by the class
>>>>>>>> author but by the client code, introducing a free function can
>>>>>>>> *hide* a class member function, called as free function.
>>>>>>>> Seems to me this is unavoidable, as other options, are either
>>>>>>>> breaking (overloading) or still code changing (pick member always)=
and
>>>>>>>> almost certainly more surprising, yet hides like this are somethin=
g new.
>>>>>>>>
>>>>>>>>
>>>>>>>> Comments are welcome, I might write a proposal to give this featur=
e
>>>>>>>> another go.
>>>>>>>> I personally can't decide for myself if I want full UFC or just a
>>>>>>>> way to call functions using member access syntax.
>>>>>>>>
>>>>>>>> --
>>>>>>>> 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-proposal...@isocpp.org.
>>>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>>>> To view this discussion on the web visit
>>>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd460=
620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org
>>>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/dd46=
0620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org?utm_medium=3Demail&utm_source=
=3Dfooter>
>>>>>>>> .
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>> 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-proposal...@isocpp.org.
>>>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>>>> To view this discussion on the web visit
>>>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc99=
d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org
>>>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/734bc9=
9d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org?utm_medium=3Demail&utm_source=
=3Dfooter>
>>>>>> .
>>>>>>
>>>>>
>>>>>
>>>>
>>>> In any case, I investigated the UFCS situation further and, to my
>>>> surprise, it turned out, in its last stages only f(x,y) calling x.f(y)=
was
>>>> considered.
>>>> I wonder, were all the people asking for UFCS at CppConn last year eve=
n
>>>> aware of that! One can read more here
>>>> <https://isocpp.org/blog/2016/02/a-bit-of-background-for-the-unified-c=
all-proposal>
>>>> and here
>>>> <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/n4586.pdf>
>>>> (n4586, search down for "unified").
>>>>
>>>> Aside from the fact literally no one has ever requested f(x,y) calling
>>>> x.f(y), for obvious reasons, and the only people to whom it is useful =
are
>>>> library writers, I am not surprised at all that even that was not acce=
pted.
>>>> Hell, even Bjarne says
>>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0131r0.pdf> =
*"People
>>>> who fear side effects from generalization might then prefer x.f(y) [to
>>>> generalize] because it is more restrictive".*
>>>>
>>>> Indeed, the possibility tor trivially hide a class member function, is
>>>> not pretty indeed.
>>>>
>>>>
>>>> With all that said, I still believe there is hope. In n4586, it is not=
ed*
>>>> "Spicer liked the goal of the proposal, but wanted opt-in which would =
then
>>>> consider members and non-members equally in an overload set."*
>>>> and *"Yasskin said he=E2=80=99d feel more comfortable being able to se=
e the
>>>> feature in use for a long period of time, and would feel more comforta=
ble
>>>> seeing it in a TS. "*
>>>>
>>>> These are doable. We introduce UFCS as a scoped, user-side opt-in whic=
h
>>>> will bring both free and member functions into one overloading set.
>>>>
>>>> struct C
>>>> {
>>>> void func(double) {}
>>>> };
>>>>
>>>> // user
>>>>
>>>> void f(C& c)
>>>> {
>>>> using C::func; //< bring func into the overloading set
>>>>
>>>> func(c, -1);
>>>> }
>>>>
>>>
>>>
>>
>>> This makes a lot of sense. Perhaps there is a way to provide
>>> free-function overloads which can be replaced by specific free function=
s,
>>> without any concerns about backward compatibility:
>>>
>>> struct Foo {
>>> bool empty() const;
>>> std::size_t size() const;
>>> };
>>>
>>> using auto Foo::*; // bring all public member functions of Foo into
>>> the outer namespace as free functions
>>>
>>> // but with lower 'weight' than an actual free function declaration:
>>> std::size_t size(Foo const& f); // auto-synthesised Foo::size(Foo
>>> const&) is now hidden in preference to ::size(Foo const&)
>>>
>>
>>
>> Richard, this is the behavior suggested under UFCS, but was rejected.
>> Here is a great example why
>> <https://www.reddit.com/r/cpp/comments/4d19gk/awesome_wg21_paper_about_a=
lternative_unified_call/d1uqkpz>
>> .
>>
>
> You mean we lost the chance to gain an important, amazing language featur=
e
> for the sake of one unimaginative luddite who has a code base so ancient
> that he's unlikely to ever actually switch on the -std=3Dc++20 feature at=
all?
>
As a reader of this list I don't appreciate personal attacks on dedicated
committee members, or really anyone else. Nothing about this sentence is
correct.
This is why we can't have nice things. The ridiculous idea that everything
> in a new version of X must be compatible with every previous version of X
> has been the bane of the computing industry since the demon-spawn of MSDO=
S.
>
>
>
>>
>> What we want is for local size *not to* hide. If the user wants to hide
>> he should use a qualified called, so to be explicit.
>>
>> This will match current behavior.
>>
>> Currently, if the user wants to hide, he must use a free standing
>> function which will force him to be explicit on the call site by changin=
g
>> the call syntax
>>
>> from f.size() to size(f)
>>
>> In the unified world, if the user wants to hide, he must again change th=
e
>> call syntax, this time
>>
>> from size(f) to ::size(f)
>>
>>
>>
>>>
>>>
>>>
>>>>
>>>> Now, if someone adds
>>>>
>>>> void func(C&, size_t);
>>>>
>>>> By the current rules
>>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0301r0.html>
>>>> this will *hide* the member function, but now the condition is an
>>>> error as the call to func is ambiguous.
>>>>
>>>> (Needless to say, the above could be used in the future not to *enable=
*
>>>> UFCS, but to *override* the rules.)
>>>>
>>>> In n4586 it says *"...Some people wanted additional opt-in mechanisms
>>>> to enable the new behavior, which was discussed in great detail, but
>>>> rejected"*
>>>> What were those opt-ins? Was something like this considered, or the
>>>> opt-ins were on the declaration side (be it on the member/class or
>>>> function) or on the call site?
>>>>
>>>>
>>>> --
>>>> 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-proposal...@isocpp.org.
>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca-=
3079-4619-9db0-c993dba7a8b6%40isocpp.org
>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7464c9ca=
-3079-4619-9db0-c993dba7a8b6%40isocpp.org?utm_medium=3Demail&utm_source=3Df=
ooter>
>>>> .
>>>>
>>> --
>> You received this message because you are subscribed to the Google Group=
s
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n
>> 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/9e1318cb-4f=
04-4e26-a630-ce4b41363d19%40isocpp.org
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4=
f04-4e26-a630-ce4b41363d19%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoo=
ter>
>> .
>>
> --
> 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/CALvx3hZur%3=
D15q5xo7pfk5mZj35WQW_32bYWHwzNiez%2BYgQ%2B7NA%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALvx3hZur%=
3D15q5xo7pfk5mZj35WQW_32bYWHwzNiez%2BYgQ%2B7NA%40mail.gmail.com?utm_medium=
=3Demail&utm_source=3Dfooter>
> .
>
--=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/CAHn%2BA5Med52t%2BkUPqJgtAB_LTtD%3DtdC0bMFWbTuHC=
de%3D02ZtfQ%40mail.gmail.com.
--000000000000a2b6100573563369
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri=
, Aug 10, 2018 at 3:35 AM Richard Hodges <<a href=3D"mailto:hodges.r@gma=
il.com">hodges.r@gmail.com</a>> wrote:<br></div><blockquote class=3D"gma=
il_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-lef=
t:1ex"><div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr"=
>On Fri, 10 Aug 2018 at 09:01, <<a href=3D"mailto:mihailnajdenov@gmail.c=
om" target=3D"_blank">mihailnajdenov@gmail.com</a>> wrote:<br></div><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><div dir=3D"ltr"><br><br>On Thursday, August 9, =
2018 at 11:47:08 AM UTC+3, Richard Hodges wrote:<blockquote class=3D"gmail_=
quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;paddi=
ng-left:1ex"><div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=
=3D"ltr">On Thu, 9 Aug 2018 at 10:05, <<a rel=3D"nofollow">mihailn...@gm=
ail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"=
margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"=
ltr"><br><br>On Wednesday, August 8, 2018 at 4:41:58 PM UTC+3, Olanrewaju A=
detula wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-lef=
t:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">If by=
defining member function for example, an associated free function can be s=
ynthesized by the compiler or vice-versa, then we can call such function us=
ing either syntax.</div><div><br></div></blockquote><div><br></div><div>I s=
ee, note however that if this is enabled it will be a breaking change.</div=
><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0;margi=
n-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class=
=3D"gmail_quote">On Mon, Aug 6, 2018 at 4:26 PM, <span dir=3D"ltr"><<a =
rel=3D"nofollow">mihailn...@gmail.com</a>></span> wrote:<br><blockquote =
class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid=
;padding-left:1ex"><div dir=3D"ltr"><span><br><br>On Monday, August 6, 2018=
at 6:14:30 PM UTC+3, Olanrewaju Adetula wrote:<blockquote class=3D"gmail_q=
uote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;paddin=
g-left:1ex"><div dir=3D"ltr">
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0<br>If there is a completion there is potentia=
l code break or code change if suddenly the member is the better match, if =
there is a preferred call, there is a potential silent code change.</blockq=
uote>
Or the type author can define one and the language synthesizes the other vi=
a opt-in. With that, it won't matter anymore which syntax is used to in=
voke the function and any attempt to define any other will error as a resul=
t of redeclaration.<div><br></div></div></blockquote><div><br></div></span>=
<div>Can you elaborate?=C2=A0</div><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr"><div></div></div><div><br><div class=3D"g=
mail_quote"><span>On Mon, Aug 6, 2018 at 4:01 PM, <span dir=3D"ltr"><<a=
rel=3D"nofollow">mihailn...@gmail.com</a>></span> wrote:<br></span><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><span><div dir=3D"ltr"><div>Forgot to mention th=
e elephant in the room - this does not solve the fundamental issue, how do =
we define concept requirements for a class, is it in terms of member functi=
ons or in terms of free-standing ones.</div><div><br></div><div>However, th=
is can be a stepping stone towards UCS - after a period of time we could ma=
ke one of the two options the default.=C2=A0</div><div><span style=3D"displ=
ay:inline!important;float:none;background-color:transparent;color:rgb(34,34=
,34);font-family:"Arial","Helvetica",sans-serif;font-si=
ze:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacin=
g:normal;text-align:left;text-decoration:none;text-indent:0px;text-transfor=
m:none;white-space:normal;word-spacing:0px">It will be a non-breaking chang=
e, a</span>fter which the syntax will be used to let the user override the =
default behavior. =C2=A0</div><div><br></div><div>Of course going full UCS =
introduces the mirror set of vulnerability-to-change problems. If we can ca=
ll members using free standing, then these are either in competition or the=
re is a preferred call.=C2=A0</div><div>If there is a completion there is p=
otential code break or code change if suddenly the member is the better mat=
ch, if there is a preferred call, there is a potential silent code change.<=
/div><div><br></div><div>Silent code change is not so silent as it is not b=
y the class author but by the client code, introducing a free function can =
<i>hide</i> a class member function, called as free function.</div><div>See=
ms to me this is unavoidable, as other options, are either breaking (overlo=
ading) or still code changing (pick member always) and almost certainly mor=
e surprising, yet hides like this are something new.</div><div><br></div><d=
iv><br></div><div>Comments are welcome, I might write a proposal to give th=
is feature another go.</div><div>I personally can't decide for myself i=
f I want full UFC or just a way to call functions using member access synta=
x.</div></div></span><span><font color=3D"#888888"><span>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br></span>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<span><br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/dd460620-2bc7-47fd-8e39-68a85003d9be%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/dd460620-2bc7-47fd-8e39-68a85003d9be%40isocpp.org</a>.<br>
</span></font></span></blockquote></div><br></div>
</blockquote></div><span>
<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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</a>.<br></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/734bc99d-2aa3-4af6-b0b6-fb3ec3452d17%40isocpp.org</a>.<br>
</blockquote></div><br></div></blockquote><div><br></div><div><br></div><di=
v>In any case, I investigated the UFCS situation further and, to my surpris=
e, it turned out, in its last stages only f(x,y) calling x.f(y) was conside=
red.</div><div>I wonder, were all the people asking for UFCS at CppConn las=
t year even aware of that! One can read more <a href=3D"https://isocpp.org/=
blog/2016/02/a-bit-of-background-for-the-unified-call-proposal" rel=3D"nofo=
llow" target=3D"_blank">here</a> and <a href=3D"http://www.open-std.org/JTC=
1/SC22/WG21/docs/papers/2016/n4586.pdf" rel=3D"nofollow" target=3D"_blank">=
here</a> (n4586, search down for "unified").</div><div><br></div>=
<div>Aside from the fact literally no one has ever requested <span style=3D=
"display:inline!important;float:none;background-color:transparent;color:rgb=
(34,34,34);font-family:"Arial","Helvetica",sans-serif;f=
ont-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-=
spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-tr=
ansform:none;white-space:normal;word-spacing:0px">f(x,y) calling x.f(y), fo=
r obvious reasons, and the only people to whom it is useful are library wri=
ters, I am not surprised at all that even that was not accepted.</span></di=
v><div><span style=3D"display:inline!important;float:none;background-color:=
transparent;color:rgb(34,34,34);font-family:"Arial","Helveti=
ca",sans-serif;font-size:13px;font-style:normal;font-variant:normal;fo=
nt-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;te=
xt-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Hell=
, even Bjarne <a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers=
/2015/p0131r0.pdf" rel=3D"nofollow" target=3D"_blank">says</a> </span><span=
style=3D"text-align:left;color:rgb(34,34,34);text-transform:none;text-inde=
nt:0px;letter-spacing:normal;font-family:"Arial","Helvetica&=
quot;,sans-serif;font-size:13px;font-variant:normal;font-weight:400;text-de=
coration:none;word-spacing:0px;display:inline!important;white-space:normal;=
float:none;background-color:transparent"><i>"People who fear side effe=
cts from generalization might then prefer x.f(y)<span style=3D"text-align:l=
eft;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:=
normal;font-family:"Arial","Helvetica",sans-serif;font-=
size:13px;font-variant:normal;font-weight:400;text-decoration:none;word-spa=
cing:0px;display:inline!important;white-space:normal;float:none;background-=
color:transparent"> [to generalize]</span> because it is more restrictive&q=
uot;.</i><br></span></div><div><br></div><div>Indeed, the possibility tor t=
rivially hide a class member function, is not pretty indeed.=C2=A0</div><di=
v><br></div><div><br></div><div>With all that said, I still believe there i=
s hope. In n4586, it is noted<i> "Spicer liked the goal of the proposa=
l, but wanted opt-in which would then consider members and non-members equa=
lly in an overload set."</i></div><div>and <i>"Yasskin said he=E2=
=80=99d feel more comfortable being able to see the feature in use for a lo=
ng period of time, and would feel more comfortable seeing it in a TS. "=
;</i></div><div><i><br></i></div><div>These are doable. We introduce UFCS a=
s a scoped, user-side opt-in which will bring both free and member function=
s into one overloading set.</div><div><br></div><div><font face=3D"courier =
new,monospace">struct C</font></div><div><font face=3D"courier new,monospac=
e">{</font></div><div><font face=3D"courier new,monospace">=C2=A0 void func=
(double) {}</font></div><div><font face=3D"courier new,monospace">};</font>=
</div><div><font face=3D"courier new,monospace"></font><br></div><div><font=
face=3D"courier new,monospace">// user</font></div><div><font face=3D"cour=
ier new,monospace"></font><br></div><div><font face=3D"courier new,monospac=
e">void f(C& c)</font></div><div><font face=3D"courier new,monospace">{=
</font></div><div><font face=3D"courier new,monospace">=C2=A0 using C::func=
; //< bring func into the overloading set=C2=A0</font></div><div><font f=
ace=3D"courier new,monospace"></font><br></div><div><font face=3D"courier n=
ew,monospace">=C2=A0 func(c, -1);</font></div><div><font face=3D"courier ne=
w,monospace">}</font></div></div></blockquote><div><br></div></div></div></=
blockquote><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div di=
r=3D"ltr"><div class=3D"gmail_quote"><div></div><div>This makes a lot of se=
nse. Perhaps there is a way to provide free-function overloads which can be=
replaced by specific free functions, without any concerns about backward c=
ompatibility:</div><div><br></div><div><font face=3D"monospace, monospace">=
struct Foo {</font></div><div><font face=3D"monospace, monospace">=C2=A0 bo=
ol empty() const;</font></div><div><font face=3D"monospace, monospace">=C2=
=A0 std::size_t size() const;</font></div><div><font face=3D"monospace, mon=
ospace">};</font></div><div><font face=3D"monospace, monospace"><br></font>=
</div><div><font face=3D"monospace, monospace">using auto Foo::*;=C2=A0 =C2=
=A0// bring all public member functions of Foo into the outer namespace as =
free functions</font></div><div><font face=3D"monospace, monospace"><br></f=
ont></div><div><font face=3D"monospace, monospace">// but with lower 'w=
eight' than an actual free function declaration:</font></div><div><font=
face=3D"monospace, monospace">std::size_t size(Foo const& f);=C2=A0 =
=C2=A0 // auto-synthesised Foo::size(Foo const&) is now hidden in prefe=
rence to ::size(Foo const&)</font></div></div></div></blockquote><div><=
br></div><div><br></div><div>Richard, this is the behavior suggested under =
UFCS, but was rejected. Here is <a href=3D"https://www.reddit.com/r/cpp/com=
ments/4d19gk/awesome_wg21_paper_about_alternative_unified_call/d1uqkpz" tar=
get=3D"_blank">a great example why</a><font color=3D"#004000">.</font> =C2=
=A0</div></div></blockquote><div><br></div><div>You mean we lost the chance=
to gain an important, amazing language feature for the sake of one unimagi=
native luddite who has a code base so ancient that he's unlikely to eve=
r actually switch on the -std=3Dc++20 feature at all?</div></div></div></bl=
ockquote><div><br></div><div>As a reader of this list I don't appreciat=
e personal attacks on dedicated committee members, or really anyone else. N=
othing about this sentence is correct.</div><div><br></div><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pad=
ding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_quote"><div>This is why=
we can't have nice things. The ridiculous idea that everything in a ne=
w version of X must be compatible with every previous version of X has been=
the bane of the computing industry since the demon-spawn of MSDOS.</div><d=
iv><br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"lt=
r"><div><br></div><div>What we want is for local <font face=3D"courier new,=
monospace">size</font> <i>not to</i> hide. If the user wants to hide he sho=
uld use a qualified called, so to be explicit.=C2=A0</div><div><br></div><d=
iv>This will match current behavior.=C2=A0</div><div><br></div><div>Current=
ly, if the user wants to hide, he must use a free standing function which w=
ill force him to be explicit on the call site by changing the call syntax</=
div><div><font face=3D"courier new,monospace"><br></font></div><div><font f=
ace=3D"arial,sans-serif">from</font><font face=3D"courier new,monospace"> f=
..size() <font face=3D"arial,sans-serif">to</font> size(f)</font></div><div>=
<font face=3D"courier new,monospace"></font><br></div><div>In the unified w=
orld, if the user wants to hide, he must again change the call syntax, this=
time</div><div><br></div><div>from <font face=3D"courier new,monospace">si=
ze(f) </font><font face=3D"arial,sans-serif">to</font><font face=3D"courier=
new,monospace"> ::size(f)</font></div><div><font face=3D"courier new,monos=
pace"></font>=C2=A0</div><div><br></div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:=
1ex"><div dir=3D"ltr"><div class=3D"gmail_quote"><div><br></div><div><br></=
div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 =
0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><=
font face=3D"courier new,monospace"><br></font></div><div><font face=3D"ari=
al,sans-serif">Now, if someone adds=C2=A0</font></div><div><font face=3D"co=
urier new,monospace"><font face=3D"arial,sans-serif"></font><br></font></di=
v><div><font face=3D"courier new,monospace"><span style=3D"text-align:left;=
text-transform:none;text-indent:0px;letter-spacing:normal;font-family:couri=
er new,monospace;font-size:13px;font-style:normal;font-variant:normal;font-=
weight:400;text-decoration:none;word-spacing:0px;display:inline!important;w=
hite-space:normal;float:none;background-color:transparent">void func(C&=
, size_t);</span></font></div><div><font face=3D"courier new,monospace"><b>=
</b><i></i><u></u><sub></sub><sup></sup><strike></strike><br></font></div><=
div><font face=3D"arial,sans-serif">By </font><font face=3D"arial,sans-seri=
f"><a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0301=
r0.html" rel=3D"nofollow" target=3D"_blank">the current rules</a> this will=
<i>hide</i> the member function, but now the condition is an error as the =
call to func is ambiguous.</font></div><div><font face=3D"arial,sans-serif"=
><br></font></div><div><font face=3D"arial,sans-serif"><div>(Needless to sa=
y, the above could be used in the future not to <i>enable</i>=C2=A0<span>UF=
CS, but to <i style=3D"border-bottom-color:rgb(34,34,34);border-bottom-styl=
e:none;border-bottom-width:0px;border-left-color:rgb(34,34,34);border-left-=
style:none;border-left-width:0px;border-right-color:rgb(34,34,34);border-ri=
ght-style:none;border-right-width:0px;border-top-color:rgb(34,34,34);border=
-top-style:none;border-top-width:0px;margin-bottom:0px;margin-left:0px;marg=
in-right:0px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-rig=
ht:0px;padding-top:0px">override</i> the rules.)</span><br></div></font></d=
iv><div><font face=3D"arial,sans-serif"><b></b><i></i><u></u><sub></sub><su=
p></sup><strike></strike><br></font></div><div>In n4586 it says <i>"..=
..Some people wanted additional opt-in mechanisms to enable the new behavior=
, which was discussed in great detail, but rejected"</i><i><br></i></d=
iv><div>What were those opt-ins? Was something like this considered, or the=
opt-ins were on the declaration side (be it on the member/class or functio=
n) or on the call site?</div><div><br></div><div><br></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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</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/7464c9ca-3079-4619-9db0-c993dba7a8b6%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/7464c9ca-3079-4619-9db0-c993dba7a8b6%40isocpp.org</a>.<br>
</blockquote></div></div>
</blockquote></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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/9e1318cb-4f04-4e26-a630-ce4b41363d19%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e1318cb-4f04-=
4e26-a630-ce4b41363d19%40isocpp.org</a>.<br>
</blockquote></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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/CALvx3hZur%3D15q5xo7pfk5mZj35WQW_32bY=
WHwzNiez%2BYgQ%2B7NA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Df=
ooter" target=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std=
-proposals/CALvx3hZur%3D15q5xo7pfk5mZj35WQW_32bYWHwzNiez%2BYgQ%2B7NA%40mail=
..gmail.com</a>.<br>
</blockquote></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/CAHn%2BA5Med52t%2BkUPqJgtAB_LTtD%3Dtd=
C0bMFWbTuHCde%3D02ZtfQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoo=
ter">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAHn%2BA5=
Med52t%2BkUPqJgtAB_LTtD%3DtdC0bMFWbTuHCde%3D02ZtfQ%40mail.gmail.com</a>.<br=
/>
--000000000000a2b6100573563369--
.