Can I get a C++ Compiler to instantiate objects at compile time
- by gam3
I am writing some code that has a very large number of reasonably simple objects and I would like them the be created at compile time. I would think that a compiler would be able to do this, but I have not been able to figure out how.
In C I could do the the following:
#include <stdio.h>
typedef struct data_s {
int a;
int b;
…