[libcxx-commits] [PATCH] D59099: Integer and pointer types of 'midpoint' from P0811

Eric Fiselier via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 13 23:48:54 PDT 2019


EricWF added inline comments.


================
Comment at: libcxx/include/numeric:549
+template <class _TPtr>
+_LIBCPP_INLINE_VISIBILITY constexpr
+enable_if_t<is_pointer_v<_TPtr>, _TPtr>
----------------
EricWF wrote:
> This overload isn't `constexpr` in the paper.
Ignore me. It is in r3.


================
Comment at: libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.integer.pass.cpp:31
+    static_assert(                  noexcept(std::midpoint(T(), T())), "");
+    static_assert(std::midpoint<T>(one, three) == two, "");
+    using limits = std::numeric_limits<T>;
----------------
EricWF wrote:
> There's no reason why `midpoint` needs to be declared as a template. This test is non-portable.
> 
> 
Ignore me. It is in r3.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59099/new/

https://reviews.llvm.org/D59099





More information about the libcxx-commits mailing list