Topic: Nested template full specialization
Author: Nemo Yu <mzer0.yu@gmail.com>
Date: Thu, 28 Apr 2016 01:15:27 +0800
Raw View
--001a11407a8c5a0b0c05317a8ec7
Content-Type: text/plain; charset=UTF-8
Full specialization of nested template is not allowed, e.g.
template<typename> struct s {
template<typename> ss {};
template<> ss<void> {};
};
// I don't know how do you write highlighted codes, a plugin?
I don't think it is a good design, although we have workarounds.
--
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/CABwAg_zRf3OSnd%3D2z58_ODhEhS4OVUGxYgAwPOGOaqxc7L47yQ%40mail.gmail.com.
--001a11407a8c5a0b0c05317a8ec7
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Full specialization of nested template is not allowed, e.g=
..<div><br></div><div>template<typename> struct s {</div><blockquote s=
tyle=3D"margin:0 0 0 40px;border:none;padding:0px"><div>template<typenam=
e> ss {};</div></blockquote><blockquote style=3D"margin:0 0 0 40px;borde=
r:none;padding:0px"><div>template<> ss<void> {};</div></blockqu=
ote><div>=C2=A0};</div><div><br></div><div>// I don't know how do you w=
rite highlighted codes, a plugin?</div><div><br></div><div>I don't thin=
k it is a good design, although we have workarounds.</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/CABwAg_zRf3OSnd%3D2z58_ODhEhS4OVUGxYg=
AwPOGOaqxc7L47yQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CABwAg_zRf3OSnd=
%3D2z58_ODhEhS4OVUGxYgAwPOGOaqxc7L47yQ%40mail.gmail.com</a>.<br />
--001a11407a8c5a0b0c05317a8ec7--
.
Author: Jim Porter <jvp4846@g.rit.edu>
Date: Thu, 28 Apr 2016 14:55:04 -0500
Raw View
On 4/27/2016 12:15 PM, Nemo Yu wrote:
> Full specialization of nested template is not allowed, e.g.
>
> template<typename> struct s {
>
> template<typename> ss {};
>
> template<> ss<void> {};
>
> };
As you probably know, you can't fully specialize a nested template
without also specializing the template that contains it. Given that
partial specialization of nested templates is allowed without this
restriction, it seems reasonable to me to allow full-specialization
under the same rules. I'm not a language lawyer, though.
- 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/nftpr9%24sor%241%40ger.gmane.org.
.
Author: Faisal Vali <faisalv@gmail.com>
Date: Sat, 30 Apr 2016 07:35:52 -0500
Raw View
This might be of relevance:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4090.pdf
Faisal Vali
On Thu, Apr 28, 2016 at 2:55 PM, Jim Porter <jvp4846@g.rit.edu> wrote:
> On 4/27/2016 12:15 PM, Nemo Yu wrote:
>>
>> Full specialization of nested template is not allowed, e.g.
>>
>> template<typename> struct s {
>>
>> template<typename> ss {};
>>
>> template<> ss<void> {};
>>
>> };
>
>
> As you probably know, you can't fully specialize a nested template without
> also specializing the template that contains it. Given that partial
> specialization of nested templates is allowed without this restriction, it
> seems reasonable to me to allow full-specialization under the same rules.
> I'm not a language lawyer, though.
>
> - 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/nftpr9%24sor%241%40ger.gmane.org.
--
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/CABsSThoT52Nq5v_dEngpmvzJZ6mY9LqBiQdp80J5j3aQoaER5Q%40mail.gmail.com.
.