3 ms·
std::vector and std::any both allocate - compared to (say) std::tuple<int, float> that's a ludicrously heavyweight solution.
by quietbritishjim 6y ago
std::vector and std::any both allocate - compared to (say) std::tuple<int, float> that's a ludicrously heavyweight solution.
- FrozenVoid 6y agostruct{} is even more efficient, but vector<any> allows to prototype with anything.Its a more genuine 'tuple object' than std::tuple.