[Bug c++/56333] New: cannot use typedef name in inheriting constructor

potswa at mac dot com gcc-bugzilla@gcc.gnu.org
Fri Feb 15 00:54:00 GMT 2013


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

             Bug #: 56333
           Summary: cannot use typedef name in inheriting constructor
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: potswa@mac.com


struct b {};
struct d : b {
        using t = b;
        using t::t;
};

error: no members matching ‘d::t {aka b}::t’ in ‘using t = struct b {aka struct
b}’

This is defined by §3.4.3.1/2:

In a lookup in which the constructor is an acceptable lookup result and the
nested-name-specifier nominates a class C:

…

— in a using-declaration (7.3.3) that is a member-declaration, if the name
specified after the nested-name-specifier is the same as the identifier or the
simple-template-id’s template-name in the last component of the
nested-name-specifier,

the name is instead considered to name the constructor of class C.



More information about the Gcc-bugs mailing list