Re:C++11 Tuple Implementation Details (2012)
by quietbritishjim on Saturday February 06, 2021 @09:58AM
(#26046909)
std::vector and std::any both allocate - compared to (say) std::tuple<int, float> that's a ludicrously heavyweight solution.
[ Parent
| on HN ]
Re:C++11 Tuple Implementation Details (2012)
by FrozenVoid on Saturday February 06, 2021 @10:08AM
(#26046994)
struct{} is even more efficient, but vector<any> allows to prototype with anything.Its a more genuine 'tuple object' than std::tuple.