Sprout
Sprout copied to clipboard
sizeof(variant<T...>) > sizeof(tuple<T...>)?
https://github.com/bolero-MURAKAMI/Sprout/blob/master/sprout/variant/variant.hpp
shows, on lines 81 and then on lines 52 and 40 that the size of the variant<T...> is sizeof(int)+sizeof(tuple<T...>. That seems a waste of space to me since other variants, such as this one:
https://github.com/ericniebler/range-v3/blob/master/include/range/v3/utility/variant.hpp
and the existing boost one:
http://www.boost.org/doc/libs/1_58_0/doc/html/variant.html
make the size close to max of the sizeof(T)...
Why wasn't a similar space saving designed used for sprout's variant?