This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Fw: Re: Explicity template specialization issue
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Himanshu12 G <himanshu12 dot g at tcs dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 21 Sep 2011 13:07:20 +0100
- Subject: Re: Fw: Re: Explicity template specialization issue
- References: <OFD7B64CF2.C5736848-ON65257912.003A5EA3-65257912.003A5EAA@tcs.com>
On 21 September 2011 11:37, Himanshu12 G wrote:
> Hi Jonathan,
>
> Thanks for the quick reply.
>
> In your reply, it is specializing inner class for 'void' with the outer
> class specialization as 'int'. This works fine but the specialization for
> outer class is not known at compile time. I mean the outer class template
> parameter is only known at run time
I'm not sure what you mean here, template arguments must be known at
compile-time.
I'm going to assume you mean you don't want to specialize the outer template.
> and it is also used in the constructor
> of inner template class. This is a specific case for template. Is this
> supported in GCC in any particular way?
No, as you already pointed out the standard doesn't allow it.
> Notice: The information contained in this e-mail
> blah blah blah
Please don't send notices like this to the gcc lists, see
http://gcc.gnu.org/lists.html#policies