Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/move/detail/iterator_to_raw_pointer.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 //////////////////////////////////////////////////////////////////////////////
0002 //
0003 // (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost
0004 // Software License, Version 1.0. (See accompanying file
0005 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // See http://www.boost.org/libs/container for documentation.
0008 //
0009 //////////////////////////////////////////////////////////////////////////////
0010 #ifndef BOOST_MOVE_DETAIL_ITERATOR_TO_RAW_POINTER_HPP
0011 #define BOOST_MOVE_DETAIL_ITERATOR_TO_RAW_POINTER_HPP
0012 
0013 #ifndef BOOST_CONFIG_HPP
0014 #  include <boost/config.hpp>
0015 #endif
0016 
0017 #if defined(BOOST_HAS_PRAGMA_ONCE)
0018 #  pragma once
0019 #endif
0020 
0021 #include <boost/move/detail/iterator_traits.hpp>
0022 #include <boost/move/detail/to_raw_pointer.hpp>
0023 #include <boost/move/detail/pointer_element.hpp>
0024 
0025 namespace boost {
0026 namespace movelib {
0027 namespace detail {
0028 
0029 template <class T>
0030 inline T* iterator_to_pointer(T* i)
0031 {  return i; }
0032 
0033 template <class Iterator>
0034 inline typename boost::movelib::iterator_traits<Iterator>::pointer
0035    iterator_to_pointer(const Iterator &i)
0036 {  return i.operator->();  }
0037 
0038 template <class Iterator>
0039 struct iterator_to_element_ptr
0040 {
0041    typedef typename boost::movelib::iterator_traits<Iterator>::pointer  pointer;
0042    typedef typename boost::movelib::pointer_element<pointer>::type      element_type;
0043    typedef element_type* type;
0044 };
0045 
0046 }  //namespace detail {
0047 
0048 template <class Iterator>
0049 inline typename boost::movelib::detail::iterator_to_element_ptr<Iterator>::type
0050    iterator_to_raw_pointer(const Iterator &i)
0051 {
0052    return ::boost::movelib::to_raw_pointer
0053       (  ::boost::movelib::detail::iterator_to_pointer(i)   );
0054 }
0055 
0056 }  //namespace movelib {
0057 }  //namespace boost {
0058 
0059 #endif   //#ifndef BOOST_MOVE_DETAIL_ITERATOR_TO_RAW_POINTER_HPP