diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-04 09:29:55 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-04 09:41:59 +0000 |
commit | 430875de5cad1c2288f06499b124b001dba44ba3 (patch) | |
tree | a57395cfe6aff4931df565952788539a73951228 /include/tools/helpers.hxx | |
parent | 6911997675ec74ce71c4b3cb954a02bd1a0b3bf8 (diff) |
boost->std in include/tools
Change-Id: I387340162d791bca2e589a2bad0575030138bd89
Reviewed-on: https://gerrit.libreoffice.org/19772
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/tools/helpers.hxx')
-rw-r--r-- | include/tools/helpers.hxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/include/tools/helpers.hxx b/include/tools/helpers.hxx index 8b04050bc918..858ec4f7fc50 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 |