This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/3634: partial specialization envolving nested classes is broken

[Get raw message]

> 
> Synopsis: partial specialization envolving nested classes is broken
> 
> State-Changed-From-To: open->closed
> State-Changed-By: lerdsuwa
> State-Changed-When: Sat Nov 17 00:44:13 2001
> State-Changed-Why:
>     Not a bug.  typename outer<T>::inner is a non-deduce context.
>     The compiler is not allowed to deduce that 'T' is 'int'.  So
>     the partial specialization is never used by gcc.
> 
Sorry, I can't agree with this argumentation. There is nothing to deduce
here. The only thing the compiler has to check is whether the template
argument is a local class `inner' of ANY instance of a given template class
`outer'. I think, this could be done without any type deduction,
since the internal description of `inner' surely contains some kind
of reference to its containing class.

If you forbid partial specializations for local classes, how should
we write traits classes for iterators, which are most naturally defined
as local classes of their containers?

With best regards,
Ewgenij Gawrilow


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]