Movatterモバイル変換


[0]ホーム

URL:


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

2025-12-20


2006. Cv-qualifiedvoid types

Section:6.9.4  [basic.compound]    Status:CD4    Submitter:Richard Smith    Date:2014-09-16

[Moved to DR at the October, 2015 meeting.]

According to 6.9.4 [basic.compound] paragraph 3,

The type of a pointer tovoid or a pointer to an object typeis called anobject pointer type. [Note: A pointer tovoid does not have a pointer-to-object type, however,becausevoid is not an object type. —end note]

This wording excludes cv-qualifiedvoid types. Thereare other references in the Standard to “voidtype” that are apparently intended to include cv-qualifiedversions as well.

Proposed resolution (May, 2015):

  1. Change 6.9 [basic.types] paragraph 5 as follows:

  2. ...Incompletely-defined object types andthe void typescvvoid are incomplete types(6.9.2 [basic.fundamental])...
  3. Change 6.9 [basic.types] paragraph 8 as follows:

  4. An object type is a (possibly cv-qualified) type that is nota function type, not a reference type, and nota void typecvvoid.
  5. Change 6.9.2 [basic.fundamental] paragraph 9 as follows:

  6. Thevoid type has an empty set of values. TheA typecvvoidtype isan incomplete type that cannot be completed; such a typehas an empty set of values. It is used asthe return type for functions that do not return avalue. Any expression can be explicitly converted to typecvvoid (7.6.3 [expr.cast]). An expression of typecvvoid shall be used only as anexpression statement (8.3 [stmt.expr]), as anoperand of a comma expression (7.6.20 [expr.comma]),as a second or third operand of?:(7.6.16 [expr.cond]), as the operand oftypeid,noexcept, ordecltype, asthe expression in a return statement(8.8.4 [stmt.return]) for a function with the returntypecvvoid, or as the operandof an explicit conversion to typecvvoid.
  7. Change bullet 1.3 of 6.9.4 [basic.compound] as follows:

  8. Change 6.9.4 [basic.compound] paragraph 3 as follows:

  9. The type of a pointer tocvvoidor a pointer to an object type is called anobjectpointer type. [Note:...



[8]ページ先頭

©2009-2026 Movatter.jp