From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D56A03858C41; Fri, 9 Jun 2023 16:19:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D56A03858C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686327541; bh=SvmqoCDQtfyO8qrNLcgna5N1ymDXoV1RTRMBwdTTyIg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=L862aspLweMjyhM2CZViH7OP8l3nHMvbHNIkg6MJWqVe9aLIuU415GC6l+mIa7OKR DEF7XBink+fpd/kFl99BofwKgqtPWiYynNlhaXw9fC0bbEFKT86cAPWnBJ5Y/9kU7p zqyKLVmQRtoPu5ZYK5cg2FMajxgP29kjg/FmxDHU= From: "jack.cui2 at foxmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110195] defaulted constructor does not respect the private accessor Date: Fri, 09 Jun 2023 16:19:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jack.cui2 at foxmail 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: Message-ID: In-Reply-To: References: 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=3D110195 --- Comment #5 from jack --- (In reply to Andrew Pinski from comment #4) > Note clang accepts Single{} where Single is an empty class also before C+= +20 > ... I think Clang accepting empty class case does not neccessarily mean it is correct. Because this one defeat the purpose of the uniform initialization and proba= bly a surprise that use can create it even if it is private.=