Created on 2013-09-21.00:00:00 last changed 131 months ago
Proposed resolution:
This wording is relative to N3691.
Following [meta.unary.prop.query]/1 add a new paragraph as indicated:
Each of these templates shall be a UnaryTypeTrait ([meta.rqmts]) with a BaseCharacteristic of integral_constant<size_t, Value>.
[ Issaquah 2014-02-11: Move to Immediate ]
The sibling sections [meta.unary], [meta.rel], and [meta.trans] respectively specify UnaryTypeTraits, BinaryTypeTraits, and TransformationTraits, as stated by each /2 paragraph. However, [meta.unary.prop.query] is underspecified. alignment_of, rank, and extent are said to produce "Values", but the type of that Value is not specified, and the struct templates are not required to derive from integral_constant. Such derivation is more than stylistic — it allows the structs to be passed to functions taking integral_constant.
alignment_of returns alignof(T) which is size_t ([expr.alignof]/2). extent returns an array bound, which is clearly size_t. rank returns "the number of dimensions" of an array, so any type could be chosen, with size_t being a reasonable choice. (Another choice would be unsigned int, to match extent's template parameter I.)History | |||
---|---|---|---|
Date | User | Action | Args |
2014-02-27 17:03:20 | admin | set | status: wp -> c++14 |
2014-02-20 13:52:38 | admin | set | status: immediate -> wp |
2014-02-13 04:55:14 | admin | set | messages: + msg6827 |
2014-02-13 04:55:14 | admin | set | status: new -> immediate |
2013-10-11 18:12:22 | admin | set | messages: + msg6703 |
2013-09-21 00:00:00 | admin | create |