Hi, I built the git master of Root to try cling. I noticed that the root shell does not support C++11 headers:
$ root -n
root [0] #include <unordered_map>
In file included from input_line_25:1:
In file included from /usr/lib64/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/unordered_map:35:
/usr/lib64/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/bits/c++0x_warning.h:32:2: error: This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the \
^
root [1]
However, I found on the web that cling has options to turn on C++11 support: -Wc++11-extensions -std=c++11. I was wondering whether it is possible to use C++11 also with the root shell, I tried to pass the cling options to root but obviously without success…
I did it before and cling didn’t work with C++11 headers. I tried again today but now I get this compilation error:
Generating dictionary core/base/src/G__Core.cxx...
[...]
In file included from G__Core.cxx.h:1:
In file included from input_line_2:1:
In file included from etc/cling/Interpreter/ValuePrinter.h:11:
In file included from /usr/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../include/c++/4.8.1/string:40:
In file included from /usr/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../include/c++/4.8.1/bits/char_traits.h:39:
In file included from /usr/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../include/c++/4.8.1/bits/stl_algobase.h:64:
In file included from /usr/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../include/c++/4.8.1/bits/stl_pair.h:59:
In file included from /usr/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../include/c++/4.8.1/bits/move.h:57:
/usr/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../include/c++/4.8.1/type_traits:269:39: error: use of undeclared identifier '__float128'
struct __is_floating_point_helper<__float128>
^
make: *** [core/base/src/G__Core.cxx] Segmentation fault (core dumped)
make: *** Deleting file `core/base/src/G__Core.cxx'
Thanks Axel, with your fix the compilation error has gone away. Now cling includes the header for unordered_map without any problem, so also my original problem is solved! Thanks also to Fons!