cxx/test/support
Eric Fiselier 31cb7fe75e [libcxx] Properly convert the count arguments to the *_n algorithms before use.
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
2015-02-10 16:46:42 +00:00
..
allocators.h Add license headers to a bunch of libc++ files that were missing them. No functionality change. Fixes 18291. Thanks to Nico for the bug report and the patch. 2014-01-16 16:58:45 +00:00
asan_testing.h [asan] Make vector asan annotations exception-friendly 2014-09-02 23:43:38 +00:00
cmpxchg_loop.h PR20546: Fix tests for compare_exchange_weak. 2014-09-06 20:38:25 +00:00
constexpr_char_traits.hpp Mark assign to be constepr only in c++14; can't have constexpr fns that return void in C++11 2014-06-10 18:52:57 +00:00
count_new.hpp Fix use of C++11 extensions in C++03 code. 2015-02-10 15:17:46 +00:00
Counter.h Fix PR22366. When move-constructing an associative container and explicitly passing an allocator that compares different, we were not calling the destructor of the elements in the moved-from container. 2015-01-28 19:54:25 +00:00
counting_predicates.hpp Whitespace maintenance. Remove a bunch of tabs that snuck in. No functionality change 2014-10-18 11:03:33 +00:00
DefaultOnly.h Add license headers to a bunch of libc++ files that were missing them. No functionality change. Fixes 18291. Thanks to Nico for the bug report and the patch. 2014-01-16 16:58:45 +00:00
hexfloat.h Move common header files into a 'support' directory; make 'testit' include -I to that directory; rename 'iterators.h' to 'iterator_test.h'; remove hard-coded paths to include files from more than 350 source files 2013-01-05 03:21:01 +00:00
min_allocator.h Add bare_allocator archetype that implements the minimal possible allocator interface. 2014-08-15 04:15:41 +00:00
MoveOnly.h We had two identical files named 'MoveOnly.h' in the test suite. Move one to support/, remove the other, and update all the tests that included them. No functionality change. 2015-01-28 21:22:53 +00:00
nasty_containers.hpp Implement LWG 2324: Insert iterator constructors should use addressof(). Add two new container classes to the test suite that overload operator &, and add test cases to the insert/front_insert/back_insert iterator tests that use these containers. 2014-03-03 19:20:40 +00:00
nasty_macros.hpp Remove use of _[A-Z] identifiers and poison them to detect usage 2015-02-05 23:01:40 +00:00
nothing_to_do.pass.cpp test commit 2014-07-24 18:41:56 +00:00
platform_support.h Fix platform_support.h's get_temp_file_name() on Newlib under __STRICT_ANSI__ 2014-12-11 20:56:40 +00:00
private_constructor.hpp Add license headers to a bunch of libc++ files that were missing them. No functionality change. Fixes 18291. Thanks to Nico for the bug report and the patch. 2014-01-16 16:58:45 +00:00
test_allocator.h Bug #19473. If you pass an allocator to std::function, we should use that allocator, not construct one from scratch. Add a test to make sure 2014-04-18 17:23:36 +00:00
test_iterators.h Since Eric poisoned the comma operator on all our test iterators, we no longer need 'comma_iterator'. Remove it from the test suite. 2014-11-18 16:15:00 +00:00
user_defined_integral.hpp [libcxx] Properly convert the count arguments to the *_n algorithms before use. 2015-02-10 16:46:42 +00:00