cxx/test/std/algorithms/alg.nonmodifying
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
..
alg.adjacent.find Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00
alg.all_of Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00
alg.any_of Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00
alg.count Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00
alg.equal Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00
alg.find Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00
alg.find.end Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00
alg.find.first.of Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00
alg.foreach Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00
alg.is_permutation Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00
alg.none_of Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00
alg.search [libcxx] Properly convert the count arguments to the *_n algorithms before use. 2015-02-10 16:46:42 +00:00
mismatch Removed some tabs that snuck into the test suite. No functionality change 2015-01-28 20:26:11 +00:00
nothing_to_do.pass.cpp Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00