src/include/maps.h
changeset 454 0cd33e3e60cb
parent 389 770cc1f4861f
child 529 e63a1dda5c68
equal deleted inserted replaced
3:c29ae6e9865e 4:44a0eb007cd4
    98 
    98 
    99     ReferenceType operator[](const Key &k) {
    99     ReferenceType operator[](const Key &k) {
   100       return insert(PairType(k,v)).first -> second;
   100       return insert(PairType(k,v)).first -> second;
   101     }
   101     }
   102     ConstReferenceType operator[](const Key &k) const {
   102     ConstReferenceType operator[](const Key &k) const {
   103 //marci jav      typename parent::iterator i = lower_bound(__k);
       
   104       typename parent::iterator i = lower_bound(k);
   103       typename parent::iterator i = lower_bound(k);
   105       if (i == end() || key_comp()(k, (*i).first))
   104       if (i == parent::end() || parent::key_comp()(k, (*i).first))
   106 	return v;
   105 	return v;
   107       return (*i).second;
   106       return (*i).second;
   108     }
   107     }
   109     void set(const Key &k, const T &t) {
   108     void set(const Key &k, const T &t) {
   110       parent::operator[](k) = t;
   109       parent::operator[](k) = t;