EricWF added a comment.

Gosh darn it Howard. Your like 10 minutes ahead of me.

Here is a constexpr gcd test.
https://gist.github.com/EricWF/46ea4489f405ec9f83325a278fe99535


================
Comment at: include/experimental/numeric:50
@@ +49,3 @@
+struct __abs<_Tp, true> {
+       _LIBCPP_INLINE_VISIBILITY _Tp operator()(_Tp __t) const noexcept { 
return _VSTD::abs(__t); }
+};
----------------
Both the call operator and `abs` are not constexpr.

================
Comment at: include/experimental/numeric:55
@@ +54,3 @@
+struct __abs<_Tp, false> {
+       _LIBCPP_INLINE_VISIBILITY _Tp operator()(_Tp __t) const noexcept { 
return __t; }
+};
----------------
Call operator is not constexpr.


http://reviews.llvm.org/D21343



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to