[omniORB] about STL used in omniORB (sorry for last same subject email)

zhang ji zsfunl@yahoo.com
Fri Aug 23 16:39:01 2002


Hi Slava,

I got all the STL information from SGI's website.
(http://www.sgi.com/tech/stl/table_of_contents.html)
I think it is suitble for the usage in my box(Linux
7.3 with gcc 2.96).

The problem is map does not looks behaving like one
Unique Associative Container in my box. And I can not
find the reason.

BTW, do you know some other good STL mail lists for
this kinds of problem?
Thanks,
Shfieng
--- Slava Garelin <garelin@ukr.net> wrote:
> On Friday 23 August 2002 07:52, zhang ji wrote:
> > Hi,
> >
> > This question may be not suitble here(sorry for
> > that),but I am confused on the results.
> >
> > I use std::map in one omniORB servlet: below is
> its
> > definition in .h file:
> > "
> >   struct eqstr
> >     {
> >         bool operator()(const char* s1, const
> char*
> > s2) const
> >         {
> >                 return strcmp(s1, s2) == 0;
> >         }
> >     };
> >
> >     //Rule is one struct defined in IDL file
> >     typedef map<const char*, Rule, eqstr >
> Rules_Map;
> 
>        Really map template can have three type
> parameters?!
> 
> >     Rules_Map rule_map;
> >
> > "
> >
> > The adding/removing entity to/from the Rules_Map
> is
> > very simple:
> > "
> >         mu.lock();
> >         pair<Rules_Map::iterator, bool> result =
> > rule_map.insert(pair<const
> char*,Rule>(ru.rulename,ru));
> 
> I could not detect a similar variety of an insert.
> But in any case, the 
> insert should return iterator or void depending on
> parameters of call.
> 
> 
> -- 
> Slava Garelin                 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com