This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

2845. enable_if, result_of, common_type and aligned_storage do not meet the definition of TransformationTrait

Section: 21.3.2 [meta.rqmts] Status: New Submitter: Tim Song Opened: 2016-12-14 Last modified: 2017-02-02

Priority: 3

View all other issues in [meta.rqmts].

View all issues with New status.

Discussion:

[meta.rqmts]/3 defines TransformationTrait as follows:

A TransformationTrait modifies a property of a type. It shall be a class template that takes one template type argument and, optionally, additional arguments that help define the modification. It shall define a publicly accessible nested type named type, which shall be a synonym for the modified type.

enable_if, result_of and common_type do not necessarily "define a publicly accessible nested type named type". aligned_storage takes no template type argument (it only has two non-type parameters). Yet [meta.trans]/2 says that they are all TransformationTraits.

Incidentally, with the exception of decay, it's not clear that any of the traits in [meta.trans.other] could really be described as "modify[ing] a property of a type".

[2017-01-27 Telecon]

Priority 3

Proposed resolution: