[libcxx-commits] [PATCH] D61014: Implement std::midpoint for floating point types
Marshall Clow via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun May 5 06:02:20 PDT 2019
mclow.lists marked 2 inline comments as done.
mclow.lists added inline comments.
================
Comment at: libcxx/include/numeric:564
+template <class _Fp>
+_LIBCPP_INLINE_VISIBILITY constexpr
+enable_if_t<is_floating_point_v<_Fp>, _Fp>
----------------
zoecarver wrote:
> Also, maybe use `_LIBCPP_CONSTEXPR`.
We don't use `_LIBCPP_CONSTEXPR` in new code - code that requires C++20 (for example), because we assume that modern compilers support constexpr. `_LIBCPP_CONSTEXPR` is mostly useful for things that should be constexpr, but either (a) have to exist in C++03/11, or (b) for supporting compilers that have incomplete implementations of constexpr.
I am aware that we are not 100% consistent on this.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61014/new/
https://reviews.llvm.org/D61014
More information about the libcxx-commits
mailing list