Re: Static const int as array bound inside class

2007-06-28 Thread Andrew Pinski
On 6/27/07, Torquil Macdonald Sørensen <[EMAIL PROTECTED]> wrote: Best regards, Torquil Sørensen / Example code (from the book): class X { static const int size; int array[size]; }; const int X::size = 100; It gives the error message "array bound is not an integer con

Static const int as array bound inside class

2007-06-27 Thread Torquil Macdonald Sørensen
Hello, it appears that g++-4.1 (or g++-4.2, Debian vers. 4.2-20070609-1) does not support using a static const int as an array bound inside a class. I wrote som example code below. This type of code is described in the section "Compile-time constants inside classes" on page 295 in the book "Thi