Created on 2008-11-04.00:00:00 last changed 161 months ago
[ Wording supplied by Daniel. ]
Proposed resolution:
In Table 44 of [meta.unary.prop], third row, column "Value", change the cell content:
Table 44 -- Type property queries Template Value template <class T, unsigned I = 0> struct extent; If T is not an array type (8.3.4), or if it has rank less than or equal to I, or if I is 0 and T has type "array of unknown bound of U", then 0; otherwise, thesizebound (8.3.4) of the I'th dimension of T, where indexing of I is zero-based.
[ Post Summit: ]
Do not use "size" or "value", use "bound". Also, move the cross-reference to 8.3.4 to just after "bound".
Recommend Tentatively Ready.
The draft (N2798) says in [meta.unary.prop] Table 44:
Table 44 -- Type property queries Template Value template <class T, unsigned I = 0> struct extent; If T is not an array type (8.3.4), or if it has rank less than I, or if I is 0 and T has type "array of unknown bound of U", then 0; otherwise, the size of the I'th dimension of T
Firstly it isn't clear from the wording if I is 0-based or 1-based ("the I'th dimension" sort of implies 1-based). From the following example it is clear that the intent is 0-based, in which case it should say "or if it has rank less than or equal to I".
Sanity check:
The example says assert((extent<int[2], 1>::value) == 0);
Here the rank is 1 and I is 1, but the desired result is 0.
History | |||
---|---|---|---|
Date | User | Action | Args |
2011-08-23 20:07:26 | admin | set | status: wp -> c++11 |
2010-10-21 18:28:33 | admin | set | messages: + msg4428 |
2010-10-21 18:28:33 | admin | set | messages: + msg4427 |
2010-10-21 18:28:33 | admin | set | messages: + msg4426 |
2008-11-04 00:00:00 | admin | create |