Join Nostr
2025-01-20 22:37:28 UTC
in reply to

Coyote on Nostr: :bm1::bm2::bm3::bm4::bm5::bm6::bm7::bm8::bm9::bm0: What is the vector's template ...

What is the vector's template parameter? If it's std::vector<o_worldObjectGeneric> it'll still allow you to push derived objects, but it'll copy construct an o_worldObjectGeneric instead of pushing the entire derived object on the vector. Look at this; notice how despite calling push_back with four different objects, only "A copy construct" will be printed between "Before push_back" and "After push_back."