jeudi 4 avril 2019

Taking really long to compile my C++ code

I have a really long initializer list, something like this.

 std::vector<Inventory> inventory_list = {Inventory(0,30.0),
    Inventory(1,30.0),
    Inventory(2,30.0),
    Inventory(3,30.0),
    Inventory(4,30.0),
    Inventory(5,30.0),
    Inventory(29,30.0),
    Inventory(30,30.0),}

 ..... 

having around 72000 lines of such initializer list and its already taken over half hour and still compiling. Is there a way to make this faster? Or is this something that s expected for such large amount of data?

Aucun commentaire:

Enregistrer un commentaire