[libcxx-commits] [libcxx] r360167 - Mark private function __sign as constexpr.
Marshall Clow via libcxx-commits
libcxx-commits at lists.llvm.org
Tue May 7 09:07:24 PDT 2019
Author: marshall
Date: Tue May 7 09:07:24 2019
New Revision: 360167
URL: http://llvm.org/viewvc/llvm-project?rev=360167&view=rev
Log:
Mark private function __sign as constexpr.
Modified:
libcxx/trunk/include/numeric
Modified: libcxx/trunk/include/numeric
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/numeric?rev=360167&r1=360166&r2=360167&view=diff
==============================================================================
--- libcxx/trunk/include/numeric (original)
+++ libcxx/trunk/include/numeric Tue May 7 09:07:24 2019
@@ -556,7 +556,7 @@ midpoint(_TPtr __a, _TPtr __b) noexcept
template <typename _Tp>
-int __sign(_Tp __val) {
+constexpr int __sign(_Tp __val) {
return (_Tp(0) < __val) - (__val < _Tp(0));
}
More information about the libcxx-commits
mailing list