A RetroSearch Logo

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

Search Query:

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

CWG Issue 1746

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

2025-08-11

1746. Are volatile scalar types trivially copyable?Section: 6.9  [basic.types]     Status: C++14     Submitter: Walter Brown     Date: 2013-09-06

[Moved to DR at the February, 2014 meeting.]

According to 6.9 [basic.types] paragraph 9,

Arithmetic types (6.9.2 [basic.fundamental]), enumeration types, pointer types, pointer to member types (6.9.4 [basic.compound]), std::nullptr_t, and cv-qualified versions of these types (6.9.5 [basic.type.qualifier]) are collectively called scalar types... Scalar types, trivially copyable class types ( Clause 11 [class]), arrays of such types, and non-volatile const-qualified versions of these types (6.9.5 [basic.type.qualifier]) are collectively called trivially copyable types.

This is confusing, because “scalar types” include volatile-qualified types, but the intent of the definition of “trivially copyable type” appears to be to exclude volatile-qualified types. Perhaps the second quoted sentence should read something like,

A non-volatile type T or an array of such T is called a trivially copyable type if T is either a scalar type or a trivially copyable class type.

(Note that the following sentence, defining “trivial type,” has a similar formal issue, although it has no actual significance because all cv-qualifiers are permitted.)

(See also issue 496.)

Proposed resolution (January, 2014):

Change 6.9 [basic.types] paragraph 10 as follows:

... Scalar Cv-unqualified scalar types, trivially copyable class types ( Clause 11 [class]), arrays of such types, and non-volatile const-qualified versions of these types (6.9.5 [basic.type.qualifier]) are collectively called trivially copyable types...

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