Topic: Delete function with message


Author: Guillaume Racicot <gufideg@gmail.com>
Date: Tue, 5 Jul 2016 13:23:09 -0700 (PDT)
Raw View
------=_Part_570_230937359.1467750189950
Content-Type: multipart/alternative;
 boundary="----=_Part_571_744317121.1467750189951"

------=_Part_571_744317121.1467750189951
Content-Type: text/plain; charset=UTF-8

Hi there, I got an idea while writing a library. There are multiple cases
where I got this:

template<typename T, std::enable_if_t<std::is_polymorphic<T>::value, int> =
0>
void doThings(T) {
    // ...
}

template<typename T, std::enable_if_t<!std::is_polymorphic<T>::value, int> =
0>
void doThings(T) {
    static_assert(!std::is_same<T, T>::value, "T must not be polymorphic.");
}

This code gives me clear error messages, nice. But there's a catch: You
can't use SFINAE to check if the function is callable:

template<typename T>
auto callDoThingsMaybe(T t) -> decltype(doThings(t)) {
    doThings(t);
}

template<typename T>
auto callDoThingsMaybe(T t) -> decltype(doOtherThings(t)) {
    doOtherThings(t);
}

Where doOtherThings(T) only exists if T is polymorphic.

This code won't work, because  doThings(T) is not a SFINAE failure, and
calling it will result in a hard error. If I would remove the overload that
throws the static assert, SFINAE will work, but we will loose the nice
error message.

I would like to make a proposal to enable sfinae with nice error messages.

Look at this alternative:

template<typename T, std::enable_if_t<!std::is_polymorphic<T>::value, int> =
0>
void doThings(T) = delete("T must not be polymorphic."); // proposed syntax

This will follow deleted function rules and give a nice error message when
it is called. SFINAE will still work, and the compiler will still print
nice error messages for users.

What do you think?

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/63a44811-3a7a-43e2-988f-5d7f2cb52199%40isocpp.org.

------=_Part_571_744317121.1467750189951
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi there, I got an idea while writing a library. There are=
 multiple cases where I got this:<div><br></div><div class=3D"prettyprint" =
style=3D"border: 1px solid rgb(187, 187, 187); word-wrap: break-word; backg=
round-color: rgb(250, 250, 250);"><code class=3D"prettyprint"><div class=3D=
"subprettyprint"><span style=3D"color: #008;" class=3D"styled-by-prettify">=
template</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&l=
t;</span><span style=3D"color: #008;" class=3D"styled-by-prettify">typename=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> T</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> std</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">::</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify">enable_if_t</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify">std</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">::</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify">is_polymorphic</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">&lt;</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify">T</span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">&gt;::</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
>value</span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span=
 style=3D"color: #008;" class=3D"styled-by-prettify">int</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"styl=
ed-by-prettify">0</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
><br></span><span style=3D"color: #008;" class=3D"styled-by-prettify">void<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> doThings</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify">T</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #800;" c=
lass=3D"styled-by-prettify">// ...</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">}</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"><br><br></span><span style=3D"color: #008;" class=3D"styled-by-pre=
ttify">template</span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">&lt;</span><span style=3D"color: #008;" class=3D"styled-by-prettify">t=
ypename</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> T<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> std</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">enable_if_t</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">&lt;!</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify">std</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">::</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">is_polymorphic</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">&lt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">T</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">&gt;::</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify">value</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </=
span><span style=3D"color: #008;" class=3D"styled-by-prettify">int</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066;" clas=
s=3D"styled-by-prettify">0</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">&gt;</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"><br></span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">void</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> d=
oThings</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify">T</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color:=
 #008;" class=3D"styled-by-prettify">static_assert</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">(!</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify">std</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">::</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify">is_same</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">&lt;</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify">T</span><span style=3D"color: #660;" class=3D"styled-by-prettify">,=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> T</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;::</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify">value</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #080;"=
 class=3D"styled-by-prettify">&quot;T must not be polymorphic.&quot;</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">);</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">}</span></div></code></div><div=
><div><br></div><div>This code gives me clear error messages, nice. But the=
re&#39;s a catch: You can&#39;t use SFINAE to check if the function is call=
able:</div><div><br></div><div class=3D"prettyprint" style=3D"border: 1px s=
olid rgb(187, 187, 187); word-wrap: break-word; background-color: rgb(250, =
250, 250);"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span=
 style=3D"color: #008;" class=3D"styled-by-prettify">template</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">typename</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> T</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #008;" cl=
ass=3D"styled-by-prettify">auto</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> callDoThingsMaybe</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify">T t</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">-&gt;=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><s=
pan style=3D"color: #008;" class=3D"styled-by-prettify">decltype</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">doThings</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify">t</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">))</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"><br>=C2=A0 =C2=A0 doThings</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify">t</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>);</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">}</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"><br><br></span><span s=
tyle=3D"color: #008;" class=3D"styled-by-prettify">template</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">typename</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> T</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"><br></span><span style=3D"color: #008;" class=3D=
"styled-by-prettify">auto</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> callDoThingsMaybe</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify">T t</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">)</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">-&gt;</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #008;" class=3D"styled-by-prettify">decltype</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify">doOtherThings</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify">t</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">))</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><=
br>=C2=A0 =C2=A0 doOtherThings</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify">t</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">);</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">}</span></di=
v></code></div><div><div><div><br></div></div></div></div><div>Where <font =
face=3D"courier new, monospace" style=3D"background-color: rgb(243, 243, 24=
3);">doOtherThings(T)</font> only exists if T is polymorphic.</div><div><br=
></div><div>This code won&#39;t work, because =C2=A0<font face=3D"courier n=
ew, monospace" style=3D"background-color: rgb(243, 243, 243);">doThings(T)<=
/font> is not a SFINAE failure, and calling it will result in a hard error.=
 If I would remove the overload that throws the static assert, SFINAE will =
work, but we will loose the nice error message.</div><div><br></div><div>I =
would like to make a proposal to enable sfinae with nice error messages.</d=
iv><div><br></div><div>Look at this alternative:</div><div><br></div><div><=
div class=3D"prettyprint" style=3D"border: 1px solid rgb(187, 187, 187); wo=
rd-wrap: break-word; background-color: rgb(250, 250, 250);"><code class=3D"=
prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">template</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&lt;</span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">typename</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> T</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
std</span><span style=3D"color: #660;" class=3D"styled-by-prettify">::</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify">enable_if_t</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;!</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify">std</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">is_polymorphic</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">T</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">&gt;::</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify">value</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">int</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&=
gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"=
color: #066;" class=3D"styled-by-prettify">0</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"><br></span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">void</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> doThings</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify">T</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"col=
or: #008;" class=3D"styled-by-prettify">delete</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #080;" cl=
ass=3D"styled-by-prettify">&quot;T must not be polymorphic.&quot;</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">);</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #800;" class=3D"styled-by-prettify">// proposed syntax</span></div></code=
></div><div><br></div></div><div>This will follow deleted function rules an=
d give a nice error message when it is called. SFINAE will still work, and =
the compiler will still print nice error messages for users.</div><div><br>=
</div><div>What do you think?</div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/63a44811-3a7a-43e2-988f-5d7f2cb52199%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/63a44811-3a7a-43e2-988f-5d7f2cb52199=
%40isocpp.org</a>.<br />

------=_Part_571_744317121.1467750189951--

------=_Part_570_230937359.1467750189950--

.


Author: Jim Porter <jvp4846@g.rit.edu>
Date: Tue, 5 Jul 2016 16:05:54 -0500
Raw View
On 7/5/2016 3:23 PM, Guillaume Racicot wrote:
> I would like to make a proposal to enable sfinae with nice error messages.
[snip]
> What do you think?

Isn't this what Concepts will do? You could constrain your function to
take types meeting a "Polymorphic" concept and, if you pass something
that's not polymorphic, the compiler would say something like
"constraint not satisfied because T is not a Polymorphic type".

- Jim


--
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/nlh7fs%24pg9%241%40ger.gmane.org.

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Wed, 6 Jul 2016 00:06:26 +0300
Raw View
On 5 July 2016 at 23:23, Guillaume Racicot <gufideg@gmail.com> wrote:
> Hi there, I got an idea while writing a library. There are multiple cases
> where I got this:
>
> template<typename T, std::enable_if_t<std::is_polymorphic<T>::value, int> =
> 0>
> void doThings(T) {
>     // ...
> }
>
> template<typename T, std::enable_if_t<!std::is_polymorphic<T>::value, int> =
> 0>
> void doThings(T) {
>     static_assert(!std::is_same<T, T>::value, "T must not be polymorphic.");
> }
>
> This code gives me clear error messages, nice. But there's a catch: You
> can't use SFINAE to check if the function is callable:
>
> template<typename T>
> auto callDoThingsMaybe(T t) -> decltype(doThings(t)) {
>     doThings(t);
> }
>
> template<typename T>
> auto callDoThingsMaybe(T t) -> decltype(doOtherThings(t)) {
>     doOtherThings(t);
> }
>
> Where doOtherThings(T) only exists if T is polymorphic.
>
> This code won't work, because  doThings(T) is not a SFINAE failure, and
> calling it will result in a hard error. If I would remove the overload that
> throws the static assert, SFINAE will work, but we will loose the nice error
> message.
>
> I would like to make a proposal to enable sfinae with nice error messages.
>
> Look at this alternative:
>
> template<typename T, std::enable_if_t<!std::is_polymorphic<T>::value, int> =
> 0>
> void doThings(T) = delete("T must not be polymorphic."); // proposed syntax
>
> This will follow deleted function rules and give a nice error message when
> it is called. SFINAE will still work, and the compiler will still print nice
> error messages for users.
>
> What do you think?


I think having such a facility would be immensely useful. One
food-for-thought point, though:
why not do it with an attribute?

template<typename T, std::enable_if_t<!std::is_polymorphic<T>::value, int> = 0>
[[diagnose("T must not be polymorphic.")]]
void doThings(T) = delete;

--
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_0jb1679Cp0yxTZ6hx1gCaae_ZLgCqcm8c%3DOwBgp3ug%40mail.gmail.com.

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Wed, 6 Jul 2016 00:14:52 +0300
Raw View
On 6 July 2016 at 00:05, Jim Porter <jvp4846@g.rit.edu> wrote:
> On 7/5/2016 3:23 PM, Guillaume Racicot wrote:
>>
>> I would like to make a proposal to enable sfinae with nice error messages.
>
> [snip]
>>
>> What do you think?
>
>
> Isn't this what Concepts will do? You could constrain your function to take
> types meeting a "Polymorphic" concept and, if you pass something that's not
> polymorphic, the compiler would say something like "constraint not satisfied
> because T is not a Polymorphic type".


Correct. The reason why I envisioned the attribute approach is that I
envisioned a general
facility that would be "implementation, if you're going to issue a
diagnostic here, please
include the following text in the diagnostic".

One might also think of talking to the Contracts proposal authors
about means to do compile-time
contracts. It seems like the current proposal focuses on run-time contracts:
http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0380r0.pdf

--
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/CAFk2RUZhhsz3FJ02pk7snxJ1WV0UQvnKzBXm7m%3DcJJtYUaHJ-Q%40mail.gmail.com.

.


Author: Guillaume Racicot <gufideg@gmail.com>
Date: Tue, 5 Jul 2016 14:22:05 -0700 (PDT)
Raw View
------=_Part_1018_1913023374.1467753725929
Content-Type: multipart/alternative;
 boundary="----=_Part_1019_1511936656.1467753725929"

------=_Part_1019_1511936656.1467753725929
Content-Type: text/plain; charset=UTF-8

It would even better with concepts. It would actually look like this:

void doThing(auto&) = delete("For some reason X, you must send a Container")

void doThing(Container&) { /* ... */ }

It will provide more information for the users and give insights of what
should be done to make things work.

On Tuesday, 5 July 2016 17:06:14 UTC-4, Jim Porter wrote:

> On 7/5/2016 3:23 PM, Guillaume Racicot wrote:
> > I would like to make a proposal to enable sfinae with nice error
> messages.
> [snip]
> > What do you think?
>
> Isn't this what Concepts will do? You could constrain your function to
> take types meeting a "Polymorphic" concept and, if you pass something
> that's not polymorphic, the compiler would say something like
> "constraint not satisfied because T is not a Polymorphic type".
>
> - Jim
>
>
>

--
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/3127f785-8200-4bd6-aa9a-5ef8be7e0367%40isocpp.org.

------=_Part_1019_1511936656.1467753725929
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">It would even better with concepts. It would actually look=
 like this:<div><br class=3D"Apple-interchange-newline">void doThing(auto&a=
mp;) =3D delete(&quot;For some reason X, you must send a Container&quot;)<b=
r></div><br class=3D"Apple-interchange-newline">void doThing(Container&amp;=
) { /* ... */ }<div><br></div><div>It will provide more information for the=
 users and give insights of what should be done to make things work.<br><di=
v><br></div><div>On Tuesday, 5 July 2016 17:06:14 UTC-4, Jim Porter  wrote:=
<div><blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8e=
x;border-left: 1px #ccc solid;padding-left: 1ex;">On 7/5/2016 3:23 PM, Guil=
laume Racicot wrote:
<br>&gt; I would like to make a proposal to enable sfinae with nice error m=
essages.
<br>[snip]
<br>&gt; What do you think?
<br>
<br>Isn&#39;t this what Concepts will do? You could constrain your function=
 to=20
<br>take types meeting a &quot;Polymorphic&quot; concept and, if you pass s=
omething=20
<br>that&#39;s not polymorphic, the compiler would say something like=20
<br>&quot;constraint not satisfied because T is not a Polymorphic type&quot=
;.
<br>
<br>- Jim
<br>
<br>
<br></blockquote></div></div></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/3127f785-8200-4bd6-aa9a-5ef8be7e0367%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/3127f785-8200-4bd6-aa9a-5ef8be7e0367=
%40isocpp.org</a>.<br />

------=_Part_1019_1511936656.1467753725929--

------=_Part_1018_1913023374.1467753725929--

.


Author: Jim Porter <jvp4846@g.rit.edu>
Date: Tue, 5 Jul 2016 16:24:03 -0500
Raw View
On 7/5/2016 4:14 PM, Ville Voutilainen wrote:
> Correct. The reason why I envisioned the attribute approach is that I
> envisioned a general
> facility that would be "implementation, if you're going to issue a
> diagnostic here, please
> include the following text in the diagnostic".

If this could be expanded to a recommendation to the compiler: "please
don't include a lot of extraneous error information", I'd be happy to
see it. Errors in nested template instantiations can get awfully
verbose, and I haven't come up with a good general-purpose way to keep
them brief.

- Jim

--
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/nlh8ht%24fmi%241%40ger.gmane.org.

.


Author: Guillaume Racicot <gufideg@gmail.com>
Date: Tue, 5 Jul 2016 14:29:39 -0700 (PDT)
Raw View
------=_Part_880_1602419521.1467754179188
Content-Type: multipart/alternative;
 boundary="----=_Part_881_992466909.1467754179188"

------=_Part_881_992466909.1467754179188
Content-Type: text/plain; charset=UTF-8

Indeed, it could be an attribute, but I think it feels nicer to get it
directly in the delete syntax, as it is only an extension of the delete
syntax.
I get the point tough, and one could easily write an implementation as a
compiler extension with that.

I'm in the process of writing the proposal on github, I will include this
alternative syntax. Thanks!

On Tuesday, 5 July 2016 17:06:28 UTC-4, Ville Voutilainen wrote:
>
> On 5 July 2016 at 23:23, Guillaume Racicot <guf...@gmail.com <javascript:>>
> wrote:
> > Hi there, I got an idea while writing a library. There are multiple
> cases
> > where I got this:
> >
> > template<typename T, std::enable_if_t<std::is_polymorphic<T>::value,
> int> =
> > 0>
> > void doThings(T) {
> >     // ...
> > }
> >
> > template<typename T, std::enable_if_t<!std::is_polymorphic<T>::value,
> int> =
> > 0>
> > void doThings(T) {
> >     static_assert(!std::is_same<T, T>::value, "T must not be
> polymorphic.");
> > }
> >
> > This code gives me clear error messages, nice. But there's a catch: You
> > can't use SFINAE to check if the function is callable:
> >
> > template<typename T>
> > auto callDoThingsMaybe(T t) -> decltype(doThings(t)) {
> >     doThings(t);
> > }
> >
> > template<typename T>
> > auto callDoThingsMaybe(T t) -> decltype(doOtherThings(t)) {
> >     doOtherThings(t);
> > }
> >
> > Where doOtherThings(T) only exists if T is polymorphic.
> >
> > This code won't work, because  doThings(T) is not a SFINAE failure, and
> > calling it will result in a hard error. If I would remove the overload
> that
> > throws the static assert, SFINAE will work, but we will loose the nice
> error
> > message.
> >
> > I would like to make a proposal to enable sfinae with nice error
> messages.
> >
> > Look at this alternative:
> >
> > template<typename T, std::enable_if_t<!std::is_polymorphic<T>::value,
> int> =
> > 0>
> > void doThings(T) = delete("T must not be polymorphic."); // proposed
> syntax
> >
> > This will follow deleted function rules and give a nice error message
> when
> > it is called. SFINAE will still work, and the compiler will still print
> nice
> > error messages for users.
> >
> > What do you think?
>
>
> I think having such a facility would be immensely useful. One
> food-for-thought point, though:
> why not do it with an attribute?
>
> template<typename T, std::enable_if_t<!std::is_polymorphic<T>::value, int>
> = 0>
> [[diagnose("T must not be polymorphic.")]]
> void doThings(T) = delete;
>

--
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/334e2df6-642e-4e09-b898-e195f06b62fa%40isocpp.org.

------=_Part_881_992466909.1467754179188
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Indeed, it could be an attribute, but I think it feels nic=
er to get it directly in the delete syntax, as it is only an extension of t=
he delete syntax.<div>I get the point tough, and one could easily write an =
implementation as a compiler extension with that.</div><div><br></div><div>=
I&#39;m in the process of writing the proposal on github, I will include th=
is alternative syntax. Thanks!<br><br>On Tuesday, 5 July 2016 17:06:28 UTC-=
4, Ville Voutilainen  wrote:<blockquote class=3D"gmail_quote" style=3D"marg=
in: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On=
 5 July 2016 at 23:23, Guillaume Racicot &lt;<a href=3D"javascript:" target=
=3D"_blank" gdf-obfuscated-mailto=3D"CX_mx1GbCAAJ" rel=3D"nofollow" onmouse=
down=3D"this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.hre=
f=3D&#39;javascript:&#39;;return true;">guf...@gmail.com</a>&gt; wrote:
<br>&gt; Hi there, I got an idea while writing a library. There are multipl=
e cases
<br>&gt; where I got this:
<br>&gt;
<br>&gt; template&lt;typename T, std::enable_if_t&lt;std::is_<wbr>polymorph=
ic&lt;T&gt;::value, int&gt; =3D
<br>&gt; 0&gt;
<br>&gt; void doThings(T) {
<br>&gt; =C2=A0 =C2=A0 // ...
<br>&gt; }
<br>&gt;
<br>&gt; template&lt;typename T, std::enable_if_t&lt;!std::is_<wbr>polymorp=
hic&lt;T&gt;::value, int&gt; =3D
<br>&gt; 0&gt;
<br>&gt; void doThings(T) {
<br>&gt; =C2=A0 =C2=A0 static_assert(!std::is_same&lt;T, T&gt;::value, &quo=
t;T must not be polymorphic.&quot;);
<br>&gt; }
<br>&gt;
<br>&gt; This code gives me clear error messages, nice. But there&#39;s a c=
atch: You
<br>&gt; can&#39;t use SFINAE to check if the function is callable:
<br>&gt;
<br>&gt; template&lt;typename T&gt;
<br>&gt; auto callDoThingsMaybe(T t) -&gt; decltype(doThings(t)) {
<br>&gt; =C2=A0 =C2=A0 doThings(t);
<br>&gt; }
<br>&gt;
<br>&gt; template&lt;typename T&gt;
<br>&gt; auto callDoThingsMaybe(T t) -&gt; decltype(doOtherThings(t)) {
<br>&gt; =C2=A0 =C2=A0 doOtherThings(t);
<br>&gt; }
<br>&gt;
<br>&gt; Where doOtherThings(T) only exists if T is polymorphic.
<br>&gt;
<br>&gt; This code won&#39;t work, because =C2=A0doThings(T) is not a SFINA=
E failure, and
<br>&gt; calling it will result in a hard error. If I would remove the over=
load that
<br>&gt; throws the static assert, SFINAE will work, but we will loose the =
nice error
<br>&gt; message.
<br>&gt;
<br>&gt; I would like to make a proposal to enable sfinae with nice error m=
essages.
<br>&gt;
<br>&gt; Look at this alternative:
<br>&gt;
<br>&gt; template&lt;typename T, std::enable_if_t&lt;!std::is_<wbr>polymorp=
hic&lt;T&gt;::value, int&gt; =3D
<br>&gt; 0&gt;
<br>&gt; void doThings(T) =3D delete(&quot;T must not be polymorphic.&quot;=
); // proposed syntax
<br>&gt;
<br>&gt; This will follow deleted function rules and give a nice error mess=
age when
<br>&gt; it is called. SFINAE will still work, and the compiler will still =
print nice
<br>&gt; error messages for users.
<br>&gt;
<br>&gt; What do you think?
<br>
<br>
<br>I think having such a facility would be immensely useful. One
<br>food-for-thought point, though:
<br>why not do it with an attribute?
<br>
<br>template&lt;typename T, std::enable_if_t&lt;!std::is_<wbr>polymorphic&l=
t;T&gt;::value, int&gt; =3D 0&gt;
<br>[[diagnose(&quot;T must not be polymorphic.&quot;)]]
<br>void doThings(T) =3D delete;
<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&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/334e2df6-642e-4e09-b898-e195f06b62fa%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/334e2df6-642e-4e09-b898-e195f06b62fa=
%40isocpp.org</a>.<br />

------=_Part_881_992466909.1467754179188--

------=_Part_880_1602419521.1467754179188--

.


Author: Guillaume Racicot <gufideg@gmail.com>
Date: Tue, 5 Jul 2016 16:23:04 -0700 (PDT)
Raw View
------=_Part_13352_1262307665.1467760984456
Content-Type: multipart/alternative;
 boundary="----=_Part_13353_80704762.1467760984457"

------=_Part_13353_80704762.1467760984457
Content-Type: text/plain; charset=UTF-8

Here's the git repo of the proposal. Any contribution are welcome!
https://github.com/gracicot/delete-message-proposal/

On Tuesday, 5 July 2016 16:23:10 UTC-4, Guillaume Racicot wrote:
>
> Hi there, I got an idea while writing a library. There are multiple cases
> where I got this:
>
> template<typename T, std::enable_if_t<std::is_polymorphic<T>::value, int>
> = 0>
> void doThings(T) {
>     // ...
> }
>
> template<typename T, std::enable_if_t<!std::is_polymorphic<T>::value, int>
> = 0>
> void doThings(T) {
>     static_assert(!std::is_same<T, T>::value, "T must not be polymorphic."
> );
> }
>
> This code gives me clear error messages, nice. But there's a catch: You
> can't use SFINAE to check if the function is callable:
>
> template<typename T>
> auto callDoThingsMaybe(T t) -> decltype(doThings(t)) {
>     doThings(t);
> }
>
> template<typename T>
> auto callDoThingsMaybe(T t) -> decltype(doOtherThings(t)) {
>     doOtherThings(t);
> }
>
> Where doOtherThings(T) only exists if T is polymorphic.
>
> This code won't work, because  doThings(T) is not a SFINAE failure, and
> calling it will result in a hard error. If I would remove the overload that
> throws the static assert, SFINAE will work, but we will loose the nice
> error message.
>
> I would like to make a proposal to enable sfinae with nice error messages.
>
> Look at this alternative:
>
> template<typename T, std::enable_if_t<!std::is_polymorphic<T>::value, int>
> = 0>
> void doThings(T) = delete("T must not be polymorphic."); // proposed
> syntax
>
> This will follow deleted function rules and give a nice error message when
> it is called. SFINAE will still work, and the compiler will still print
> nice error messages for users.
>
> What do you think?
>

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/c6ae5fd8-2981-417b-b85b-422628aaf44a%40isocpp.org.

------=_Part_13353_80704762.1467760984457
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Here&#39;s the git repo of the proposal. Any contribution =
are welcome!<div><a href=3D"https://github.com/gracicot/delete-message-prop=
osal/">https://github.com/gracicot/delete-message-proposal/</a><br><br>On T=
uesday, 5 July 2016 16:23:10 UTC-4, Guillaume Racicot  wrote:<blockquote cl=
ass=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px =
#ccc solid;padding-left: 1ex;"><div dir=3D"ltr">Hi there, I got an idea whi=
le writing a library. There are multiple cases where I got this:<div><br></=
div><div style=3D"border:1px solid rgb(187,187,187);word-wrap:break-word;ba=
ckground-color:rgb(250,250,250)"><code><div><span style=3D"color:#008">temp=
late</span><span style=3D"color:#660">&lt;</span><span style=3D"color:#008"=
>typename</span><span style=3D"color:#000"> T</span><span style=3D"color:#6=
60">,</span><span style=3D"color:#000"> std</span><span style=3D"color:#660=
">::</span><span style=3D"color:#000">enable_if_t</span><span style=3D"colo=
r:#660">&lt;</span><span style=3D"color:#000">std</span><span style=3D"colo=
r:#660">::</span><span style=3D"color:#000">is_<wbr>polymorphic</span><span=
 style=3D"color:#660">&lt;</span><span style=3D"color:#000">T</span><span s=
tyle=3D"color:#660">&gt;::</span><span style=3D"color:#000">value</span><sp=
an style=3D"color:#660">,</span><span style=3D"color:#000"> </span><span st=
yle=3D"color:#008">int</span><span style=3D"color:#660">&gt;</span><span st=
yle=3D"color:#000"> </span><span style=3D"color:#660">=3D</span><span style=
=3D"color:#000"> </span><span style=3D"color:#066">0</span><span style=3D"c=
olor:#660">&gt;</span><span style=3D"color:#000"><br></span><span style=3D"=
color:#008">void</span><span style=3D"color:#000"> doThings</span><span sty=
le=3D"color:#660">(</span><span style=3D"color:#000">T</span><span style=3D=
"color:#660">)</span><span style=3D"color:#000"> </span><span style=3D"colo=
r:#660">{</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 </span><span s=
tyle=3D"color:#800">// ...</span><span style=3D"color:#000"><br></span><spa=
n style=3D"color:#660">}</span><span style=3D"color:#000"><br><br></span><s=
pan style=3D"color:#008">template</span><span style=3D"color:#660">&lt;</sp=
an><span style=3D"color:#008">typename</span><span style=3D"color:#000"> T<=
/span><span style=3D"color:#660">,</span><span style=3D"color:#000"> std</s=
pan><span style=3D"color:#660">::</span><span style=3D"color:#000">enable_i=
f_t</span><span style=3D"color:#660">&lt;!</span><span style=3D"color:#000"=
>std</span><span style=3D"color:#660">::</span><span style=3D"color:#000">i=
s_<wbr>polymorphic</span><span style=3D"color:#660">&lt;</span><span style=
=3D"color:#000">T</span><span style=3D"color:#660">&gt;::</span><span style=
=3D"color:#000">value</span><span style=3D"color:#660">,</span><span style=
=3D"color:#000"> </span><span style=3D"color:#008">int</span><span style=3D=
"color:#660">&gt;</span><span style=3D"color:#000"> </span><span style=3D"c=
olor:#660">=3D</span><span style=3D"color:#000"> </span><span style=3D"colo=
r:#066">0</span><span style=3D"color:#660">&gt;</span><span style=3D"color:=
#000"><br></span><span style=3D"color:#008">void</span><span style=3D"color=
:#000"> doThings</span><span style=3D"color:#660">(</span><span style=3D"co=
lor:#000">T</span><span style=3D"color:#660">)</span><span style=3D"color:#=
000"> </span><span style=3D"color:#660">{</span><span style=3D"color:#000">=
<br>=C2=A0 =C2=A0 </span><span style=3D"color:#008">static_assert</span><sp=
an style=3D"color:#660">(!</span><span style=3D"color:#000">std</span><span=
 style=3D"color:#660">::</span><span style=3D"color:#000">is_same</span><sp=
an style=3D"color:#660">&lt;</span><span style=3D"color:#000">T</span><span=
 style=3D"color:#660">,</span><span style=3D"color:#000"> T</span><span sty=
le=3D"color:#660">&gt;::</span><span style=3D"color:#000">value</span><span=
 style=3D"color:#660">,</span><span style=3D"color:#000"> </span><span styl=
e=3D"color:#080">&quot;T must not be polymorphic.&quot;</span><span style=
=3D"color:#660">);</span><span style=3D"color:#000"><br></span><span style=
=3D"color:#660">}</span></div></code></div><div><div><br></div><div>This co=
de gives me clear error messages, nice. But there&#39;s a catch: You can&#3=
9;t use SFINAE to check if the function is callable:</div><div><br></div><d=
iv style=3D"border:1px solid rgb(187,187,187);word-wrap:break-word;backgrou=
nd-color:rgb(250,250,250)"><code><div><span style=3D"color:#008">template</=
span><span style=3D"color:#660">&lt;</span><span style=3D"color:#008">typen=
ame</span><span style=3D"color:#000"> T</span><span style=3D"color:#660">&g=
t;</span><span style=3D"color:#000"><br></span><span style=3D"color:#008">a=
uto</span><span style=3D"color:#000"> callDoThingsMaybe</span><span style=
=3D"color:#660">(</span><span style=3D"color:#000">T t</span><span style=3D=
"color:#660">)</span><span style=3D"color:#000"> </span><span style=3D"colo=
r:#660">-&gt;</span><span style=3D"color:#000"> </span><span style=3D"color=
:#008">decltype</span><span style=3D"color:#660">(</span><span style=3D"col=
or:#000">doThings</span><span style=3D"color:#660">(</span><span style=3D"c=
olor:#000">t</span><span style=3D"color:#660">))</span><span style=3D"color=
:#000"> </span><span style=3D"color:#660">{</span><span style=3D"color:#000=
"><br>=C2=A0 =C2=A0 doThings</span><span style=3D"color:#660">(</span><span=
 style=3D"color:#000">t</span><span style=3D"color:#660">);</span><span sty=
le=3D"color:#000"><br></span><span style=3D"color:#660">}</span><span style=
=3D"color:#000"><br><br></span><span style=3D"color:#008">template</span><s=
pan style=3D"color:#660">&lt;</span><span style=3D"color:#008">typename</sp=
an><span style=3D"color:#000"> T</span><span style=3D"color:#660">&gt;</spa=
n><span style=3D"color:#000"><br></span><span style=3D"color:#008">auto</sp=
an><span style=3D"color:#000"> callDoThingsMaybe</span><span style=3D"color=
:#660">(</span><span style=3D"color:#000">T t</span><span style=3D"color:#6=
60">)</span><span style=3D"color:#000"> </span><span style=3D"color:#660">-=
&gt;</span><span style=3D"color:#000"> </span><span style=3D"color:#008">de=
cltype</span><span style=3D"color:#660">(</span><span style=3D"color:#000">=
doOtherThings</span><span style=3D"color:#660">(</span><span style=3D"color=
:#000">t</span><span style=3D"color:#660">))</span><span style=3D"color:#00=
0"> </span><span style=3D"color:#660">{</span><span style=3D"color:#000"><b=
r>=C2=A0 =C2=A0 doOtherThings</span><span style=3D"color:#660">(</span><spa=
n style=3D"color:#000">t</span><span style=3D"color:#660">);</span><span st=
yle=3D"color:#000"><br></span><span style=3D"color:#660">}</span></div></co=
de></div><div><div><div><br></div></div></div></div><div>Where <font face=
=3D"courier new, monospace" style=3D"background-color:rgb(243,243,243)">doO=
therThings(T)</font> only exists if T is polymorphic.</div><div><br></div><=
div>This code won&#39;t work, because =C2=A0<font face=3D"courier new, mono=
space" style=3D"background-color:rgb(243,243,243)">doThings(T)</font> is no=
t a SFINAE failure, and calling it will result in a hard error. If I would =
remove the overload that throws the static assert, SFINAE will work, but we=
 will loose the nice error message.</div><div><br></div><div>I would like t=
o make a proposal to enable sfinae with nice error messages.</div><div><br>=
</div><div>Look at this alternative:</div><div><br></div><div><div style=3D=
"border:1px solid rgb(187,187,187);word-wrap:break-word;background-color:rg=
b(250,250,250)"><code><div><span style=3D"color:#008">template</span><span =
style=3D"color:#660">&lt;</span><span style=3D"color:#008">typename</span><=
span style=3D"color:#000"> T</span><span style=3D"color:#660">,</span><span=
 style=3D"color:#000"> std</span><span style=3D"color:#660">::</span><span =
style=3D"color:#000">enable_if_t</span><span style=3D"color:#660">&lt;!</sp=
an><span style=3D"color:#000">std</span><span style=3D"color:#660">::</span=
><span style=3D"color:#000">is_<wbr>polymorphic</span><span style=3D"color:=
#660">&lt;</span><span style=3D"color:#000">T</span><span style=3D"color:#6=
60">&gt;::</span><span style=3D"color:#000">value</span><span style=3D"colo=
r:#660">,</span><span style=3D"color:#000"> </span><span style=3D"color:#00=
8">int</span><span style=3D"color:#660">&gt;</span><span style=3D"color:#00=
0"> </span><span style=3D"color:#660">=3D</span><span style=3D"color:#000">=
 </span><span style=3D"color:#066">0</span><span style=3D"color:#660">&gt;<=
/span><span style=3D"color:#000"><br></span><span style=3D"color:#008">void=
</span><span style=3D"color:#000"> doThings</span><span style=3D"color:#660=
">(</span><span style=3D"color:#000">T</span><span style=3D"color:#660">)</=
span><span style=3D"color:#000"> </span><span style=3D"color:#660">=3D</spa=
n><span style=3D"color:#000"> </span><span style=3D"color:#008">delete</spa=
n><span style=3D"color:#660">(</span><span style=3D"color:#080">&quot;T mus=
t not be polymorphic.&quot;</span><span style=3D"color:#660">);</span><span=
 style=3D"color:#000"> </span><span style=3D"color:#800">// proposed syntax=
</span></div></code></div><div><br></div></div><div>This will follow delete=
d function rules and give a nice error message when it is called. SFINAE wi=
ll still work, and the compiler will still print nice error messages for us=
ers.</div><div><br></div><div>What do you think?</div></div></blockquote></=
div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/c6ae5fd8-2981-417b-b85b-422628aaf44a%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/c6ae5fd8-2981-417b-b85b-422628aaf44a=
%40isocpp.org</a>.<br />

------=_Part_13353_80704762.1467760984457--

------=_Part_13352_1262307665.1467760984456--

.


Author: "T. C." <rs2740@gmail.com>
Date: Wed, 6 Jul 2016 16:36:17 -0700 (PDT)
Raw View
------=_Part_10_136997825.1467848177475
Content-Type: multipart/alternative;
 boundary="----=_Part_11_1534740508.1467848177476"

------=_Part_11_1534740508.1467848177476
Content-Type: text/plain; charset=UTF-8



On Tuesday, July 5, 2016 at 7:23:04 PM UTC-4, Guillaume Racicot wrote:
>
> Here's the git repo of the proposal. Any contribution are welcome!
> https://github.com/gracicot/delete-message-proposal/
>
> On Tuesday, 5 July 2016 16:23:10 UTC-4, Guillaume Racicot wrote:
>>
>> Hi there, I got an idea while writing a library. There are multiple cases
>> where I got this:
>>
>> template<typename T, std::enable_if_t<std::is_polymorphic<T>::value, int>
>> = 0>
>> void doThings(T) {
>>     // ...
>> }
>>
>> template<typename T, std::enable_if_t<!std::is_polymorphic<T>::value, int
>> > = 0>
>> void doThings(T) {
>>     static_assert(!std::is_same<T, T>::value, "T must not be
>> polymorphic.");
>> }
>>
>> This code gives me clear error messages, nice. But there's a catch: You
>> can't use SFINAE to check if the function is callable:
>>
>> template<typename T>
>> auto callDoThingsMaybe(T t) -> decltype(doThings(t)) {
>>     doThings(t);
>> }
>>
>> template<typename T>
>> auto callDoThingsMaybe(T t) -> decltype(doOtherThings(t)) {
>>     doOtherThings(t);
>> }
>>
>> Where doOtherThings(T) only exists if T is polymorphic.
>>
>> This code won't work, because  doThings(T) is not a SFINAE failure, and
>> calling it will result in a hard error. If I would remove the overload that
>> throws the static assert, SFINAE will work, but we will loose the nice
>> error message.
>>
>> I would like to make a proposal to enable sfinae with nice error messages.
>>
>> Look at this alternative:
>>
>> template<typename T, std::enable_if_t<!std::is_polymorphic<T>::value, int
>> > = 0>
>> void doThings(T) = delete("T must not be polymorphic."); // proposed
>> syntax
>>
>> This will follow deleted function rules and give a nice error message
>> when it is called. SFINAE will still work, and the compiler will still
>> print nice error messages for users.
>>
>> What do you think?
>>
>
I'm fairly sure I've seen something like this before...

....ah yes, http://wg21.link/N4186


--
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/d19d5825-9658-4ff8-8bda-2226a0d6fe9e%40isocpp.org.

------=_Part_11_1534740508.1467848177476
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Tuesday, July 5, 2016 at 7:23:04 PM UTC-4, Guil=
laume Racicot 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"ltr">Here&#39;s the git repo of the proposal. Any contribution are welc=
ome!<div><a href=3D"https://github.com/gracicot/delete-message-proposal/" t=
arget=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;https://w=
ww.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fgracicot%2Fdelete-message=
-proposal%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFSOTzXqc8DwC39740VNkyJ=
UBgV5A&#39;;return true;" onclick=3D"this.href=3D&#39;https://www.google.co=
m/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fgracicot%2Fdelete-message-proposal%2F=
\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFSOTzXqc8DwC39740VNkyJUBgV5A&#39;;=
return true;">https://github.com/gracicot/<wbr>delete-message-proposal/</a>=
<br><br>On Tuesday, 5 July 2016 16:23:10 UTC-4, Guillaume Racicot  wrote:<b=
lockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-=
left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Hi there, I got an i=
dea while writing a library. There are multiple cases where I got this:<div=
><br></div><div style=3D"border:1px solid rgb(187,187,187);word-wrap:break-=
word;background-color:rgb(250,250,250)"><code><div><span style=3D"color:#00=
8">template</span><span style=3D"color:#660">&lt;</span><span style=3D"colo=
r:#008">typename</span><span style=3D"color:#000"> T</span><span style=3D"c=
olor:#660">,</span><span style=3D"color:#000"> std</span><span style=3D"col=
or:#660">::</span><span style=3D"color:#000">enable_if_t</span><span style=
=3D"color:#660">&lt;</span><span style=3D"color:#000">std</span><span style=
=3D"color:#660">::</span><span style=3D"color:#000">is_<wbr>polymorphic</sp=
an><span style=3D"color:#660">&lt;</span><span style=3D"color:#000">T</span=
><span style=3D"color:#660">&gt;::</span><span style=3D"color:#000">value</=
span><span style=3D"color:#660">,</span><span style=3D"color:#000"> </span>=
<span style=3D"color:#008">int</span><span style=3D"color:#660">&gt;</span>=
<span style=3D"color:#000"> </span><span style=3D"color:#660">=3D</span><sp=
an style=3D"color:#000"> </span><span style=3D"color:#066">0</span><span st=
yle=3D"color:#660">&gt;</span><span style=3D"color:#000"><br></span><span s=
tyle=3D"color:#008">void</span><span style=3D"color:#000"> doThings</span><=
span style=3D"color:#660">(</span><span style=3D"color:#000">T</span><span =
style=3D"color:#660">)</span><span style=3D"color:#000"> </span><span style=
=3D"color:#660">{</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 </span=
><span style=3D"color:#800">// ...</span><span style=3D"color:#000"><br></s=
pan><span style=3D"color:#660">}</span><span style=3D"color:#000"><br><br><=
/span><span style=3D"color:#008">template</span><span style=3D"color:#660">=
&lt;</span><span style=3D"color:#008">typename</span><span style=3D"color:#=
000"> T</span><span style=3D"color:#660">,</span><span style=3D"color:#000"=
> std</span><span style=3D"color:#660">::</span><span style=3D"color:#000">=
enable_if_t</span><span style=3D"color:#660">&lt;!</span><span style=3D"col=
or:#000">std</span><span style=3D"color:#660">::</span><span style=3D"color=
:#000">is_<wbr>polymorphic</span><span style=3D"color:#660">&lt;</span><spa=
n style=3D"color:#000">T</span><span style=3D"color:#660">&gt;::</span><spa=
n style=3D"color:#000">value</span><span style=3D"color:#660">,</span><span=
 style=3D"color:#000"> </span><span style=3D"color:#008">int</span><span st=
yle=3D"color:#660">&gt;</span><span style=3D"color:#000"> </span><span styl=
e=3D"color:#660">=3D</span><span style=3D"color:#000"> </span><span style=
=3D"color:#066">0</span><span style=3D"color:#660">&gt;</span><span style=
=3D"color:#000"><br></span><span style=3D"color:#008">void</span><span styl=
e=3D"color:#000"> doThings</span><span style=3D"color:#660">(</span><span s=
tyle=3D"color:#000">T</span><span style=3D"color:#660">)</span><span style=
=3D"color:#000"> </span><span style=3D"color:#660">{</span><span style=3D"c=
olor:#000"><br>=C2=A0 =C2=A0 </span><span style=3D"color:#008">static_asser=
t</span><span style=3D"color:#660">(!</span><span style=3D"color:#000">std<=
/span><span style=3D"color:#660">::</span><span style=3D"color:#000">is_sam=
e</span><span style=3D"color:#660">&lt;</span><span style=3D"color:#000">T<=
/span><span style=3D"color:#660">,</span><span style=3D"color:#000"> T</spa=
n><span style=3D"color:#660">&gt;::</span><span style=3D"color:#000">value<=
/span><span style=3D"color:#660">,</span><span style=3D"color:#000"> </span=
><span style=3D"color:#080">&quot;T must not be polymorphic.&quot;</span><s=
pan style=3D"color:#660">);</span><span style=3D"color:#000"><br></span><sp=
an style=3D"color:#660">}</span></div></code></div><div><div><br></div><div=
>This code gives me clear error messages, nice. But there&#39;s a catch: Yo=
u can&#39;t use SFINAE to check if the function is callable:</div><div><br>=
</div><div style=3D"border:1px solid rgb(187,187,187);word-wrap:break-word;=
background-color:rgb(250,250,250)"><code><div><span style=3D"color:#008">te=
mplate</span><span style=3D"color:#660">&lt;</span><span style=3D"color:#00=
8">typename</span><span style=3D"color:#000"> T</span><span style=3D"color:=
#660">&gt;</span><span style=3D"color:#000"><br></span><span style=3D"color=
:#008">auto</span><span style=3D"color:#000"> callDoThingsMaybe</span><span=
 style=3D"color:#660">(</span><span style=3D"color:#000">T t</span><span st=
yle=3D"color:#660">)</span><span style=3D"color:#000"> </span><span style=
=3D"color:#660">-&gt;</span><span style=3D"color:#000"> </span><span style=
=3D"color:#008">decltype</span><span style=3D"color:#660">(</span><span sty=
le=3D"color:#000">doThings</span><span style=3D"color:#660">(</span><span s=
tyle=3D"color:#000">t</span><span style=3D"color:#660">))</span><span style=
=3D"color:#000"> </span><span style=3D"color:#660">{</span><span style=3D"c=
olor:#000"><br>=C2=A0 =C2=A0 doThings</span><span style=3D"color:#660">(</s=
pan><span style=3D"color:#000">t</span><span style=3D"color:#660">);</span>=
<span style=3D"color:#000"><br></span><span style=3D"color:#660">}</span><s=
pan style=3D"color:#000"><br><br></span><span style=3D"color:#008">template=
</span><span style=3D"color:#660">&lt;</span><span style=3D"color:#008">typ=
ename</span><span style=3D"color:#000"> T</span><span style=3D"color:#660">=
&gt;</span><span style=3D"color:#000"><br></span><span style=3D"color:#008"=
>auto</span><span style=3D"color:#000"> callDoThingsMaybe</span><span style=
=3D"color:#660">(</span><span style=3D"color:#000">T t</span><span style=3D=
"color:#660">)</span><span style=3D"color:#000"> </span><span style=3D"colo=
r:#660">-&gt;</span><span style=3D"color:#000"> </span><span style=3D"color=
:#008">decltype</span><span style=3D"color:#660">(</span><span style=3D"col=
or:#000">doOtherThings</span><span style=3D"color:#660">(</span><span style=
=3D"color:#000">t</span><span style=3D"color:#660">))</span><span style=3D"=
color:#000"> </span><span style=3D"color:#660">{</span><span style=3D"color=
:#000"><br>=C2=A0 =C2=A0 doOtherThings</span><span style=3D"color:#660">(</=
span><span style=3D"color:#000">t</span><span style=3D"color:#660">);</span=
><span style=3D"color:#000"><br></span><span style=3D"color:#660">}</span><=
/div></code></div><div><div><div><br></div></div></div></div><div>Where <fo=
nt face=3D"courier new, monospace" style=3D"background-color:rgb(243,243,24=
3)">doOtherThings(T)</font> only exists if T is polymorphic.</div><div><br>=
</div><div>This code won&#39;t work, because =C2=A0<font face=3D"courier ne=
w, monospace" style=3D"background-color:rgb(243,243,243)">doThings(T)</font=
> is not a SFINAE failure, and calling it will result in a hard error. If I=
 would remove the overload that throws the static assert, SFINAE will work,=
 but we will loose the nice error message.</div><div><br></div><div>I would=
 like to make a proposal to enable sfinae with nice error messages.</div><d=
iv><br></div><div>Look at this alternative:</div><div><br></div><div><div s=
tyle=3D"border:1px solid rgb(187,187,187);word-wrap:break-word;background-c=
olor:rgb(250,250,250)"><code><div><span style=3D"color:#008">template</span=
><span style=3D"color:#660">&lt;</span><span style=3D"color:#008">typename<=
/span><span style=3D"color:#000"> T</span><span style=3D"color:#660">,</spa=
n><span style=3D"color:#000"> std</span><span style=3D"color:#660">::</span=
><span style=3D"color:#000">enable_if_t</span><span style=3D"color:#660">&l=
t;!</span><span style=3D"color:#000">std</span><span style=3D"color:#660">:=
:</span><span style=3D"color:#000">is_<wbr>polymorphic</span><span style=3D=
"color:#660">&lt;</span><span style=3D"color:#000">T</span><span style=3D"c=
olor:#660">&gt;::</span><span style=3D"color:#000">value</span><span style=
=3D"color:#660">,</span><span style=3D"color:#000"> </span><span style=3D"c=
olor:#008">int</span><span style=3D"color:#660">&gt;</span><span style=3D"c=
olor:#000"> </span><span style=3D"color:#660">=3D</span><span style=3D"colo=
r:#000"> </span><span style=3D"color:#066">0</span><span style=3D"color:#66=
0">&gt;</span><span style=3D"color:#000"><br></span><span style=3D"color:#0=
08">void</span><span style=3D"color:#000"> doThings</span><span style=3D"co=
lor:#660">(</span><span style=3D"color:#000">T</span><span style=3D"color:#=
660">)</span><span style=3D"color:#000"> </span><span style=3D"color:#660">=
=3D</span><span style=3D"color:#000"> </span><span style=3D"color:#008">del=
ete</span><span style=3D"color:#660">(</span><span style=3D"color:#080">&qu=
ot;T must not be polymorphic.&quot;</span><span style=3D"color:#660">);</sp=
an><span style=3D"color:#000"> </span><span style=3D"color:#800">// propose=
d syntax</span></div></code></div><div><br></div></div><div>This will follo=
w deleted function rules and give a nice error message when it is called. S=
FINAE will still work, and the compiler will still print nice error message=
s for users.</div><div><br></div><div>What do you think?</div></div></block=
quote></div></div></blockquote><div><br></div><div>I&#39;m fairly sure I&#3=
9;ve seen something like this before...</div><div><br></div><div>...ah yes,=
 http://wg21.link/N4186
</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&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/d19d5825-9658-4ff8-8bda-2226a0d6fe9e%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/d19d5825-9658-4ff8-8bda-2226a0d6fe9e=
%40isocpp.org</a>.<br />

------=_Part_11_1534740508.1467848177476--

------=_Part_10_136997825.1467848177475--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Thu, 7 Jul 2016 02:48:48 +0300
Raw View
On 7 July 2016 at 02:36, T. C. <rs2740@gmail.com> wrote:
> I'm fairly sure I've seen something like this before...
>
> ...ah yes, http://wg21.link/N4186


Indeed, and it's also
https://cplusplus.github.io/EWG/ewg-active.html#152

--
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/CAFk2RUZA0d_%2Bzqf3HoaBP0HX6nFMQAdNZwehFMDFt8_VBgptUg%40mail.gmail.com.

.


Author: Guillaume Racicot <gufideg@gmail.com>
Date: Fri, 8 Jul 2016 10:18:09 -0700 (PDT)
Raw View
------=_Part_14473_1715476272.1467998290006
Content-Type: multipart/alternative;
 boundary="----=_Part_14474_2100418523.1467998290006"

------=_Part_14474_2100418523.1467998290006
Content-Type: text/plain; charset=UTF-8

No way!! Even the same syntax!

On Wednesday, 6 July 2016 19:48:50 UTC-4, Ville Voutilainen wrote:
>
> On 7 July 2016 at 02:36, T. C. <rs2...@gmail.com <javascript:>> wrote:
> > I'm fairly sure I've seen something like this before...
> >
> > ...ah yes, http://wg21.link/N4186
>
>
> Indeed, and it's also
> https://cplusplus.github.io/EWG/ewg-active.html#152
>

--
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/5c7da596-9fe4-48ba-bd34-7e8a2ef9b46b%40isocpp.org.

------=_Part_14474_2100418523.1467998290006
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">No way!! Even the same syntax!<br><br>On Wednesday, 6 July=
 2016 19:48:50 UTC-4, Ville Voutilainen  wrote:<blockquote class=3D"gmail_q=
uote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;pad=
ding-left: 1ex;">On 7 July 2016 at 02:36, T. C. &lt;<a href=3D"javascript:"=
 target=3D"_blank" gdf-obfuscated-mailto=3D"k_FBfsLyCAAJ" rel=3D"nofollow" =
onmousedown=3D"this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"t=
his.href=3D&#39;javascript:&#39;;return true;">rs2...@gmail.com</a>&gt; wro=
te:
<br>&gt; I&#39;m fairly sure I&#39;ve seen something like this before...
<br>&gt;
<br>&gt; ...ah yes, <a href=3D"http://wg21.link/N4186" target=3D"_blank" re=
l=3D"nofollow" onmousedown=3D"this.href=3D&#39;http://www.google.com/url?q\=
x3dhttp%3A%2F%2Fwg21.link%2FN4186\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG=
yzDmLDzLUSxooAHmZCqkrL0fMVg&#39;;return true;" onclick=3D"this.href=3D&#39;=
http://www.google.com/url?q\x3dhttp%3A%2F%2Fwg21.link%2FN4186\x26sa\x3dD\x2=
6sntz\x3d1\x26usg\x3dAFQjCNGyzDmLDzLUSxooAHmZCqkrL0fMVg&#39;;return true;">=
http://wg21.link/N4186</a>
<br>
<br>
<br>Indeed, and it&#39;s also
<br><a href=3D"https://cplusplus.github.io/EWG/ewg-active.html#152" target=
=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;https://www.go=
ogle.com/url?q\x3dhttps%3A%2F%2Fcplusplus.github.io%2FEWG%2Fewg-active.html=
%23152\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEGODtlUN6e_QShqEKcU6pZJedJ_Q=
&#39;;return true;" onclick=3D"this.href=3D&#39;https://www.google.com/url?=
q\x3dhttps%3A%2F%2Fcplusplus.github.io%2FEWG%2Fewg-active.html%23152\x26sa\=
x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEGODtlUN6e_QShqEKcU6pZJedJ_Q&#39;;return =
true;">https://cplusplus.github.io/<wbr>EWG/ewg-active.html#152</a>
<br></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/5c7da596-9fe4-48ba-bd34-7e8a2ef9b46b%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/5c7da596-9fe4-48ba-bd34-7e8a2ef9b46b=
%40isocpp.org</a>.<br />

------=_Part_14474_2100418523.1467998290006--

------=_Part_14473_1715476272.1467998290006--

.