A
asclearuc
Hello
Is it possible to use map<string&, string&>?
Why I need it. I have a large amount of data obtained from XML file.
I should do processing of this data.
The processing takes many stages, and could be done using std::map
templates. But new instance of std::map is required on each stage.
I would like to avoid additional memory allocation which is done in
map<string, string> case.
I would like to use smth like map<string&, string&> - in this case
there is no need to write additional binary operator
to be used as predicate for map (which would be required if I use
map<string*, string*>)
The questions are:
1. is it possible
2. are any underground problems if I use it
Would like to hear guru comments on it...
Tx,
Alexandru
Is it possible to use map<string&, string&>?
Why I need it. I have a large amount of data obtained from XML file.
I should do processing of this data.
The processing takes many stages, and could be done using std::map
templates. But new instance of std::map is required on each stage.
I would like to avoid additional memory allocation which is done in
map<string, string> case.
I would like to use smth like map<string&, string&> - in this case
there is no need to write additional binary operator
to be used as predicate for map (which would be required if I use
map<string*, string*>)
The questions are:
1. is it possible
2. are any underground problems if I use it
Would like to hear guru comments on it...
Tx,
Alexandru