You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
libcxx_old/test/libcxx/utilities
Eric Fiselier e7f8cd476d [libc++] Shrink variant's index type when possible
Summary:
Currently `std::variant` always uses an unsigned int to store the variant index. However this isn't nessesary and causes `std::variant` to be larger than it needs to be in most cases.

This patch changes the index type to be `unsigned char` when possible, and `unsigned short` or `unsigned int` otherwise, depending on the size (Although it's questionable if it's even possible to create a variant with 65535 elements.

Unfortunately this change is an ABI break, and as such is only enabled in ABI v2.

Reviewers: mpark

Reviewed By: mpark

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D40210

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318621 91177308-0d34-0410-b5e6-96231b3b80d8
8 years ago
..
any Add missing REQUIRES for C++14 9 years ago
function.objects [libcxx] [test] Make files consistently end with newlines, NFC. 9 years ago
memory Fix failing -verify tests due to change in Clangs static_assert message. 8 years ago
meta Cleanup _LIBCPP_HAS_NO_<c++11-feature> in support headers and final tests 9 years ago
optional optional: Implement LWG 2900 and P0602 9 years ago
ratio Move remaining _LIBCPP_VERSION tests into test/libcxx 10 years ago
template.bitset Fix or move tests with non-standard assumptions 9 years ago
time Move remaining _LIBCPP_VERSION tests into test/libcxx 10 years ago
tuple Fix failing -verify tests due to change in Clangs static_assert message. 8 years ago
type.index Move remaining _LIBCPP_VERSION tests into test/libcxx 10 years ago
utility Mark `__is_inplace_*` tests as UNSUPPORTED in <= C++14. 9 years ago
variant [libc++] Shrink variant's index type when possible 8 years ago