dynamic_step.hpp 2.0 KB

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