make mapnik_value_type_t C++11-friendly

This commit is contained in:
Mickey Rose 2016-12-15 11:58:50 +01:00
parent 06201e3842
commit fdd542a3c4

View file

@ -25,6 +25,7 @@
// mapnik
#include <mapnik/config.hpp>
#include <mapnik/cxx11_support.hpp>
#include <mapnik/pixel_types.hpp>
@ -34,7 +35,6 @@
#pragma GCC diagnostic pop
// stl
#include <type_traits>
#include <iosfwd>
#include <cstddef>
@ -160,13 +160,13 @@ namespace detail {
// value_double if T is a floating-point type
// T && otherwise
template <typename T, typename dT = std::decay_t<T>>
template <typename T, typename dT = decay_t<T>>
using mapnik_value_type_t =
std::conditional_t<
conditional_t<
std::is_same<dT, bool>::value, value_bool,
std::conditional_t<
conditional_t<
std::is_integral<dT>::value, value_integer,
std::conditional_t<
conditional_t<
std::is_floating_point<dT>::value, value_double,
T && >>>;