[Bug c++/86747] [8/9 Regression] rejects-valid with redundant friend declaration

aoliva at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 16 15:50:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86747

Alexandre Oliva <aoliva at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |aoliva at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |aoliva at gcc dot gnu.org

--- Comment #4 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Created attachment 45022
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45022&action=edit
candidate patch

When entering the context of the declaration to look up a similar member, we're
entering the context of the A<T> template rather than of the A<double>
instantiation, because context hasn't been tsubsted yet.  The declaration
within the A<T> template obviously won't match the substituted A<double> scope
in the nested template parm declaration.


More information about the Gcc-bugs mailing list