Given the following code:
#include <array>
#include <vector>
void Dummy0(std::array<unsigned, 10>& an_array) { --std::end(an_array); }
void Dummy1(std::vector<unsigned>& a_vector) { --std::end(a_vector); }
From the point of view of the "standards makers", how do you justify the fact that Dummy0 produces error: expression is not assignable. One return value is a raw pointer, the other a class. Why this double standard (no pun intended)?
I bet there is a lot of broken template code because of this fact. People don't always use std::advance().
Codes: