Is there a reason std::front
and std::back
are not present in C++11?
There is std::begin
and std::end
so to me, having the equivalent with regards to actual instances would make sense.
std::begin()
and std::end()
are supposed to work for all fundamental containers (including C-style arrays).
In fact, if the container supports member begin()
and end()
functions, std::begin()
and std::end()
forward the call to those member functions.
However, not all containers support front()
and back()
member functions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With