Closed HolyBlackCat closed 1 year ago
My bad, std::set
doesn't have those too... Strange.
I think because the standard differentiates sequence
and associative
containers, and only sequence
containers have front
/back
. Maybe because with a vector you know when you change the front
or back
, with push_back()
for example, while with an associative container the insertion of any element may change the front
or back
.
Thank you for the comment anyways @HolyBlackCat !
A minor issue: Btree containers lack
front()
andback()
methods (returning references to first and last elements respectively), that theirstd::
counterparts do have.