[PATCH] D52697: Bug 39129: Speeding up partition_point/lower_bound/upper_bound/ by using unsigned division by 2 when possible.

Denis Yaroshevskiy via Phabricator reviews at reviews.llvm.org
Thu Oct 25 11:13:29 PDT 2018


dyaroshev added inline comments.


================
Comment at: test/libcxx/algorithms/half_positive.pass.cpp:31
+
+        _LIBCPP_CONSTEXPR type max_v = std::numeric_limits<type>::max();
+        _LIBCPP_CONSTEXPR type r = std::__half_positive(max_v);
----------------
EricWF wrote:
> Other libraries run our test suite, so we can't use internal macros.
> 
> Could you please write one set of tests that run at runtime, and another set that uses constexpr and static assert.
> And then guard the constexpr tests under `#if TEST_STD_VER >= 11`.
> 
> 
I can but how they can run these tests? There are public tests right? And these are private tests.
Other libraries cannot run this test because they do not have __half_positive not because they do not have a macro? Or am I missing smth?


https://reviews.llvm.org/D52697





More information about the libcxx-commits mailing list