This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofC++17 status.
underlying_type doesn't say what to do for an incomplete enumeration typeSection: 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:
Condition:template<class T> struct underlying_type;Tshall bea completeanenumeration type (7.2)Comments: […]
[2014-06-16 Rapperswil]
Move to Ready
Proposed resolution:
This wording is relative to N3936.
Change Table 57 — "Other transformations" as indicated:
Table 3 — Other type transformations Template Condition Comments …template <class T>
struct underlying_type;T shall bea complete anenumeration type (7.2)[…]