dynamic_step.hpp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. #include <boost/gil/concepts/fwd.hpp>
  11. #include <boost/gil/concepts/concept_check.hpp>
  12. #if defined(BOOST_CLANG)
  13. #pragma clang diagnostic push
  14. #pragma clang diagnostic ignored "-Wunknown-pragmas"
  15. #pragma clang diagnostic ignored "-Wunused-local-typedefs"
  16. #endif
  17. #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
  18. #pragma GCC diagnostic push
  19. #pragma GCC diagnostic ignored "-Wunused-local-typedefs"
  20. #endif
  21. namespace boost { namespace gil {
  22. /// \ingroup PixelIteratorConcept
  23. /// \brief Concept for iterators, locators and views that can define a type just like the given
  24. /// iterator, locator or view, except it supports runtime specified step along the X navigation.
  25. ///
  26. /// \code
  27. /// concept HasDynamicXStepTypeConcept<typename T>
  28. /// {
  29. /// typename dynamic_x_step_type<T>;
  30. /// where Metafunction<dynamic_x_step_type<T> >;
  31. /// };
  32. /// \endcode
  33. template <typename T>
  34. struct HasDynamicXStepTypeConcept
  35. {
  36. void constraints()
  37. {
  38. using type = typename dynamic_x_step_type<T>::type;
  39. ignore_unused_variable_warning(type{});
  40. }
  41. };
  42. /// \ingroup PixelLocatorConcept
  43. /// \brief Concept for locators and views that can define a type just like the given locator or view,
  44. /// except it supports runtime specified step along the Y navigation
  45. /// \code
  46. /// concept HasDynamicYStepTypeConcept<typename T>
  47. /// {
  48. /// typename dynamic_y_step_type<T>;
  49. /// where Metafunction<dynamic_y_step_type<T> >;
  50. /// };
  51. /// \endcode
  52. template <typename T>
  53. struct HasDynamicYStepTypeConcept
  54. {
  55. void constraints()
  56. {
  57. using type = typename dynamic_y_step_type<T>::type;
  58. ignore_unused_variable_warning(type{});
  59. }
  60. };
  61. }} // namespace boost::gil
  62. #if defined(BOOST_CLANG)
  63. #pragma clang diagnostic pop
  64. #endif
  65. #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
  66. #pragma GCC diagnostic pop
  67. #endif
  68. #endif