8 #ifndef BOOST_GIL_CONCEPTS_POINT_HPP 9 #define BOOST_GIL_CONCEPTS_POINT_HPP 11 #include <boost/gil/concepts/basic.hpp> 12 #include <boost/gil/concepts/concept_check.hpp> 16 #if defined(BOOST_CLANG) 17 #pragma clang diagnostic push 18 #pragma clang diagnostic ignored "-Wunused-local-typedefs" 21 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900) 22 #pragma GCC diagnostic push 23 #pragma GCC diagnostic ignored "-Wunused-local-typedefs" 26 namespace boost {
namespace gil {
32 template <std::
size_t K,
typename T>
33 T
const& axis_value(point<T>
const& p);
35 template <std::
size_t K,
typename T>
36 T& axis_value(point<T>& p);
64 gil_function_requires<Regular<P>>();
66 using value_type =
typename P::value_type;
67 ignore_unused_variable_warning(value_type{});
69 static const std::size_t N = P::num_dimensions;
70 ignore_unused_variable_warning(N);
71 using FT =
typename P::template axis<0>::coord_t;
72 using LT =
typename P::template axis<N - 1>::coord_t;
73 FT ft = gil::axis_value<0>(
point);
74 axis_value<0>(
point) = ft;
75 LT lt = axis_value<N - 1>(
point);
76 axis_value<N - 1>(
point) = lt;
101 template <
typename P>
106 gil_function_requires<PointNDConcept<P>>();
107 static_assert(P::num_dimensions == 2,
"");
116 #if defined(BOOST_CLANG) 117 #pragma clang diagnostic pop 120 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900) 121 #pragma GCC diagnostic pop N-dimensional point concept.
Definition: concepts/point.hpp:60
2-dimensional point concept
Definition: concepts/point.hpp:102
2D point both axes of which have the same dimension typeModels: Point2DConcept
Definition: locator.hpp:28