Skip to content

clang assert: "Assertion `getDepthAndIndex(NewParam).first == 0 && "Unexpected template parameter depth"' failed." #128691

@hokein

Description

@hokein

https://godbolt.org/z/TPjf1YYY3

A regression from #111143

template <typename = void>
class NewDeleteAllocator;

template <>
struct NewDeleteAllocator<> {
  template <typename>
  NewDeleteAllocator();
};

template <typename>
struct NewDeleteAllocator : NewDeleteAllocator<> {
  using NewDeleteAllocator<>::NewDeleteAllocator;
};

void test() { NewDeleteAllocator abc; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"crashPrefer [crash-on-valid] or [crash-on-invalid]

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions