swift
swift copied to clipboard
Update instances generating process in the compiled target
Now in the compiled target, all the string names of the instances will be stored in a vector
For example,
BLOG:
type City;
distinct City C[2];
C++ target has the following:
const vector
However, the distinct statement can declare a large number of instances. Printing all the different string names in the C++ target makes the C++ file super large and slows down the compilation process a lot.
So, ideally, we need to use a for loop to create all these string names.