A better way to initialize a static array member of a class in C++ ( const would be preferred though )
问题 I have a static array of pointers to functions as a member of a class. I need to initialize it, but it turns out this array is 64K items long, so it's impractical to initialize it with a static initializer like { x, y, z, ... } as it would clutter code. I have instead to initialize it by code, with several loops. The way I figured to do this is by initializing the static array in the constructor and setting a flag to it, so only the construction of the first instance of the class would fire