llvm-project/libcxx/test/std/algorithms/alg.modifying.operations
Eric Fiselier 51544023a9 [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

llvm-svn: 228704
2015-02-10 16:46:42 +00:00
..
alg.copy [libcxx] Properly convert the count arguments to the *_n algorithms before use. 2015-02-10 16:46:42 +00:00
alg.fill [libcxx] Properly convert the count arguments to the *_n algorithms before use. 2015-02-10 16:46:42 +00:00
alg.generate [libcxx] Properly convert the count arguments to the *_n algorithms before use. 2015-02-10 16:46:42 +00:00
alg.move
alg.partitions Fix PR#22433. The algorithm is_partitioned was testing an item in the middle of the sequence twice. 2015-02-02 18:16:35 +00:00
alg.random.shuffle
alg.remove
alg.replace
alg.reverse
alg.rotate
alg.swap Test commit: remove whitespace at EOL. 2015-02-05 07:26:14 +00:00
alg.transform
alg.unique
nothing_to_do.pass.cpp