public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/7402: Partial Template Specialization Problem
@ 2002-07-25  7:52 lerdsuwa
  0 siblings, 0 replies; 2+ messages in thread
From: lerdsuwa @ 2002-07-25  7:52 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jfranzoy, nobody

Synopsis: Partial Template Specialization Problem

State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Thu Jul 25 07:52:55 2002
State-Changed-Why:
    Not a bug.  The compiler has to be able to deduce what T1 
    is before the partial specialization can be used (according
    to section 14.5.4.1 para 2 of the C++ Standard).  But
    because the following
      typename TemplateParameterGenerator<T1>::Result
    is treated as a non-deduced context (14.8.2.4 p4).
    So T1 can never be deduced and the partial specialization
    is never used.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7402


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c++/7402: Partial Template Specialization Problem
@ 2002-07-25  6:56 jfranzoy
  0 siblings, 0 replies; 2+ messages in thread
From: jfranzoy @ 2002-07-25  6:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7402
>Category:       c++
>Synopsis:       Partial Template Specialization Problem
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 25 06:56:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     jfranzoy@yahoo.com.ar
>Release:        g++ version 3.0.4
>Organization:
>Environment:
g++ -v
Reading specs from /usr/local/gcc-3.0.4/lib/gcc-lib/sparc-sun-solaris2.6/3.0.4/specs
Configured with: ../gcc-3.0.4/configure --prefix=/usr/local/gcc-3.0.4 --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as --enable-threads=posix --enable-languages=c++
Thread model: posix
gcc version 3.0.4


uname -a
SunOS ultra5 5.6 Generic_105181-20 sun4u sparc SUNW,Ultra-5_10

/usr/platform/sun4u/sbin/prtdiag -v
System Configuration:  Sun Microsystems  sun4u Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 360MHz)
System clock frequency: 90 MHz
Memory size: 256 Megabytes

========================= CPUs =========================

                    Run   Ecache   CPU    CPU
Brd  CPU   Module   MHz     MB    Impl.   Mask
---  ---  -------  -----  ------  ------  ----
 0     0     0      360     0.2   12       9.1


========================= IO Cards =========================


No failures found in System
===========================

========================= HW Revisions =========================

ASIC Revisions:
---------------

System PROM revisions:
----------------------

>Description:
The compiler does not see a partial template specialization when one of the template-argument-list (those that follow the class template name) is an inner type of another template instantiation.
>How-To-Repeat:
g++ PossibleGCCBug.cpp
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="PossibleGCCBug.cpp"
Content-Disposition: inline; filename="PossibleGCCBug.cpp"


#include	<iostream>

template<class T>
struct TemplateParameterGenerator
{
	typedef	T		Result;
};

template<class TList>
class SomeClassTemplate;

template<class T1>
class SomeClassTemplate< typename TemplateParameterGenerator<T1>::Result >
{
};

int main()
{
	SomeClassTemplate<int> fi;
}

	


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-25 14:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-25  7:52 c++/7402: Partial Template Specialization Problem lerdsuwa
  -- strict thread matches above, loose matches on Subject: below --
2002-07-25  6:56 jfranzoy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).