Movatterモバイル変換


[0]ホーム

URL:


Issue 1746 - WG21 CWG Issues
Title
Are volatile scalar types trivially copyable?
Status
c++14
Section
6.9 [basic.types]
Submitter
Walter Brown

Created on2013-09-06.00:00:00 last changed136 months ago

Messages

msg4932 (view)
Date: 2014-02-15.00:00:00

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

msg4721 (view)
Date: 2014-01-15.00:00:00

Proposed resolution (January, 2014):

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

...ScalarCv-unqualified scalar types,trivially copyable class types (Clause 11 [class]), arrays of such types, andnon-volatile const-qualified versions of these types(6.9.5 [basic.type.qualifier]) are collectively calledtrivially copyable types...
msg4640 (view)
Date: 2022-02-18.07:47:23

According to 6.9 [basic.types] paragraph 9,

Arithmetic types (6.9.2 [basic.fundamental]), enumeration types, pointertypes, 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 calledscalar types...Scalar types, trivially copyable class types (Clause 11 [class]), arrays of such types, and non-volatileconst-qualified versions of these types (6.9.5 [basic.type.qualifier]) arecollectively calledtrivially copyable types.

This is confusing, because “scalar types” includevolatile-qualified types, but the intent of the definition of“trivially copyable type” appears to be to excludevolatile-qualified types. Perhaps the second quoted sentence shouldread something like,

A non-volatile typeT or an array of suchT is called atrivially copyable type ifT is either a scalar type or atrivially copyable class type.

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

(See alsoissue 496.)
History
DateUserActionArgs
2014-11-24 00:00:00adminsetstatus: dr -> c++14
2014-03-03 00:00:00adminsetmessages: +msg4932
2014-03-03 00:00:00adminsetstatus: tentatively ready -> dr
2014-01-20 00:00:00adminsetmessages: +msg4721
2014-01-20 00:00:00adminsetstatus: open -> tentatively ready
2013-09-06 00:00:00admincreate

[8]ページ先頭

©2009-2026 Movatter.jp