Is the iterator type requirement for std::array<T,N>::iterator implementation defined or is it always defined to be a pointer to value_type?
CodePudding user response:
It's implementation-defined.
See the C 20 Standard (working draft, the final version costs money), section 22.3.7, "Class template array
":
namespace std {
template<class T, size_t N>
struct array {
// types
...
using iterator = implementation-defined ; // see 22.2
using const_iterator = implementation-defined ; // see 22.2
...
};