erichkeane added a comment. In D126907#3849583 <https://reviews.llvm.org/D126907#3849583>, @erichkeane wrote:
> In D126907#3846591 <https://reviews.llvm.org/D126907#3846591>, @erichkeane > wrote: > >> In D126907#3844788 <https://reviews.llvm.org/D126907#3844788>, @BertalanD >> wrote: >> >>> 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>); >>> ^ >> >> Thanks for the report! I'll look into it ASAP. > > Quick note: I believe I understand the cause of this, which requires a bit > more work than I otherwise would have expected. I have a candidate patch I'm > running through my testing right now that should fix this, but it still needs > cleaning up. Expect it in the next day or two if all goes well. In D126907#3850735 <https://reviews.llvm.org/D126907#3850735>, @BertalanD wrote: > In D126907#3849583 <https://reviews.llvm.org/D126907#3849583>, @erichkeane > wrote: > >> In D126907#3846591 <https://reviews.llvm.org/D126907#3846591>, @erichkeane >> wrote: >> >>> In D126907#3844788 <https://reviews.llvm.org/D126907#3844788>, @BertalanD >>> wrote: >>> >>>> 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>); >>>> ^ >>> >>> Thanks for the report! I'll look into it ASAP. >> >> Quick note: I believe I understand the cause of this, which requires a bit >> more work than I otherwise would have expected. I have a candidate patch >> I'm running through my testing right now that should fix this, but it still >> needs cleaning up. Expect it in the next day or two if all goes well. > > Thank you for your quick response and for creating this massive yak shave of > a patch :D > > Please ping me if you want me to test the fix on our code, or if I can help > in some other way. Thanks for the offer! I ended up taking a less-aggressive yak shave on this one, and have a patch here: https://reviews.llvm.org/D135772 If you could give it a try, it would be very useful! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126907/new/ https://reviews.llvm.org/D126907 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits