I've noticed there are 2 ways to get the end iterator of a vector (or other container class):
std::end(myVector)
and
myVector.end()
The same goes for various other container iterator functions, begin
, cend
, cbegin
, rend
, rbegin
, crend
, crbegin
, find
, etc. What I'm wondering is if there's any functional difference between these? And if not, is there some historical reason to have both of them?
(Apologies if this is a duplicate, I've searched all over, and found plenty of sources for one or the other of these methods, but none that mentions both or compares the two.)