3.5.5. Scalar type constants

Constants of scalar type can be defined within classes. This is an old form. The modern form uses an initialized static data member.


A warning is issued if you define a member of constant integral type within a class.


class A
    const int size = 10; // must be static const int size = 10;
    int a[size];
Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A