add a range_fwd.hpp header file for the main classes/structs and the extension points.

This commit is contained in:
Neil Groves
2014-06-05 19:10:19 +01:00
parent 4c8164a9aa
commit fe1a592e46
5 changed files with 68 additions and 4 deletions

View File

@ -17,7 +17,7 @@
#include <boost/range/config.hpp> #include <boost/range/config.hpp>
#include <boost/range/range_fwd.hpp>
#include <boost/range/detail/extract_optional_type.hpp> #include <boost/range/detail/extract_optional_type.hpp>
#include <boost/type_traits/remove_const.hpp> #include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp> #include <boost/type_traits/remove_reference.hpp>

View File

@ -16,6 +16,7 @@
#endif #endif
#include <boost/range/config.hpp> #include <boost/range/config.hpp>
#include <boost/range/range_fwd.hpp>
#include <boost/range/mutable_iterator.hpp> #include <boost/range/mutable_iterator.hpp>
#include <boost/range/const_iterator.hpp> #include <boost/range/const_iterator.hpp>
#include <boost/type_traits/is_const.hpp> #include <boost/type_traits/is_const.hpp>

View File

@ -17,7 +17,7 @@
#include <boost/range/config.hpp> #include <boost/range/config.hpp>
#include <boost/range/range_fwd.hpp>
#include <boost/range/detail/extract_optional_type.hpp> #include <boost/range/detail/extract_optional_type.hpp>
#include <boost/type_traits/remove_reference.hpp> #include <boost/type_traits/remove_reference.hpp>
#include <boost/iterator/iterator_traits.hpp> #include <boost/iterator/iterator_traits.hpp>

View File

@ -0,0 +1,63 @@
// Boost.Range library
//
// Copyright Neil Groves 2003-2004.
// Use, modification and distribution is subject to 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)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_RANGE_FWD_HPP_INCLUDED
#define BOOST_RANGE_RANGE_FWD_HPP_INCLUDED
namespace boost
{
// Extension points
template<typename C, typename Enabler>
struct range_iterator;
template<typename C, typename Enabler>
struct range_mutable_iterator;
template<typename C, typename Enabler>
struct range_const_iterator;
// Core classes
template<typename IteratorT>
class iterator_range;
template<typename ForwardRange>
class sub_range;
// Meta-functions
template<typename T>
struct range_category;
template<typename T>
struct range_difference;
template<typename T>
struct range_pointer;
template<typename T>
struct range_reference;
template<typename T>
struct range_reverse_iterator;
template<typename T>
struct range_size;
template<typename T>
struct range_value;
template<typename T>
struct has_range_iterator;
template<typename T>
struct has_range_const_iterator;
} // namespace boost
#endif // include guard

View File

@ -27,12 +27,12 @@ namespace boost
// default // default
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
template< typename C > template< typename T >
struct range_reverse_iterator struct range_reverse_iterator
{ {
typedef reverse_iterator< typedef reverse_iterator<
BOOST_DEDUCED_TYPENAME range_iterator< BOOST_DEDUCED_TYPENAME range_iterator<
BOOST_DEDUCED_TYPENAME remove_reference<C>::type>::type > type; BOOST_DEDUCED_TYPENAME remove_reference<T>::type>::type > type;
}; };