$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [Unordered] No operator[] const?
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2010-09-13 09:03:29
Cory,
> > Is there any specific reason why there is no
> operator[] const for boost::unordered_map? Or, is that only
> an oversight?
> >
>
> Like map<>, operator[] inserts if the key doesn't
> already exist, so a
> const version won't work. You need to use find().
I see. OK thanks.
--Hossein