[Bug c++/104141] nested requires statement causes access to private member function

2022-01-21 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104141 --- Comment #6 from Fedor Chelnokov --- I agree that Clang behavior here might be wrong. Submitted https://github.com/llvm/llvm-project/issues/53334

[Bug c++/104141] nested requires statement causes access to private member function

2022-01-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104141 --- Comment #5 from Andrew Pinski --- (In reply to Fedor Chelnokov from comment #4) > A::f() does not depend on template parameter, so the rules here are somewhat > different than in T::f(). A possible answer: > https://stackoverflow.com/a/70783

[Bug c++/104141] nested requires statement causes access to private member function

2022-01-21 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104141 --- Comment #4 from Fedor Chelnokov --- In ``` template concept t = requires{ A::f(); }; ``` A::f() does not depend on template parameter, so the rules here are somewhat different than in T::f(). A possible answer: https://stackoverflow.com/a/

[Bug c++/104141] nested requires statement causes access to private member function

2022-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104141 --- Comment #3 from Andrew Pinski --- Looks like clang does not always do access checking for static functions calls inside requires. I know GCC has a bug there for dealing with caching in the wrong context (I don't have the bug #).

[Bug c++/104141] nested requires statement causes access to private member function

2022-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104141 --- Comment #2 from Andrew Pinski --- Note clang fails the static_assert with this one but that does not make sense at all: class A{ static void f(); }; template concept t = requires{ A::f(); }; static_assert( !t );

[Bug c++/104141] nested requires statement causes access to private member function

2022-01-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104141 Andrew Pinski changed: What|Removed |Added Summary|Access to private member|nested requires statement