http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52625

             Bug #: 52625
           Summary: Incorrect specialization semantics of friend class
                    template declaration
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: daniel.krueg...@googlemail.com


gcc 4.8.0 20120318 (experimental) rejects the following code:

//-----
template<class>
class base {};

class derived : public base<derived>
{
 template<class> friend class base; // Error
};
//-----

"error: specialization of 'base<derived>' after instantiation"

This code should be accepted, the friend declaration does not declare any
specialization.

Reply via email to