annotate DEPENDENCIES/generic/include/boost/move/detail/iterator_traits.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents f46d142149f5
children
rev   line source
Chris@102 1 //////////////////////////////////////////////////////////////////////////////
Chris@102 2 //
Chris@102 3 // (C) Copyright Ion Gaztanaga 2014-2014.
Chris@102 4 // Distributed under the Boost Software License, Version 1.0.
Chris@102 5 // (See accompanying file LICENSE_1_0.txt or copy at
Chris@102 6 // http://www.boost.org/LICENSE_1_0.txt)
Chris@102 7 //
Chris@102 8 // See http://www.boost.org/libs/move for documentation.
Chris@102 9 //
Chris@102 10 //////////////////////////////////////////////////////////////////////////////
Chris@102 11
Chris@102 12 //! \file
Chris@102 13
Chris@102 14 #ifndef BOOST_MOVE_DETAIL_ITERATOR_TRAITS_HPP
Chris@102 15 #define BOOST_MOVE_DETAIL_ITERATOR_TRAITS_HPP
Chris@102 16
Chris@102 17 #ifndef BOOST_CONFIG_HPP
Chris@102 18 # include <boost/config.hpp>
Chris@102 19 #endif
Chris@102 20 #
Chris@102 21 #if defined(BOOST_HAS_PRAGMA_ONCE)
Chris@102 22 # pragma once
Chris@102 23 #endif
Chris@102 24
Chris@102 25 #include <cstddef>
Chris@102 26
Chris@102 27 #if defined(__clang__) && defined(_LIBCPP_VERSION)
Chris@102 28 #define BOOST_MOVE_CLANG_INLINE_STD_NS
Chris@102 29 #pragma GCC diagnostic push
Chris@102 30 #pragma GCC diagnostic ignored "-Wc++11-extensions"
Chris@102 31 #define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
Chris@102 32 #define BOOST_MOVE_STD_NS_END _LIBCPP_END_NAMESPACE_STD
Chris@102 33 #else
Chris@102 34 #define BOOST_MOVE_STD_NS_BEG namespace std{
Chris@102 35 #define BOOST_MOVE_STD_NS_END }
Chris@102 36 #endif
Chris@102 37
Chris@102 38 BOOST_MOVE_STD_NS_BEG
Chris@102 39
Chris@102 40 struct input_iterator_tag;
Chris@102 41 struct forward_iterator_tag;
Chris@102 42 struct bidirectional_iterator_tag;
Chris@102 43 struct random_access_iterator_tag;
Chris@102 44 struct output_iterator_tag;
Chris@102 45
Chris@102 46 BOOST_MOVE_STD_NS_END
Chris@102 47
Chris@102 48 #ifdef BOOST_MOVE_CLANG_INLINE_STD_NS
Chris@102 49 #pragma GCC diagnostic pop
Chris@102 50 #undef BOOST_MOVE_CLANG_INLINE_STD_NS
Chris@102 51 #endif //BOOST_MOVE_CLANG_INLINE_STD_NS
Chris@102 52
Chris@102 53 namespace boost{ namespace movelib{
Chris@102 54
Chris@102 55 template<class Iterator>
Chris@102 56 struct iterator_traits
Chris@102 57 {
Chris@102 58 typedef typename Iterator::difference_type difference_type;
Chris@102 59 typedef typename Iterator::value_type value_type;
Chris@102 60 typedef typename Iterator::pointer pointer;
Chris@102 61 typedef typename Iterator::reference reference;
Chris@102 62 typedef typename Iterator::iterator_category iterator_category;
Chris@102 63 };
Chris@102 64
Chris@102 65 template<class T>
Chris@102 66 struct iterator_traits<T*>
Chris@102 67 {
Chris@102 68 typedef std::ptrdiff_t difference_type;
Chris@102 69 typedef T value_type;
Chris@102 70 typedef T* pointer;
Chris@102 71 typedef T& reference;
Chris@102 72 typedef std::random_access_iterator_tag iterator_category;
Chris@102 73 };
Chris@102 74
Chris@102 75 template<class T>
Chris@102 76 struct iterator_traits<const T*>
Chris@102 77 {
Chris@102 78 typedef std::ptrdiff_t difference_type;
Chris@102 79 typedef T value_type;
Chris@102 80 typedef const T* pointer;
Chris@102 81 typedef const T& reference;
Chris@102 82 typedef std::random_access_iterator_tag iterator_category;
Chris@102 83 };
Chris@102 84
Chris@102 85 }} //namespace boost { namespace movelib{
Chris@102 86
Chris@102 87 #endif //#ifndef BOOST_MOVE_DETAIL_ITERATOR_TRAITS_HPP