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

            Bug ID: 86464
           Summary: Delegating constructor causes error if parameter has
                    same name as class
           Product: gcc
           Version: 8.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gar...@ignition-web.co.uk
  Target Milestone: ---

struct foo
{
    foo( foo const & ) = default;
    foo( foo const & foo, int )
        : foo{ foo }
        {}
    foo( foo const & foo, char )
        : foo::foo{ foo } // added a redundant type qualifier
        {}
};

<source>: In constructor 'foo::foo(const foo&, int)':

<source>:5:11: error: 'struct foo foo::foo' is not a non-static data member of
'foo'

         : foo{ foo }

           ^~~

Compiler returned: 1

Reply via email to