Movatterモバイル変換


[0]ホーム

URL:



This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofC++17 status.

2448. Non-normative Container destructor specification

Section: 23.2.2[container.requirements.general]Status:C++17Submitter: Daniel KrüglerOpened: 2014-10-18Last modified: 2025-03-13

Priority:0

View otheractive issues in [container.requirements.general].

View all otherissues in [container.requirements.general].

View all issues withC++17 status.

Discussion:

According to Table 96 — "Container requirements" the specification:

note: the destructor is applied to every element ofa; anymemory obtained is deallocated.

The initial "note:" can be read as if that part of the specification would not be normative (This note formdiffers from footnotes in tables, which have normative meaning).

It seems that this initial part of the specification exists since C++98. But comparing withthe similarSGI Container specification there is no evidencefor that being intended to be non-normative.

[2015-02, Cologne]

NJ: If we fix this, we should also fix it elsewhere. Oh, this is the only place?
GR: If this is intended to be different from elsewhere, we should make sure.
AM:valarray specifies this without the "note:".
DK:valarray requires trivially destructible types!
GR: That's good enough for me.
NJ: First timevalarray has been useful for something!

Proposed resolution:

This wording is relative to N4140.

  1. Change 23.2.2[container.requirements.general], Table 96 — "Container requirements", as indicated:

    Table 96 — Container requirements
    ExpressionReturn typeOperational
    semantics
    Assertion/note
    pre-/post-condition
    Complexity
    (&a)->~X()voidnote: the destructor
    is applied to every
    element ofa; any
    memory obtained isdeallocated.
    linear

[8]ページ先頭

©2009-2026 Movatter.jp