$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] [Unordered] Penultimate Iterator
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2010-09-10 10:39:58
Dear all,
What is the quickest way to get hold of the penultimate iterator in an unordered_map? I'm aware of this one -- which is O(n), where n == container_.size():
container_type::const_iterator i = container_.begin();
advance(i, container_.size() - 1);
Is there no O(1) solutions?
TIA,
--Hossein