[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

David Goldblatt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 4 14:48:09 PDT 2023


davidtgoldblatt added a comment.

This version of the commit also introduces some breakages; as before I'm not sure if it's the code or the diff that's incorrect.

Repro:

  enum class Enum { E1 };
  
  template <typename T1>
  inline constexpr bool some_concept = true;
  
  template <typename T1, Enum>
  struct S {
    template <typename T2>
    requires some_concept<T2>
    void func(const T2 &);
  };
  
  template <typename T1>
  struct S<T1, Enum::E1> {
    template <typename T2>
    requires some_concept<T2>
    void func(const T2 &);
  };
  
  template <typename T1>
  template <typename T2>
  requires some_concept<T2>
  inline void S<T1, Enum::E1>::func(const T2 &) {}

Error:

  repro.cpp:23:30: error: out-of-line definition of 'func' does not match any declaration in 'S<type-parameter-0-0, Enum::E1>'
  inline void S<T1, Enum::E1>::func(const T2 &) {}


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146178/new/

https://reviews.llvm.org/D146178



More information about the llvm-commits mailing list