Kaydet (Commit) 430875de authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

boost->std in include/tools

Change-Id: I387340162d791bca2e589a2bad0575030138bd89
Reviewed-on: https://gerrit.libreoffice.org/19772Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 69119976
...@@ -12,18 +12,12 @@ ...@@ -12,18 +12,12 @@
#include <sal/config.h> #include <sal/config.h>
#include <cassert> #include <cassert>
#include <type_traits>
#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>
template<typename T> template<typename T>
inline inline
typename boost::enable_if< typename std::enable_if<
boost::mpl::or_< boost::is_signed<T>, boost::is_floating_point<T> >, long> std::is_signed<T>::value || std::is_floating_point<T>::value, long >::type
::type
MinMax(T nVal, long nMin, long nMax) MinMax(T nVal, long nMin, long nMax)
{ {
assert(nMin <= nMax); assert(nMin <= nMax);
...@@ -32,8 +26,10 @@ MinMax(T nVal, long nMin, long nMax) ...@@ -32,8 +26,10 @@ MinMax(T nVal, long nMin, long nMax)
} }
template<typename T> template<typename T>
inline typename boost::enable_if<boost::is_unsigned<T>, long>::type MinMax( inline
T nVal, long nMin, long nMax) typename std::enable_if<
std::is_unsigned<T>::value, long >::type
MinMax(T nVal, long nMin, long nMax)
{ {
assert(nMin <= nMax); assert(nMin <= nMax);
return nMax < 0 return nMax < 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment