https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115280
Bug ID: 115280 Summary: Concept can access private alias in a classs Product: gcc Version: 14.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fchelnokov at gmail dot com Target Milestone: --- This program ``` #include <concepts> class A { using X = int; }; template<typename T> concept C = requires(T t) { { t } -> std::convertible_to<A::X>; }; static_assert(C<int>); ``` is invalid and rejected by Clang with the error: > error: 'X' is a private member of 'A' But GCC accepts the program just fine, which looks wrong, online demo: https://gcc.godbolt.org/z/nra6fExxG