The friend declaration should be rejected because the template parameter list
does not match the template definition in __detail.   If the friend declaration
appears in the same namespace as the original template and does not use a
qualified name, the expected error is issued.

namespace __detail
{
 template<typename _Key, typename _Value, typename _Ex, bool __unique,
   typename _Hashtable> struct _Map_base { };
}

struct  _Hashtable
{
 template<typename _Key2, typename _Pair, typename _Hashtable>
           friend struct __detail::_Map_base;
};


-- 
           Summary: Friend class template declaration does not check for
                    matching template parameters
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jhs at edg dot com


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

Reply via email to