/Src/Dependencies/Boost/boost/range/mutable_iterator.hpp

http://hadesmem.googlecode.com/ · C++ Header · 67 lines · 34 code · 15 blank · 18 comment · 1 complexity · 73bc8a0ed42e073ff79b647964d34615 MD5 · raw file

  1. // Boost.Range library
  2. //
  3. // Copyright Thorsten Ottosen 2003-2004. Use, modification and
  4. // distribution is subject to the Boost Software License, Version
  5. // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. // For more information, see http://www.boost.org/libs/range/
  9. //
  10. #ifndef BOOST_RANGE_MUTABLE_ITERATOR_HPP
  11. #define BOOST_RANGE_MUTABLE_ITERATOR_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif
  15. #include <boost/range/config.hpp>
  16. #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
  17. #include <boost/range/detail/iterator.hpp>
  18. #else
  19. #include <boost/range/detail/extract_optional_type.hpp>
  20. #include <boost/iterator/iterator_traits.hpp>
  21. #include <cstddef>
  22. #include <utility>
  23. namespace boost
  24. {
  25. //////////////////////////////////////////////////////////////////////////
  26. // default
  27. //////////////////////////////////////////////////////////////////////////
  28. namespace range_detail {
  29. BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( iterator )
  30. }
  31. template< typename C >
  32. struct range_mutable_iterator : range_detail::extract_iterator<C>
  33. {};
  34. //////////////////////////////////////////////////////////////////////////
  35. // pair
  36. //////////////////////////////////////////////////////////////////////////
  37. template< typename Iterator >
  38. struct range_mutable_iterator< std::pair<Iterator,Iterator> >
  39. {
  40. typedef Iterator type;
  41. };
  42. //////////////////////////////////////////////////////////////////////////
  43. // array
  44. //////////////////////////////////////////////////////////////////////////
  45. template< typename T, std::size_t sz >
  46. struct range_mutable_iterator< T[sz] >
  47. {
  48. typedef T* type;
  49. };
  50. } // namespace boost
  51. #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
  52. #endif