diff --git a/include/boost/move/detail/iterator_to_raw_pointer.hpp b/include/boost/move/detail/iterator_to_raw_pointer.hpp new file mode 100644 index 0000000..97ee3a6 --- /dev/null +++ b/include/boost/move/detail/iterator_to_raw_pointer.hpp @@ -0,0 +1,59 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/container for documentation. +// +////////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_MOVE_DETAIL_ITERATOR_TO_RAW_POINTER_HPP +#define BOOST_MOVE_DETAIL_ITERATOR_TO_RAW_POINTER_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif + +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include +#include +#include + +namespace boost { +namespace movelib { +namespace detail { + +template +inline T* iterator_to_pointer(T* i) +{ return i; } + +template +inline typename boost::movelib::iterator_traits::pointer + iterator_to_pointer(const Iterator &i) +{ return i.operator->(); } + +template +struct iterator_to_element_ptr +{ + typedef typename boost::movelib::iterator_traits::pointer pointer; + typedef typename boost::movelib::pointer_element::type element_type; + typedef element_type* type; +}; + +} //namespace detail { + +template +inline typename boost::movelib::detail::iterator_to_element_ptr::type + iterator_to_raw_pointer(const Iterator &i) +{ + return ::boost::movelib::to_raw_pointer + ( ::boost::movelib::detail::iterator_to_pointer(i) ); +} + +} //namespace movelib { +} //namespace boost { + +#endif //#ifndef BOOST_MOVE_DETAIL_ITERATOR_TO_RAW_POINTER_HPP diff --git a/include/boost/move/detail/pointer_element.hpp b/include/boost/move/detail/pointer_element.hpp new file mode 100644 index 0000000..ecdd608 --- /dev/null +++ b/include/boost/move/detail/pointer_element.hpp @@ -0,0 +1,168 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2014-2017. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_MOVE_DETAIL_POINTER_ELEMENT_HPP +#define BOOST_MOVE_DETAIL_POINTER_ELEMENT_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif + +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP +#include +#endif //BOOST_MOVE_DETAIL_WORKAROUND_HPP + +namespace boost { +namespace movelib { +namespace detail{ + +////////////////////// +//struct first_param +////////////////////// + +template struct first_param +{ typedef void type; }; + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + + template