Root-6 interpreter with C++11 option like cling?

Hi,

is there a way to enable C++11 support in the cling interpreter integrated with ROOT-6, like “-std=c++11” for standalone cling?

I know I can make the root interpreter accept C++11 by configuring ROOT with “–with-clang --enable-cxx11”. However this is not the case for the official SLC6 binaries. Also, configuring ROOT like that forces “-std=c++11” on all other external code compiled with it via “root-config --cflags” - something not to be done lightly.

Would it be possible to have a C++11 option for the ROOT interpreter, so one could use C++11 in scripts even when ROOT and external code linking against it are not build with clang and in C++11 mode? I just ask because using a standalone “cling -std=c++11” console with a plain old GCC-compiled ROOT-5 seems to work quite well.

Cheers,

Oliver

Hi,

In general it’s not possible to mix C++11 and previous standards: for instance the standard library objects might differ, and creating an old vector but handling it as if it is a new one will be fatal.

Just build ROOT and all externals with C++11. Maybe it is not to be done lightly but a) it is to be done and b) so far everybody has survived the change :slight_smile:

Cheers, Axel.

Hi,

when ROOT-6 is released, will there be an official (SLC) binary configured with “–enable-cxx11”?

Cheers,

Oliver

Hi Oliver,

Yes absolutely, we will have a SLC6 C++11 binary, just like for the betas. All GCC 4.8 builds are C++11.

Cheers, Axel.