I am creating a struct that has a field that is an unordered_map on the heap. When I use new, I can add to it with no problem. But with calloc, I get an error inserting because the bucket size is 0. It works fine after I call reserve.
So, when calloc is called on the struct, does the unordered_map constructor not run? I am confused why if it was in a struct that was new-ed, it seems to have a non-zero bucket size. And is there a better way to go about this besides calling the reserve? (I can't use delete in this case, so I need to stick with the calloc call)