[Bug c++/94310] using constructor inheritance breaks the code

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Apr 19 04:44:49 GMT 2020


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

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
The difference stems from the fact that in this test:

template<typename>
struct B { };

template<typename... Types>
struct A : public B<Types>... {
    using B<Types>::B...; // #1
    using B<Types>::operator=...; // #2
};

int main() {}

when parsing B<Types> in #2 cp_parser_lookup_name finds #1, which is a
dependent USING_DECL.  strip_using_decl doesn't do anything with such a
USING_DECL, so we think that we haven't found a template name.


More information about the Gcc-bugs mailing list