Skip to content

Possible bug in implementation of P3310 #125290

@higher-performance

Description

@higher-performance

I think #124137 may have introduced a bug. The following code no longer compiles: https://godbolt.org/z/G77fMj1nh

struct None {};
template<class T>
struct Node { using Tail = T; };

template <template<class> class Fixture, typename List>
struct Recursive {
  static void foo() {
    return Recursive<Fixture, typename List::Tail>::foo();
  }
};

template <template<class> class Fixture>
struct Recursive<Fixture, None> {
  static void foo() {}
};

template <class>
class Monadic {};

template <class...>
class Variadic {};

int main() {
  Recursive<Monadic, Node<None> >::foo();  // success
  Recursive<Variadic, Node<None> >::foo();  // error
}

It seems that the partial specialization struct Recursive<Fixture, None> is completely missed by the compiler now... but only when the Fixture is variadic. I assume this is not supposed to be the case?

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second party

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions