From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2929F3858D39; Wed, 29 May 2024 16:31:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2929F3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717000266; bh=z0kQlU0y88iE/6RD5pDS6A4FB5fIhwC8DHn1NjBPXAw=; h=From:To:Subject:Date:From; b=kQElFy3BihU5TFvJ29RUl5WnD1tsiKvFrqVd0ZdokvO31H7k9R5RhXdmyXsLH22BO gvE6I+3Cjs0ScP45vAyb/pbV2kax++dW9tg6wEMDNfxAiGvWSspS1TFEeRXjqXZhS9 InqdJs7CCUR7WoLo8JlN+zOJPIVmZY4qUMwhnk0g= From: "fchelnokov at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/115280] New: Concept can access private alias in a classs Date: Wed, 29 May 2024 16:31:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fchelnokov at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115280 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 class A { using X =3D int; }; template concept C =3D requires(T t) { { t } -> std::convertible_to; }; static_assert(C); ``` 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=