diff options
author | Ville Voutilainen <ville.voutilainen@gmail.com> | 2017-01-11 13:23:43 +0200 |
---|---|---|
committer | Ville Voutilainen <ville@gcc.gnu.org> | 2017-01-11 13:23:43 +0200 |
commit | f3df0b3cde2476f77059e4c3a704ab1960fa883a (patch) | |
tree | 8e92072dbc8ee05ff40976301839998c89081a90 /gcc | |
parent | 51020892466d37f71ee13137bdadcbb32545c55d (diff) | |
download | gcc-f3df0b3cde2476f77059e4c3a704ab1960fa883a.zip gcc-f3df0b3cde2476f77059e4c3a704ab1960fa883a.tar.gz gcc-f3df0b3cde2476f77059e4c3a704ab1960fa883a.tar.bz2 |
Reduce the size of variant, it doesn't need an index of type size_t internally.
Reduce the size of variant, it doesn't need an index of
type size_t internally.
* include/std/variant (parse_numbers.h): New include.
(__select_index): New.
(_Variant_storage<false, _Types...>::_M_reset_impl): Use
_index_type for comparison with variant_npos.
(_Variant_storage<false, _Types...>::__index_type): New.
(_Variant_storage<false, _Types...>::_M_index): Change the
type from size_t to __index_type.
(_Variant_storage<true, _Types...>::__index_type): New.
(_Variant_storage<true, _Types...>::_M_index): Change the
type from size_t to __index_type.
(_Variant_base::_M_valid): Use _Storage::__index_type
for comparison with variant_npos.
(variant::index): Use _Base::_Storage::__index_type
for comparison with variant_npos.
* testsuite/20_util/variant/index_type.cc: New.
From-SVN: r244309
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions