[PATCH] D134128: Resubmit an implemention for constrained template template parameters [P0857R0 Part B]
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 21 06:59:33 PDT 2022
erichkeane added a comment.
In D134128#3805675 <https://reviews.llvm.org/D134128#3805675>, @lime wrote:
> I have not looked deep into D126907 <https://reviews.llvm.org/D126907>, but the rule it referred seems related to something as follows:
>
> template <typename, typename> concept C = true;
>
> template <typename T>
> struct S1 {
> template <template <C<T> U> typename> friend void foo() {}
> };
>
> // Does the rule say these two functions are not the same?
> template <typename T>
> struct S2 {
> template <template <C<T> U> typename> friend void foo() {}
> };
>
> BTW, I could not image a non-template friend declaration with a requires-clause...
You edited while I was answering, but I believe the answer is the same: those are not the same thanks to temp.friend p9.
That D126907 <https://reviews.llvm.org/D126907> is actually NOT just the friends, this is an entire omnibus "fix the deferred concepts implementation". The original concepts implementation used a greedy instantiation mechanism, which is unfortunately not permitted by the standard. This patch is delaying the concept instantiation until it is required for checking. Along the way that 'friend' example was run across.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134128/new/
https://reviews.llvm.org/D134128
More information about the cfe-commits
mailing list