make mapnik_value_type_t C++11-friendly
This commit is contained in:
parent
06201e3842
commit
fdd542a3c4
1 changed files with 5 additions and 5 deletions
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
// mapnik
|
// mapnik
|
||||||
#include <mapnik/config.hpp>
|
#include <mapnik/config.hpp>
|
||||||
|
#include <mapnik/cxx11_support.hpp>
|
||||||
#include <mapnik/pixel_types.hpp>
|
#include <mapnik/pixel_types.hpp>
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,7 +35,6 @@
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
// stl
|
// stl
|
||||||
#include <type_traits>
|
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
|
@ -160,13 +160,13 @@ namespace detail {
|
||||||
// value_double if T is a floating-point type
|
// value_double if T is a floating-point type
|
||||||
// T && otherwise
|
// T && otherwise
|
||||||
|
|
||||||
template <typename T, typename dT = std::decay_t<T>>
|
template <typename T, typename dT = decay_t<T>>
|
||||||
using mapnik_value_type_t =
|
using mapnik_value_type_t =
|
||||||
std::conditional_t<
|
conditional_t<
|
||||||
std::is_same<dT, bool>::value, value_bool,
|
std::is_same<dT, bool>::value, value_bool,
|
||||||
std::conditional_t<
|
conditional_t<
|
||||||
std::is_integral<dT>::value, value_integer,
|
std::is_integral<dT>::value, value_integer,
|
||||||
std::conditional_t<
|
conditional_t<
|
||||||
std::is_floating_point<dT>::value, value_double,
|
std::is_floating_point<dT>::value, value_double,
|
||||||
T && >>>;
|
T && >>>;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue