From fc3a3d8267a6e4c5895967cdce3f0a341d5d7230 Mon Sep 17 00:00:00 2001 From: Joe Loser Date: Wed, 6 Jun 2018 22:42:40 -0400 Subject: [PATCH] Remove BEAST_NO_ZERO_AUTO_RETURN in Zero.h --- src/ripple/beast/utility/Zero.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/ripple/beast/utility/Zero.h b/src/ripple/beast/utility/Zero.h index 57f8c92c25..7411aae516 100644 --- a/src/ripple/beast/utility/Zero.h +++ b/src/ripple/beast/utility/Zero.h @@ -22,9 +22,6 @@ #include -// VS2013 SP1 fails with decltype return -#define BEAST_NO_ZERO_AUTO_RETURN 1 - namespace beast { /** Zero allows classes to offer efficient comparisons to zero. @@ -55,11 +52,7 @@ static constexpr Zero zero{}; /** Default implementation of signum calls the method on the class. */ template -#if BEAST_NO_ZERO_AUTO_RETURN -int signum(T const& t) -#else -auto signum(T const& t) -> decltype(t.signum()) -#endif +auto signum(T const& t) { return t.signum(); } @@ -70,11 +63,7 @@ namespace zero_helper { // For argument dependent lookup to function properly, calls to signum must // be made from a namespace that does not include overloads of the function.. template -#if BEAST_NO_ZERO_AUTO_RETURN -int call_signum (T const& t) -#else -auto call_signum(T const& t) -> decltype(t.signum()) -#endif +auto call_signum(T const& t) { return signum(t); }