c++/10849: [3.3/3.4 regression] Cannot define an out-of-class specialization of a private nested template class

[email protected]
Newsgroups gmane.comp.gcc.prs
Message-ID <[email protected]>
>Number:         10849
>Category:       c++
>Synopsis:       [3.3/3.4 regression] Cannot define an out-of-class specialization of a private nested template class
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Sun May 18 21:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Giovanni Bajo
>Release:        3.3 and 3.4 (CVS 20030503)
>Organization:
>Environment:
i686-pc-cygwin
>Description:
Reported by Ole Laursen here:
http://gcc.gnu.org/ml/gcc/2003-05/msg01686.html

---------------------------------------------
class X
{
private:
    template <typename T> struct Y;
};

template <> 
struct X::Y<int>
{};
---------------------------------------------
gccbug5.cpp:4: error: `template<class T> struct X::Y' is private
gccbug5.cpp:9: error: within this context

Regression on the 3.3 branch and mainline (3.2.2 and 2.95
worked fine).
>How-To-Repeat:
Compile the above snippet
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.