ROOT 5 and C++11

After suffering from inexplicable memory errors in different versions of ROOT 6 (Error in path/to/root/directory/bin/root.exe: free(): invalid size), I have removed them all and switched to ROOT 5.34.36.

However, when I try to run my macro in ROOT 5, I get something like:

Error: cannot open file "chrono" TestingLoop.C:7:
or

Error: Function minmax_element(vector.begin(),vector.end()) is not defined in current scope  Correlation.C:110:

Error: Failed to evaluate minmax_element(vector.begin(),vector.end()).first

It seems to me that ROOT 5 cannot interpret some of the C++11 things (such as or certain functions in such as minmax_element). Is this correct? If so, is there a way to fix this? Say, update CINT to a newer version or something? When I first start a root session from bash shell, it says: CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010, in which case I am not surprised that it does not understand some C++11 stuff.

How do I fix / update this?

Hi,

unfortunately CINT does not support modern C++.
This is one of the reasons why Cling was developed.

Cheers,
Danilo

[quote=“dpiparo”]Hi,

unfortunately CINT does not support modern C++.
This is one of the reasons why Cling was developed.

Cheers,
Danilo[/quote]

Would installing Cling and rebuilding the same ROOT5 source with a cling-related option solve the issue, then?

Hi,

the best option is to migrate to ROOT 6. ROOT 6.00.00 is indeed ROOT 5.34 based on Cling.

Cheers,
Danilo

[quote=“dpiparo”]Hi,

the best option is to migrate to ROOT 6. ROOT 6.00.00 is indeed ROOT 5.34 based on Cling.

Cheers,
Danilo[/quote]

Yes, I figured. I am back to ROOT 6 (and the memory leak problem I cannot figure out).