Created on 2013-09-30.00:00:00 last changed 89 months ago
Proposed resolution:
This wording is relative to N4582.
Edit [array.overview] as indicated
[…]
-3- An array […]namespace std { template <class T, size_t N> struct array { […]T elems[N]; // exposition only[…] }; }
-4- [Note: The member variable elems is shown for exposition only, to emphasize that array is a class aggregate. The name elems is not part of array's interface. — end note]
Edit [array.data] as follows:
constexpr T* data() noexcept; constexpr const T* data() const noexcept;-1- Returns:
elemsA pointer such that [data(), data() + size()) is a valid range, and data() == addressof(front()).
[ 2016-03 Jacksonville ]
Move to Ready.[ 2016-02-04, Tim Song improves the P/R ]
Instead of the build-in address-operator, std::addressof should be used.
[ 2015-11-14, Geoffrey Romer provides wording ]
[ Kona 2015-10: Link to 2516 ]
[ Urbana 2014-11-07: Move to Open ]
[array.overview] shows std::array with an "exposition only" data member, elems.
The wording in [objects.within.classes] that defines how "exposition only" is used says it applies to private members, but std::array::elems (or its equivalent) must be public in order for std::array to be an aggregate. If the intention is that std::array::elems places requirements on the implementation to provide "equivalent external behavior" to a public array member, then [objects.within.classes] needs to cover public members too, or some other form should be used in [array.overview].History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2016-06-28 12:47:21 | admin | set | status: ready -> wp |
2016-03-07 05:48:12 | admin | set | messages: + msg8008 |
2016-03-07 05:48:12 | admin | set | status: review -> ready |
2016-02-04 16:46:21 | admin | set | messages: + msg7954 |
2015-12-11 20:55:37 | admin | set | status: open -> review |
2015-12-10 21:33:58 | admin | set | messages: + msg7640 |
2015-12-10 21:33:58 | admin | set | messages: + msg7639 |
2015-11-04 16:49:21 | admin | set | messages: + msg7601 |
2014-11-08 16:43:57 | admin | set | messages: + msg7171 |
2014-11-08 16:43:57 | admin | set | status: new -> open |
2013-09-30 00:00:00 | admin | create |