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.

2396.underlying_type doesn't say what to do for an incomplete enumeration type

Section: 21.3.9.7[meta.trans.other]Status:C++17Submitter: Richard SmithOpened: 2014-06-12Last modified: 2017-07-30

Priority:0

View all otherissues in [meta.trans.other].

View all issues withC++17 status.

Discussion:

Consider:

enum E {  e = std::underlying_type<E>::type(1)};

Clearly this should be ill-formed, but the library section doesn't appear to ban it. Suggestion:

Change in 21.3.9.7[meta.trans.other] Table 57:

Template:template<class T> struct underlying_type;

Condition:T shall bea completean enumeration type (7.2)

Comments: […]

[2014-06-16 Rapperswil]

Move to Ready

Proposed resolution:

This wording is relative to N3936.

  1. Change Table 57 — "Other transformations" as indicated:

    Table 3 — Other type transformations
    TemplateConditionComments
    template <class T>
    struct underlying_type;
    T shall bea completean enumeration type (7.2)[…]

[8]ページ先頭

©2009-2026 Movatter.jp