2
0
mirror of https://github.com/boostorg/gil.git synced 2026-02-19 02:22:09 +00:00

Replace boost::integer_traits with std::numeric_limits

std::numeric_limits<T>::max() is constexpr since C++11
This commit is contained in:
Mateusz Loskot
2018-05-12 13:24:03 +02:00
committed by Stefan Seefeld
parent a6795334d3
commit 9f4bc93ad6

View File

@@ -24,7 +24,6 @@
////////////////////////////////////////////////////////////////////////////////////////
#include <boost/config.hpp>
#include <boost/integer_traits.hpp>
#include <boost/mpl/less.hpp>
#include <boost/mpl/integral_c.hpp>
#include <boost/mpl/greater.hpp>
@@ -34,6 +33,8 @@
#include "channel.hpp"
#include "typedefs.hpp"
#include <limits>
namespace boost { namespace gil {
//#ifdef _MSC_VER
@@ -55,7 +56,7 @@ template <typename SrcChannelV, typename DstChannelV, bool SrcLessThanDst, bool
template <typename UnsignedIntegralChannel>
struct unsigned_integral_max_value : public mpl::integral_c<UnsignedIntegralChannel,integer_traits< UnsignedIntegralChannel>::const_max> {};
struct unsigned_integral_max_value : public mpl::integral_c<UnsignedIntegralChannel,std::numeric_limits<UnsignedIntegralChannel>::max()> {};
template <>
struct unsigned_integral_max_value<uint8_t> : public mpl::integral_c<uint32_t,0xFF> {};