[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2
    Daniel Bertalan via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Sat Oct  8 02:29:02 PDT 2022
    
    
  
BertalanD added a comment.
Hi @erichkeane,
This change broke compilation of this program (https://godbolt.org/z/KrWGvcf8h; reduced from https://github.com/SerenityOS/ladybird):
  template<typename T, typename U>
  constexpr bool IsSame = false;
  
  template<typename T>
  constexpr bool IsSame<T, T> = true;
  
  template<typename T>
  struct Foo {
      template<typename U>
      Foo(U&&) requires (!IsSame<U, Foo>);
  };
  
  template<>
  struct Foo<void> : Foo<int> {
      using Foo<int>::Foo;
  };
  
  Foo<void> test() { return 0; }
  <source>:18:27: error: invalid reference to function 'Foo': constraints not satisfied
  Foo<void> test() { return 0; }
                            ^
  <source>:10:24: note: because substituted constraint expression is ill-formed: value of type '<dependent type>' is not contextually convertible to 'bool'
      Foo(U&&) requires (!IsSame<U, Foo>);
                         ^
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126907/new/
https://reviews.llvm.org/D126907
    
    
More information about the cfe-commits
mailing list