data()
is brand new to C++11, that’s why you don’t see it as often. The idea of using &vec.front()
never even occurred to me, probably because I use operator[]
alot more often than front()
(almost never). I imagine it’s the same for other people.