[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compilation with clang

From: David Kastrup
Subject: Re: compilation with clang
Date: Wed, 07 Nov 2018 19:47:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Werner LEMBERG <address@hidden> writes:

>> And answers are trickling in; see thread starting with
> And here's the definite answer from a clang developer:
>   The rule for determining when a base class function declaration
>   introduced by a using-declaration is hidden by a derived class
>   function declaration does not take the template parameter list into
>   account:

Huh?  This link states:

    When a using-declarator brings declarations from a base class into a
    derived class, member functions and member function templates in the
    derived class override and/or hide member functions and member
    function templates with the same name, parameter-type-list,
    cv-qualification, and ref-qualifier (if any) in a base class (rather
    than conflicting).

The parameter-type-list is a different one in this example since they
contain a different member function pointer type.  Which is the reason
we need the whole hooplahoop in the first place.

>   So clang's behaviour is conforming and gcc's behaviour is not. At
>   the very least, though, we should issue a warning for the using
>   declaration, because this is a surprising rule.

I disagree.

David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]