aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorVille Voutilainen <ville.voutilainen@gmail.com>2017-01-11 13:23:43 +0200
committerVille Voutilainen <ville@gcc.gnu.org>2017-01-11 13:23:43 +0200
commitf3df0b3cde2476f77059e4c3a704ab1960fa883a (patch)
tree8e92072dbc8ee05ff40976301839998c89081a90 /gcc
parent51020892466d37f71ee13137bdadcbb32545c55d (diff)
downloadgcc-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