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 "-Wunknown-pragmas" 19 #pragma clang diagnostic ignored "-Wunused-local-typedefs" 22 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900) 23 #pragma GCC diagnostic push 24 #pragma GCC diagnostic ignored "-Wunused-local-typedefs" 27 namespace boost {
namespace gil {
33 template <std::
size_t K,
typename T>
34 T
const& axis_value(point<T>
const& p);
36 template <std::
size_t K,
typename T>
37 T& axis_value(point<T>& p);
65 gil_function_requires<Regular<P>>();
67 using value_type =
typename P::value_type;
68 ignore_unused_variable_warning(value_type{});
70 static const std::size_t N = P::num_dimensions;
71 ignore_unused_variable_warning(N);
72 using FT =
typename P::template axis<0>::coord_t;
73 using LT =
typename P::template axis<N - 1>::coord_t;
74 FT ft = gil::axis_value<0>(
point);
75 axis_value<0>(
point) = ft;
76 LT lt = axis_value<N - 1>(
point);
77 axis_value<N - 1>(
point) = lt;
102 template <
typename P>
107 gil_function_requires<PointNDConcept<P>>();
108 static_assert(P::num_dimensions == 2,
"");
117 #if defined(BOOST_CLANG) 118 #pragma clang diagnostic pop 121 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900) 122 #pragma GCC diagnostic pop N-dimensional point concept.
Definition: concepts/point.hpp:61
2-dimensional point concept
Definition: concepts/point.hpp:103
2D point both axes of which have the same dimension typeModels: Point2DConcept
Definition: locator.hpp:28