public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/3825: Problems in instantiation of generic members.
@ 2003-01-03 12:46 Nathanael Nerode
  0 siblings, 0 replies; 3+ messages in thread
From: Nathanael Nerode @ 2003-01-03 12:46 UTC (permalink / raw)
  To: gdr; +Cc: gcc-prs

The following reply was made to PR c++/3825; it has been noted by GNATS.

From: Nathanael Nerode <neroden@twcny.rr.com>
To: gdr@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
   gcc-bugs@gcc.gnu.org, fasbjx@free.fr
Cc:  
Subject: Re: c++/3825: Problems in instantiation of generic members.
Date: Fri, 3 Jan 2003 07:42:48 -0500

 I believe the code given is substantially wrong.   Consider, however, the 
 following testcase:
 ---
 template< typename X, typename Y, int = 1 >
  struct C1 {
   template< int, int >
    struct C2 {
      enum { v = 0 };
    };
 };
 
 enum Xx { a, b, c, d };
 
 template <> template <>
  struct C1< Xx, Xx >::C2< a, a > {
    enum { v = 1 };
  };
 
 template< typename X >
  struct D: public C1< X, X, 5 > {
   template< int, int > struct C2 {
      enum { v = 2 };
    };
 
 #include <iostream>
  int main() {
    std::cout << D< Xx >::C2< a, a >::v << std::endl;
 // And the next case...
    std::cout << C1< Xx, Xx >::C2< a, a >::v << std::endl;
  }
 ---
 
 This compiles perfectly and gives correct results.
 
 So I'm guessing this can be closed...
 
 Do I need to add a testcase for this, or are there enough already?


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

* Re: c++/3825: Problems in instantiation of generic members.
@ 2003-01-13 15:57 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-01-13 15:57 UTC (permalink / raw)
  To: fasbjx, gcc-bugs, gcc-prs, gdr

Synopsis: Problems in instantiation of generic members.

State-Changed-From-To: feedback->closed
State-Changed-By: bangerth
State-Changed-When: Mon Jan 13 07:57:04 2003
State-Changed-Why:
    The original code snippet is wrong at many places, among
    which are
    - explicitly specializing inner and outer class at the
      same time requires template<> twice
    - explicitly specializing C1::C2 _inside_ D is not allowed
    
    Since the ICE is gone with recent versions, I close this
    report.
    
    W.

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


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

* Re: c++/3825: Problems in instantiation of generic members.
@ 2003-01-11 20:44 neroden
  0 siblings, 0 replies; 3+ messages in thread
From: neroden @ 2003-01-11 20:44 UTC (permalink / raw)
  To: fasbjx, gcc-bugs, gcc-prs, gdr

Synopsis: Problems in instantiation of generic members.

State-Changed-From-To: analyzed->feedback
State-Changed-By: neroden
State-Changed-When: Sat Jan 11 12:44:27 2003
State-Changed-Why:
    I need feedback from someone who can declare the legality of the testcase.
    :-/

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


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

end of thread, other threads:[~2003-01-13 15:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-03 12:46 c++/3825: Problems in instantiation of generic members Nathanael Nerode
2003-01-11 20:44 neroden
2003-01-13 15:57 bangerth

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).