r244309 - in /trunk/libstdc++-v3: ChangeLog inc...

ville@gcc.gnu.org ville@gcc.gnu.org
Wed Jan 11 11:23:00 GMT 2017


Author: ville
Date: Wed Jan 11 11:23:43 2017
New Revision: 244309

URL: https://gcc.gnu.org/viewcvs?rev=244309&root=gcc&view=rev
Log:
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.

Added:
    trunk/libstdc++-v3/testsuite/20_util/variant/index_type.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/std/variant



More information about the Libstdc++-cvs mailing list