[Bug c++/87478] Hidden member function falsely takes part in qualified name lookup

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Oct 1 13:31:00 GMT 2018


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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Confirmed, not a regression. Reduced:

template<typename> struct is_int { };
template<> struct is_int<int> { using type = void; };

class MyTag {};

template<typename> struct is_tag { };
template<> struct is_tag<MyTag> { using type = void; };

struct Base
{
    template <typename RType>
    typename is_int<RType>::type create(RType)
    {
    }
};

struct Derived : Base
{
    using Base::create;

    template <typename Tag>
    typename is_tag<Tag>::type create(Tag)
    {
    }
};

int main()
{
    Derived d;

    d.create(MyTag());
    d.create(0);
}


More information about the Gcc-bugs mailing list