31cb7fe75e
Summary: The requirement on the `Size` type passed to *_n algorithms is that it is convertible to an integral type. This means we can't use a variable of type `Size` directly. Instead we need to convert it to an integral type first. The problem is finding out what integral type to convert it to. `__convert_to_integral` figures out what integral type to convert it to and performs the conversion, It also promotes the resulting integral type so that it is at least as big as an integer. `__convert_to_integral` also has a special case for converting enums. This should only work on non-scoped enumerations because it does not apply an explicit conversion from the enum to its underlying type. Reviewers: chandlerc, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7449 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228704 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
allocators.h | ||
asan_testing.h | ||
cmpxchg_loop.h | ||
constexpr_char_traits.hpp | ||
count_new.hpp | ||
Counter.h | ||
counting_predicates.hpp | ||
DefaultOnly.h | ||
hexfloat.h | ||
min_allocator.h | ||
MoveOnly.h | ||
nasty_containers.hpp | ||
nasty_macros.hpp | ||
nothing_to_do.pass.cpp | ||
platform_support.h | ||
private_constructor.hpp | ||
test_allocator.h | ||
test_iterators.h | ||
user_defined_integral.hpp |