Topic: [Deficiency?] Non-Type Template Parameters


Author: Jakob Riedle <jakob.riedle@gmail.com>
Date: Wed, 7 Feb 2018 01:38:55 -0800 (PST)
Raw View
------=_Part_6635_914296656.1517996336004
Content-Type: multipart/alternative;
 boundary="----=_Part_6636_2079685154.1517996336004"

------=_Part_6636_2079685154.1517996336004
Content-Type: text/plain; charset="UTF-8"

I should have phrased the question more specifically: Why is the user
defined conversion operator not called instead?

--
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/7148df0e-e800-4f84-8b7f-0c7c6f651479%40isocpp.org.

------=_Part_6636_2079685154.1517996336004
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I should have phrased the question more specifically: Why =
is the user defined conversion operator not called instead?</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/7148df0e-e800-4f84-8b7f-0c7c6f651479%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/7148df0e-e800-4f84-8b7f-0c7c6f651479=
%40isocpp.org</a>.<br />

------=_Part_6636_2079685154.1517996336004--

------=_Part_6635_914296656.1517996336004--

.


Author: =?UTF-8?Q?Jonathan_M=c3=bcller?= <jonathanmueller.dev@gmail.com>
Date: Wed, 7 Feb 2018 11:00:16 +0100
Raw View
On 07.02.2018 10:32, Jakob Riedle wrote:
> Hi Folks,
>
> recently, it struck me, when I tried to do something like this:
> https://godbolt.org/g/ZS3M6t
> Is there any particular reason, Non-Type Template Parameters will/can
> not be implicitly casted?
>
> Maybe, you have an idea, why this is the way it is and whether it has
> been discussed before?
>
> I look forward to your feedback.
>
> Thank you,
> Jakob
>

They are implicitly casted, but what you wrote is a function
declaration: https://godbolt.org/g/oXymN6

--
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/5ea32922-caa6-347d-815e-f5386b4f1cec%40gmail.com.

.


Author: Jakob Riedle <jakob.riedle@gmail.com>
Date: Wed, 7 Feb 2018 02:08:36 -0800 (PST)
Raw View
------=_Part_6872_909115073.1517998116161
Content-Type: multipart/alternative;
 boundary="----=_Part_6873_315463853.1517998116161"

------=_Part_6873_315463853.1517998116161
Content-Type: text/plain; charset="UTF-8"

Thank you for your quick reply, Jonathan!

But wait, where is the difference to that? https://godbolt.org/g/ewc6EQ
<https://godbolt.org/g/BnvhgC>
The compiler clearly knows, the supplied thing has to be a value, why does
it not act accordingly?

--
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/561943f2-3f79-4e7a-857d-331a0654b386%40isocpp.org.

------=_Part_6873_315463853.1517998116161
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thank you for your quick reply, Jonathan!<div><br></div><d=
iv>But wait, where is the difference to that?=C2=A0<a href=3D"https://godbo=
lt.org/g/BnvhgC">https://godbolt.org/g/ewc6EQ</a></div><div>The compiler cl=
early knows, the supplied thing has to be a value, why does it not act acco=
rdingly?</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/561943f2-3f79-4e7a-857d-331a0654b386%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/561943f2-3f79-4e7a-857d-331a0654b386=
%40isocpp.org</a>.<br />

------=_Part_6873_315463853.1517998116161--

------=_Part_6872_909115073.1517998116161--

.


Author: Jakob Riedle <jakob.riedle@gmail.com>
Date: Wed, 7 Feb 2018 02:14:16 -0800 (PST)
Raw View
------=_Part_6519_987980599.1517998456683
Content-Type: multipart/alternative;
 boundary="----=_Part_6520_1580303487.1517998456683"

------=_Part_6520_1580303487.1517998456683
Content-Type: text/plain; charset="UTF-8"

I got the point, behaviour cannot change, because it would then become
ambiguous: https://godbolt.org/g/P9uq8R

Thank you for your help, though!

--
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/e7e75443-ae54-450a-a972-716ef2476130%40isocpp.org.

------=_Part_6520_1580303487.1517998456683
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I got the point, behaviour cannot change, because it would=
 then become ambiguous:=C2=A0<a href=3D"https://godbolt.org/g/P9uq8R">https=
://godbolt.org/g/P9uq8R</a><div><br></div><div>Thank you for your help, tho=
ugh!</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/e7e75443-ae54-450a-a972-716ef2476130%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/e7e75443-ae54-450a-a972-716ef2476130=
%40isocpp.org</a>.<br />

------=_Part_6520_1580303487.1517998456683--

------=_Part_6519_987980599.1517998456683--

.