A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/CWG/issues/2610.html below:

CWG Issue 2610

This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-04-13

2610. Indirect private base classes in aggregatesSection: 9.5.2  [dcl.init.aggr]     Status: C++23     Submitter: Chris Bowler     Date: 2022-07-21

[Accepted as a DR at the November, 2022 meeting.]

The wording appears to prohibit aggregates from having indirect private base classes. That does not match existing practice and is an unnecessary restriction. For example:

#include <type_traits>

struct B1 {};
struct B2 : private B1 {};
struct S : public B2 {};

void f() {
  static_assert(std::is_aggregate<S>::value);
}

Proposed resolution (approved by CWG 2022-08-26):

Change in 9.5.2 [dcl.init.aggr] paragraph 1 as follows:

An aggregate is an array or a class (Clause 11 [class]) with

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4