Imported Upstream version 1.72.0
[platform/upstream/boost.git] / boost / gil / concepts / dynamic_step.hpp
1 //
2 // Copyright 2005-2007 Adobe Systems Incorporated
3 //
4 // Distributed under the Boost Software License, Version 1.0
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
7 //
8 #ifndef BOOST_GIL_CONCEPTS_DYNAMIC_STEP_HPP
9 #define BOOST_GIL_CONCEPTS_DYNAMIC_STEP_HPP
10
11 #include <boost/gil/concepts/fwd.hpp>
12 #include <boost/gil/concepts/concept_check.hpp>
13
14 #if defined(BOOST_CLANG)
15 #pragma clang diagnostic push
16 #pragma clang diagnostic ignored "-Wunused-local-typedefs"
17 #endif
18
19 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
20 #pragma GCC diagnostic push
21 #pragma GCC diagnostic ignored "-Wunused-local-typedefs"
22 #endif
23
24 namespace boost { namespace gil {
25
26 /// \ingroup PixelIteratorConcept
27 /// \brief Concept for iterators, locators and views that can define a type just like the given
28 ///        iterator, locator or view, except it supports runtime specified step along the X navigation.
29 ///
30 /// \code
31 /// concept HasDynamicXStepTypeConcept<typename T>
32 /// {
33 ///     typename dynamic_x_step_type<T>;
34 ///         where Metafunction<dynamic_x_step_type<T> >;
35 /// };
36 /// \endcode
37 template <typename T>
38 struct HasDynamicXStepTypeConcept
39 {
40     void constraints()
41     {
42         using type = typename dynamic_x_step_type<T>::type;
43         ignore_unused_variable_warning(type{});
44     }
45 };
46
47 /// \ingroup PixelLocatorConcept
48 /// \brief Concept for locators and views that can define a type just like the given locator or view,
49 ///        except it supports runtime specified step along the Y navigation
50 /// \code
51 /// concept HasDynamicYStepTypeConcept<typename T>
52 /// {
53 ///     typename dynamic_y_step_type<T>;
54 ///         where Metafunction<dynamic_y_step_type<T> >;
55 /// };
56 /// \endcode
57 template <typename T>
58 struct HasDynamicYStepTypeConcept
59 {
60     void constraints()
61     {
62         using type = typename dynamic_y_step_type<T>::type;
63         ignore_unused_variable_warning(type{});
64     }
65 };
66
67 }} // namespace boost::gil
68
69 #if defined(BOOST_CLANG)
70 #pragma clang diagnostic pop
71 #endif
72
73 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
74 #pragma GCC diagnostic pop
75 #endif
76
77 #endif