From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26967 invoked by alias); 3 Jan 2003 12:46:07 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 26939 invoked by uid 71); 3 Jan 2003 12:46:06 -0000 Date: Fri, 03 Jan 2003 12:46:00 -0000 Message-ID: <20030103124606.26938.qmail@sources.redhat.com> To: gdr@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Nathanael Nerode Subject: Re: c++/3825: Problems in instantiation of generic members. Reply-To: Nathanael Nerode X-SW-Source: 2003-01/txt/msg00196.txt.bz2 List-Id: The following reply was made to PR c++/3825; it has been noted by GNATS. From: Nathanael Nerode 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 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?