Skip to content

Erroneous overload resolution with multiple direct bases #20596

@K-ballo

Description

@K-ballo
Bugzilla Link 20222
Version trunk
OS All
CC @DougGregor

Extended Description

The following snippet results in a static_assert failure, I believe the overload resolution should be ambiguous instead:

    template <int I>
    struct int_ {};

    template <int I>
    void foo(int_<I>){ static_assert(I != 1, ""); }

    struct bar : int_<0>, int_<1> {};

    int main() {
      foo(bar{});
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions