[Libreoffice-commits] core.git: include/tools
Noel Grandin
noel at peralex.com
Wed Nov 4 01:42:24 PST 2015
include/tools/helpers.hxx | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
New commits:
commit 430875de5cad1c2288f06499b124b001dba44ba3
Author: Noel Grandin <noel at peralex.com>
Date: Wed Nov 4 09:29:55 2015 +0200
boost->std in include/tools
Change-Id: I387340162d791bca2e589a2bad0575030138bd89
Reviewed-on: https://gerrit.libreoffice.org/19772
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/include/tools/helpers.hxx b/include/tools/helpers.hxx
index 8b04050..858ec4f 100644
--- a/include/tools/helpers.hxx
+++ b/include/tools/helpers.hxx
@@ -12,18 +12,12 @@
#include <sal/config.h>
#include <cassert>
-
-#include <boost/mpl/or.hpp>
-#include <boost/type_traits/is_floating_point.hpp>
-#include <boost/type_traits/is_signed.hpp>
-#include <boost/type_traits/is_unsigned.hpp>
-#include <boost/utility/enable_if.hpp>
+#include <type_traits>
template<typename T>
inline
-typename boost::enable_if<
- boost::mpl::or_< boost::is_signed<T>, boost::is_floating_point<T> >, long>
- ::type
+typename std::enable_if<
+ std::is_signed<T>::value || std::is_floating_point<T>::value, long >::type
MinMax(T nVal, long nMin, long nMax)
{
assert(nMin <= nMax);
@@ -32,8 +26,10 @@ MinMax(T nVal, long nMin, long nMax)
}
template<typename T>
-inline typename boost::enable_if<boost::is_unsigned<T>, long>::type MinMax(
- T nVal, long nMin, long nMax)
+inline
+typename std::enable_if<
+ std::is_unsigned<T>::value, long >::type
+MinMax(T nVal, long nMin, long nMax)
{
assert(nMin <= nMax);
return nMax < 0
More information about the Libreoffice-commits
mailing list