Hi,
Benjamin Bannier wrote on 04/08/2010 01:55 PM:
>> Ida, that's basic C++, not ROOT specific issue. >> Do you really want to bother this list with it?!
the standard says "An integral constant-expression can involve only literals (2.13), enumerators, const variables or static data members of integral or enumeration types initialized with constant expressions (8.5), non-type template parameters of integral or enumeration types, and sizeof expressions." And an integral constant-expression (ICE) is what's needed to declare an array's size.
GCC 4.3 has an extension where it tracks the values of non-const variables, and if they are unchanged allows them to be used as ICEs (at least that's my interpretation of what it does). It even tracks the use of some function calls if they don't have side effects: sin(ICE) is an ICE itself. It mixes in a bit of C++ 0x into the current C++; only C++ 0x defines tracking of ICEs. So this time you've found a GCC extension, not a CINT limitation :-)
Cheers, Axel. Received on Thu Apr 08 2010 - 14:24:39 CEST
This archive was generated by hypermail 2.2.0 : Thu Apr 08 2010 - 17:50:02 CEST