// Boost.Geometry // Copyright (c) 2020, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html #ifndef BOOST_GEOMETRY_UTIL_TYPE_TRAITS_HPP #define BOOST_GEOMETRY_UTIL_TYPE_TRAITS_HPP #include #include #include namespace boost { namespace geometry { namespace util { template struct is_geometry : bool_constant::type>::value> {}; template struct is_not_geometry : std::is_void::type> {}; template struct is_point : std::is_same::type> {}; template struct is_multi_point : std::is_same::type> {}; template struct is_pointlike : std::is_base_of::type> {}; template struct is_segment : std::is_same::type> {}; template struct is_linestring : std::is_same::type> {}; template struct is_multi_linestring : std::is_same::type> {}; template struct is_polylinear : std::is_base_of::type> {}; template struct is_linear : std::is_base_of::type> {}; template struct is_box : std::is_same::type> {}; template struct is_ring : std::is_same::type> {}; template struct is_polygon : std::is_same::type> {}; template struct is_multi_polygon : std::is_same::type> {}; template struct is_polygonal : std::is_base_of::type> {}; template struct is_areal : std::is_base_of::type> {}; template struct is_polysegmental : bool_constant::value || is_polygonal::value> {}; template struct is_multi : std::is_base_of::type> {}; template struct is_multi_element : bool_constant::value || is_linestring::value || is_polygon::value> {}; template struct is_single : std::is_base_of::type> {}; template struct enable_if_point : std::enable_if::value, T> {}; template using enable_if_point_t = typename enable_if_point::type; template struct enable_if_multi_point : std::enable_if::value, T> {}; template using enable_if_multi_point_t = typename enable_if_multi_point::type; template struct enable_if_pointlike : std::enable_if::value, T> {}; template using enable_if_pointlike_t = typename enable_if_pointlike::type; template struct enable_if_segment : std::enable_if::value, T> {}; template using enable_if_segment_t = typename enable_if_segment::type; template struct enable_if_polylinear : std::enable_if::value, T> {}; template using enable_if_polylinear_t = typename enable_if_polylinear::type; template struct enable_if_linear : std::enable_if::value, T> {}; template using enable_if_linear_t = typename enable_if_linear::type; template struct enable_if_box : std::enable_if::value, T> {}; template using enable_if_box_t = typename enable_if_box::type; template struct enable_if_polygonal : std::enable_if::value, T> {}; template using enable_if_polygonal_t = typename enable_if_polygonal::type; template struct enable_if_areal : std::enable_if::value, T> {}; template using enable_if_areal_t = typename enable_if_areal::type; template struct enable_if_polysegmental : std::enable_if::value, T> {}; template using enable_if_polysegmental_t = typename enable_if_polysegmental::type; } // namespace util // Deprecated utilities, defined for backward compatibility but might be // removed in the future. /*! \brief Meta-function defining "true" for areal types (box, (multi)polygon, ring), \note Used for tag dispatching and meta-function finetuning \note Also a "ring" has areal properties within Boost.Geometry \ingroup core */ using util::is_areal; }} // namespace boost::geometry #endif // BOOST_GEOMETRY_STRATEGIES_DETAIL_HPP