Multimap<float, float> bug in CINT

Dear CINT users…

I needed some multimap container to perform part of my analysis in Root 5.22 and I got some problems. Just as an example I have posted this small program to be run with CINT.

[code]#include
#include

using namespace std;

void multimapa(){
multimap<float, float> mymap;
multimap<float, float>::reverse_iterator it;

for (int i=0; i< 10 ; i++){
mymap.insert(pair<float,float>(1./(i+1), i));
}
for (it=mymap.rbegin(); it!=mymap.rend(); it++){
cout << (*it).first << " => " << (*it).second << endl;
}
}[/code]

It gives massage like this one:


[quote]Error: Too few template arguments multimapa.C:8:
*** Interpreter error recovered ***

*** Break *** segmentation violation[/quote]

If you compile the code with “root -l multimapa.C+” it will work perfectly. Do you have any solution for the problem? Thanks …

Hi,

you will need to create the dictionary for multimap<float,float>. See e.g. root.cern.ch/phpBB2/viewtopic.php?t=7691 And keep in mind that using a float as the key type is extremely dangerous.

Cheers, Axel.

What was the example?. That link is not working.

Hi,

Here is the updated URL: Std::vector of TLorentzVector

Cheers, Axel.