M
Milind
Hi,
I trying to use map as: map< typeforkey, set<typeofset> > .
This map is a part of a class which has many set, get functions and
other interfaces.
Problem:
I have a set function for this map which has a signature of type:
void foo ( const typeofkey& key, const typeofset& element);
I intend to do an insert which would look something like:
set<typeofset> myset;
myset.insert(element);
myHash.insert( std:air<typeofkey, map<typeofset> > (key, myset));
now the problem is:
1. Is there a better way of doing it, interms of explicit creation of
the map Vs the environment creating a temporary for itself??
2. If i do insert it like this to the map will be copied to the map,
i.e. all of the elements of the set copied to the new location. i.e.
inside the map?? do i have problems of dangling references?? out of
scope variables?? Can i get a defenetive url or web resource on this?
~ Moh
I trying to use map as: map< typeforkey, set<typeofset> > .
This map is a part of a class which has many set, get functions and
other interfaces.
Problem:
I have a set function for this map which has a signature of type:
void foo ( const typeofkey& key, const typeofset& element);
I intend to do an insert which would look something like:
set<typeofset> myset;
myset.insert(element);
myHash.insert( std:air<typeofkey, map<typeofset> > (key, myset));
now the problem is:
1. Is there a better way of doing it, interms of explicit creation of
the map Vs the environment creating a temporary for itself??
2. If i do insert it like this to the map will be copied to the map,
i.e. all of the elements of the set copied to the new location. i.e.
inside the map?? do i have problems of dangling references?? out of
scope variables?? Can i get a defenetive url or web resource on this?
~ Moh