From 99de2c293e9dfef2ae21279c5c84bd3f054430c7 Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Tue, 30 Nov 2004 07:29:46 +0000 Subject: [PATCH] Removed part of the Boost files from the SPIRIT_MINIBOOST branch. [SVN r26366] --- include/boost/range/begin.hpp | 175 ------- include/boost/range/config.hpp | 50 -- include/boost/range/const_iterator.hpp | 103 ---- .../boost/range/const_reverse_iterator.hpp | 37 -- include/boost/range/detail/begin.hpp | 120 ----- include/boost/range/detail/common.hpp | 116 ----- include/boost/range/detail/const_iterator.hpp | 123 ----- .../boost/range/detail/difference_type.hpp | 121 ----- include/boost/range/detail/empty.hpp | 120 ----- include/boost/range/detail/end.hpp | 143 ------ .../range/detail/implementation_help.hpp | 162 ------- include/boost/range/detail/iterator.hpp | 121 ----- include/boost/range/detail/sfinae.hpp | 77 --- include/boost/range/detail/size.hpp | 143 ------ include/boost/range/detail/size_type.hpp | 118 ----- include/boost/range/detail/sizer.hpp | 37 -- include/boost/range/detail/value_type.hpp | 122 ----- include/boost/range/difference_type.hpp | 107 ----- include/boost/range/empty.hpp | 67 --- include/boost/range/end.hpp | 179 ------- include/boost/range/functions.hpp | 25 - include/boost/range/iterator.hpp | 104 ---- include/boost/range/iterator_range.hpp | 453 ------------------ include/boost/range/metafunctions.hpp | 28 -- include/boost/range/rbegin.hpp | 66 --- include/boost/range/rend.hpp | 66 --- include/boost/range/result_iterator.hpp | 43 -- include/boost/range/reverse_iterator.hpp | 40 -- .../boost/range/reverse_result_iterator.hpp | 39 -- include/boost/range/size.hpp | 116 ----- include/boost/range/size_type.hpp | 103 ---- include/boost/range/sub_range.hpp | 114 ----- include/boost/range/value_type.hpp | 108 ----- 33 files changed, 3546 deletions(-) delete mode 100755 include/boost/range/begin.hpp delete mode 100755 include/boost/range/config.hpp delete mode 100755 include/boost/range/const_iterator.hpp delete mode 100755 include/boost/range/const_reverse_iterator.hpp delete mode 100755 include/boost/range/detail/begin.hpp delete mode 100755 include/boost/range/detail/common.hpp delete mode 100755 include/boost/range/detail/const_iterator.hpp delete mode 100755 include/boost/range/detail/difference_type.hpp delete mode 100755 include/boost/range/detail/empty.hpp delete mode 100755 include/boost/range/detail/end.hpp delete mode 100755 include/boost/range/detail/implementation_help.hpp delete mode 100755 include/boost/range/detail/iterator.hpp delete mode 100755 include/boost/range/detail/sfinae.hpp delete mode 100755 include/boost/range/detail/size.hpp delete mode 100755 include/boost/range/detail/size_type.hpp delete mode 100755 include/boost/range/detail/sizer.hpp delete mode 100755 include/boost/range/detail/value_type.hpp delete mode 100755 include/boost/range/difference_type.hpp delete mode 100755 include/boost/range/empty.hpp delete mode 100755 include/boost/range/end.hpp delete mode 100755 include/boost/range/functions.hpp delete mode 100755 include/boost/range/iterator.hpp delete mode 100755 include/boost/range/iterator_range.hpp delete mode 100755 include/boost/range/metafunctions.hpp delete mode 100755 include/boost/range/rbegin.hpp delete mode 100755 include/boost/range/rend.hpp delete mode 100755 include/boost/range/result_iterator.hpp delete mode 100755 include/boost/range/reverse_iterator.hpp delete mode 100755 include/boost/range/reverse_result_iterator.hpp delete mode 100755 include/boost/range/size.hpp delete mode 100755 include/boost/range/size_type.hpp delete mode 100755 include/boost/range/sub_range.hpp delete mode 100755 include/boost/range/value_type.hpp diff --git a/include/boost/range/begin.hpp b/include/boost/range/begin.hpp deleted file mode 100755 index 162a29d..0000000 --- a/include/boost/range/begin.hpp +++ /dev/null @@ -1,175 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_BEGIN_HPP -#define BOOST_RANGE_BEGIN_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING -#include -#else - -#include -#include - -namespace boost -{ -namespace range_detail -{ - - ////////////////////////////////////////////////////////////////////// - // primary template - ////////////////////////////////////////////////////////////////////// - - template< typename C > - inline BOOST_DEDUCED_TYPENAME range_const_iterator::type - begin( const C& c ) - { - return c.begin(); - } - - template< typename C > - inline BOOST_DEDUCED_TYPENAME range_iterator::type - begin( C& c ) - { - return c.begin(); - } - - ////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////// - - template< typename Iterator > - inline Iterator begin( const std::pair& p ) - { - return p.first; - } - - template< typename Iterator > - inline Iterator begin( std::pair& p ) - { - return p.first; - } - - ////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////// - - template< typename T, std::size_t sz > - inline const T* begin( const T (&array)[sz] ) - { - return array; - } - - template< typename T, std::size_t sz > - inline T* begin( T (&array)[sz] ) - { - return array; - } - - - ////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////// - -#if BOOST_WORKAROUND(__MWERKS__, <= 0x3204 ) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -// CW up to 9.3 and borland have troubles with function ordering - inline const char* begin( const char* s ) - { - return s; - } - - inline char* begin( char* s ) - { - return s; - } - - inline const wchar_t* begin( const wchar_t* s ) - { - return s; - } - - inline wchar_t* begin( wchar_t* s ) - { - return s; - } -#else - inline const char* begin( const char*& s ) - { - return s; - } - - inline char* begin( char*& s ) - { - return s; - } - - inline const wchar_t* begin( const wchar_t*& s ) - { - return s; - } - - inline wchar_t* begin( wchar_t*& s ) - { - return s; - } -#endif - -} // namespace 'range_detail' - - -template< class T > -inline BOOST_DEDUCED_TYPENAME range_iterator::type begin( T& r ) -{ - return range_detail::begin( r ); -} - -template< class T > -inline BOOST_DEDUCED_TYPENAME range_const_iterator::type begin( const T& r ) -{ - return range_detail::begin( r ); -} - -#if BOOST_WORKAROUND(__MWERKS__, <= 3003 ) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -// BCB and CW are not able to overload pointer when class overloads are also available. -template<> -inline range_const_iterator::type begin( const char*& r ) -{ - return r; -} - -template<> -inline range_const_iterator::type begin( const wchar_t*& r ) -{ - return r; -} - -#endif - -} // namespace boost - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -namespace boost -{ - template< class T > - inline BOOST_DEDUCED_TYPENAME range_const_iterator::type - const_begin( const T& r ) - { - return begin( r ); - } -} - -#endif diff --git a/include/boost/range/config.hpp b/include/boost/range/config.hpp deleted file mode 100755 index 84e2792..0000000 --- a/include/boost/range/config.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_CONFIG_HPP -#define BOOST_RANGE_CONFIG_HPP - -#include - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include - -#ifdef BOOST_RANGE_DEDUCED_TYPENAME -#error "macro already defined!" -#endif - -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -#define BOOST_RANGE_DEDUCED_TYPENAME -#else -#define BOOST_RANGE_DEDUCED_TYPENAME BOOST_DEDUCED_TYPENAME -#endif - -#ifdef BOOST_RANGE_NO_ARRAY_SUPPORT -#error "macro already defined!" -#endif - -#if _MSC_VER <= 1200 && !defined( __COMO__ ) && !defined( __GNUC__ ) && __MWERKS__ <= 0x3003 -#define BOOST_RANGE_NO_ARRAY_SUPPORT 1 -#endif - -#ifdef BOOST_RANGE_NO_ARRAY_SUPPORT -#define BOOST_RANGE_ARRAY_REF() (array) -#define BOOST_RANGE_NO_STATIC_ASSERT -#else -#define BOOST_RANGE_ARRAY_REF() (&array) -#endif - - - -#endif - diff --git a/include/boost/range/const_iterator.hpp b/include/boost/range/const_iterator.hpp deleted file mode 100755 index 81bd401..0000000 --- a/include/boost/range/const_iterator.hpp +++ /dev/null @@ -1,103 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_CONST_ITERATOR_HPP -#define BOOST_RANGE_CONST_ITERATOR_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include - -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#include -#else - -#include -#include - -namespace boost -{ - ////////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////////// - - template< typename C > - struct range_const_iterator - { - typedef BOOST_DEDUCED_TYPENAME C::const_iterator type; - }; - - ////////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////////// - - template< typename Iterator > - struct range_const_iterator< std::pair > - { - typedef Iterator type; - }; - - template< typename Iterator > - struct range_const_iterator< const std::pair > - { - typedef Iterator type; - }; - - ////////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////////// - - template< typename T, std::size_t sz > - struct range_const_iterator< T[sz] > - { - typedef const T* type; - }; - - template< typename T, std::size_t sz > - struct range_const_iterator< const T[sz] > - { - typedef const T* type; - }; - - ////////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////////// - - template<> - struct range_const_iterator< char* > - { - typedef const char* type; - }; - - template<> - struct range_const_iterator< wchar_t* > - { - typedef const wchar_t* type; - }; - - template<> - struct range_const_iterator< const char* > - { - typedef const char* type; - }; - - template<> - struct range_const_iterator< const wchar_t* > - { - typedef const wchar_t* type; - }; - -} // namespace boost - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#endif diff --git a/include/boost/range/const_reverse_iterator.hpp b/include/boost/range/const_reverse_iterator.hpp deleted file mode 100755 index f33f63d..0000000 --- a/include/boost/range/const_reverse_iterator.hpp +++ /dev/null @@ -1,37 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_CONST_REVERSE_ITERATOR_HPP -#define BOOST_RANGE_CONST_REVERSE_ITERATOR_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include -#include -#include - -namespace boost -{ - ////////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////////// - - template< typename C > - struct range_const_reverse_iterator - { - typedef reverse_iterator< - BOOST_DEDUCED_TYPENAME range_const_iterator::type > type; - }; - -} // namespace boost - -#endif diff --git a/include/boost/range/detail/begin.hpp b/include/boost/range/detail/begin.hpp deleted file mode 100755 index a53588a..0000000 --- a/include/boost/range/detail/begin.hpp +++ /dev/null @@ -1,120 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_DETAIL_BEGIN_HPP -#define BOOST_RANGE_DETAIL_BEGIN_HPP - -#include -#include - -namespace boost -{ - - namespace range_detail - { - template< typename T > - struct range_begin; - - ////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_begin - { - template< typename C > - static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator::type fun( C& c ) - { - return c.begin(); - }; - }; - - ////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_begin - { - template< typename P > - static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator

::type fun( const P& p ) - { - return p.first; - } - }; - - ////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_begin - { - template< typename T, std::size_t sz > - static T* fun( T BOOST_ARRAY_REF[sz] ) - { - return array; - } - }; - - ////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_begin - { - static char* fun( char* s ) - { - return s; - } - }; - - template<> - struct range_begin - { - static const char* fun( const char* s ) - { - return s; - } - }; - - template<> - struct range_begin - { - - static wchar_t* fun( wchar_t* s ) - { - return s; - } - }; - - template<> - struct range_begin - { - static const wchar_t* fun( const wchar_t* s ) - { - return s; - } - }; - - } // namespace 'range_detail' - - template< typename C > - inline BOOST_DEDUCED_TYPENAME range_result_iterator::type - begin( C& c ) - { - return range_detail::range_begin< BOOST_DEDUCED_TYPENAME range_detail::range::type >::fun( c ); - } - -} // namespace 'boost' - - -#endif diff --git a/include/boost/range/detail/common.hpp b/include/boost/range/detail/common.hpp deleted file mode 100755 index 38ef7c8..0000000 --- a/include/boost/range/detail/common.hpp +++ /dev/null @@ -1,116 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_DETAIL_COMMON_HPP -#define BOOST_RANGE_DETAIL_COMMON_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include -#include -#include -#include -#include -#include -#include - -////////////////////////////////////////////////////////////////////////////// -// missing partial specialization workaround. -////////////////////////////////////////////////////////////////////////////// - -namespace boost -{ - namespace range_detail - { - // 1 = std containers - // 2 = std::pair - // 3 = const std::pair - // 4 = array - // 5 = const array - // 6 = char array - // 7 = wchar_t array - // 8 = char* - // 9 = const char* - // 10 = whar_t* - // 11 = const wchar_t* - // 12 = string - - typedef mpl::int_<1>::type std_container_; - typedef mpl::int_<2>::type std_pair_; - typedef mpl::int_<3>::type const_std_pair_; - typedef mpl::int_<4>::type array_; - typedef mpl::int_<5>::type const_array_; - typedef mpl::int_<6>::type char_array_; - typedef mpl::int_<7>::type wchar_t_array_; - typedef mpl::int_<8>::type char_ptr_; - typedef mpl::int_<9>::type const_char_ptr_; - typedef mpl::int_<10>::type wchar_t_ptr_; - typedef mpl::int_<11>::type const_wchar_t_ptr_; - typedef mpl::int_<12>::type string_; - - template< typename C > - struct range_helper - { - static C* c; - static C ptr; - - BOOST_STATIC_CONSTANT( bool, is_pair_ = sizeof( boost::range_detail::is_pair_impl( c ) ) == sizeof( yes_type ) ); - BOOST_STATIC_CONSTANT( bool, is_char_ptr_ = sizeof( boost::range_detail::is_char_ptr_impl( ptr ) ) == sizeof( yes_type ) ); - BOOST_STATIC_CONSTANT( bool, is_const_char_ptr_ = sizeof( boost::range_detail::is_const_char_ptr_impl( ptr ) ) == sizeof( yes_type ) ); - BOOST_STATIC_CONSTANT( bool, is_wchar_t_ptr_ = sizeof( boost::range_detail::is_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) ); - BOOST_STATIC_CONSTANT( bool, is_const_wchar_t_ptr_ = sizeof( boost::range_detail::is_const_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) ); - BOOST_STATIC_CONSTANT( bool, is_char_array_ = sizeof( boost::range_detail::is_char_array_impl( ptr ) ) == sizeof( yes_type ) ); - BOOST_STATIC_CONSTANT( bool, is_wchar_t_array_ = sizeof( boost::range_detail::is_wchar_t_array_impl( ptr ) ) == sizeof( yes_type ) ); - BOOST_STATIC_CONSTANT( bool, is_string_ = (boost::type_traits::ice_or::value )); - BOOST_STATIC_CONSTANT( bool, is_array_ = boost::is_array::value ); - - }; - - template< typename C > - class range - { - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper::is_pair_, - boost::range_detail::std_pair_, - void >::type pair_t; - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper::is_array_, - boost::range_detail::array_, - pair_t >::type array_t; - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper::is_string_, - boost::range_detail::string_, - array_t >::type string_t; - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper::is_const_char_ptr_, - boost::range_detail::const_char_ptr_, - string_t >::type const_char_ptr_t; - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper::is_char_ptr_, - boost::range_detail::char_ptr_, - const_char_ptr_t >::type char_ptr_t; - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper::is_const_wchar_t_ptr_, - boost::range_detail::const_wchar_t_ptr_, - char_ptr_t >::type const_wchar_ptr_t; - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper::is_wchar_t_ptr_, - boost::range_detail::wchar_t_ptr_, - const_wchar_ptr_t >::type wchar_ptr_t; - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper::is_wchar_t_array_, - boost::range_detail::wchar_t_array_, - wchar_ptr_t >::type wchar_array_t; - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper::is_char_array_, - boost::range_detail::char_array_, - wchar_array_t >::type char_array_t; - public: - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::is_void::value, - boost::range_detail::std_container_, - char_array_t >::type type; - }; // class 'range' - } -} - -#endif diff --git a/include/boost/range/detail/const_iterator.hpp b/include/boost/range/detail/const_iterator.hpp deleted file mode 100755 index 177f213..0000000 --- a/include/boost/range/detail/const_iterator.hpp +++ /dev/null @@ -1,123 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_DETAIL_CONST_ITERATOR_HPP -#define BOOST_RANGE_DETAIL_CONST_ITERATOR_HPP - -#include -#include - -////////////////////////////////////////////////////////////////////////////// -// missing partial specialization workaround. -////////////////////////////////////////////////////////////////////////////// - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_const_iterator_; - - template<> - struct range_const_iterator_ - { - template< typename C > - struct pts - { - typedef BOOST_DEDUCED_TYPENAME C::const_iterator type; - }; - }; - - template<> - struct range_const_iterator_ - { - template< typename P > - struct pts - { - typedef BOOST_DEDUCED_TYPENAME P::first_type type; - }; - }; - - - template<> - struct range_const_iterator_ - { - template< typename T > - struct pts - { - typedef const BOOST_RANGE_DEDUCED_TYPENAME - remove_bounds::type* type; - }; - }; - - template<> - struct range_const_iterator_ - { - template< typename T > - struct pts - { - typedef const BOOST_RANGE_DEDUCED_TYPENAME - remove_bounds::type* type; - }; - }; - - template<> - struct range_const_iterator_ - { - template< typename S > - struct pts - { - typedef const char* type; - }; - }; - - template<> - struct range_const_iterator_ - { - template< typename S > - struct pts - { - typedef const char* type; - }; - }; - - template<> - struct range_const_iterator_ - { - template< typename S > - struct pts - { - typedef const wchar_t* type; - }; - }; - - template<> - struct range_const_iterator_ - { - template< typename S > - struct pts - { - typedef const wchar_t* type; - }; - }; - - } - - template< typename C > - class range_const_iterator - { - typedef BOOST_DEDUCED_TYPENAME range_detail::range::type c_type; - public: - typedef BOOST_DEDUCED_TYPENAME range_detail::range_const_iterator_::BOOST_NESTED_TEMPLATE pts::type type; - }; - -} - -#endif diff --git a/include/boost/range/detail/difference_type.hpp b/include/boost/range/detail/difference_type.hpp deleted file mode 100755 index c641516..0000000 --- a/include/boost/range/detail/difference_type.hpp +++ /dev/null @@ -1,121 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_DETAIL_DIFFERENCE_TYPE_HPP -#define BOOST_RANGE_DETAIL_DIFFERENCE_TYPE_HPP - -#include -#include - -////////////////////////////////////////////////////////////////////////////// -// missing partial specialization workaround. -////////////////////////////////////////////////////////////////////////////// - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_difference_type_; - - template<> - struct range_difference_type_ - { - template< typename C > - struct pts - { - typedef BOOST_DEDUCED_TYPENAME C::difference_type type; - }; - }; - - template<> - struct range_difference_type_ - { - template< typename P > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::iterator_difference< BOOST_DEDUCED_TYPENAME P::first_type>::type type; - }; - }; - - template<> - struct range_difference_type_ - { - template< typename A > - struct pts - { - typedef std::ptrdiff_t type; - }; - }; - - template<> - struct range_difference_type_ - { - template< typename A > - struct pts - { - typedef std::ptrdiff_t type; - }; - }; - - template<> - struct range_difference_type_ - { - template< typename S > - struct pts - { - typedef std::ptrdiff_t type; - }; - }; - - template<> - struct range_difference_type_ - { - template< typename S > - struct pts - { - typedef std::ptrdiff_t type; - }; - }; - - template<> - struct range_difference_type_ - { - template< typename S > - struct pts - { - typedef std::ptrdiff_t type; - }; - }; - - template<> - struct range_difference_type_ - { - template< typename S > - struct pts - { - typedef std::ptrdiff_t type; - }; - }; - - } - - template< typename C > - class range_difference - { - typedef BOOST_RANGE_DEDUCED_TYPENAME range_detail::range::type c_type; - public: - typedef BOOST_RANGE_DEDUCED_TYPENAME range_detail::range_difference_type_::BOOST_NESTED_TEMPLATE pts::type type; - }; - -} - -#endif - diff --git a/include/boost/range/detail/empty.hpp b/include/boost/range/detail/empty.hpp deleted file mode 100755 index d453e51..0000000 --- a/include/boost/range/detail/empty.hpp +++ /dev/null @@ -1,120 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_DETAIL_EMPTY_HPP -#define BOOST_RANGE_DETAIL_EMPTY_HPP - -#include - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_empty; - - ////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_empty - { - template< typename C > - static bool fun( C& c ) - { - return c.empty(); - }; - }; - - ////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_empty - { - template< typename P > - static bool fun( const P& p ) - { - return p.first == p.second; - } - }; - - ////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_empty - { - template< typename T, std::size_t sz > - static bool fun( T BOOST_ARRAY_REF[sz] ) - { - if( array == 0 ) - return true; - return false; - } - }; - - ////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_empty - { - static bool fun( const char* s ) - { - return s == 0 || s[0] == 0; - } - }; - - template<> - struct range_empty - { - static bool fun( const char* s ) - { - return s == 0 || s[0] == 0; - } - }; - - template<> - struct range_empty - { - static bool fun( const wchar_t* s ) - { - return s == 0 || s[0] == 0; - } - }; - - template<> - struct range_empty - { - static bool fun( const wchar_t* s ) - { - return s == 0 || s[0] == 0; - } - }; - - } // namespace 'range_detail' - - - template< typename C > - inline bool - empty( const C& c ) - { - return range_detail::range_empty< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range::type >::fun( c ); - } - -} // namespace 'boost' - - -#endif diff --git a/include/boost/range/detail/end.hpp b/include/boost/range/detail/end.hpp deleted file mode 100755 index f3c4633..0000000 --- a/include/boost/range/detail/end.hpp +++ /dev/null @@ -1,143 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_DETAIL_END_HPP -#define BOOST_RANGE_DETAIL_END_HPP - -#include -#include -#include - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_end; - - ////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_end - { - template< typename C > - static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator::type - fun( C& c ) - { - return c.end(); - }; - }; - - ////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_end - { - template< typename P > - static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator

::type - fun( const P& p ) - { - return p.second; - } - }; - - ////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_end - { - template< typename T, std::size_t sz > - static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] ) - { - return boost::range_detail::array_end( array ); - } - }; - - - template<> - struct range_end - { - template< typename T, std::size_t sz > - static std::size_t fun( T BOOST_RANGE_ARRAY_REF()[sz] ) - { - return boost::range_detail::array_end( array ); - } - }; - - template<> - struct range_end - { - template< typename T, std::size_t sz > - static std::size_t fun( T BOOST_RANGE_ARRAY_REF()[sz] ) - { - return boost::range_detail::array_end( array ); - } - }; - - ////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_end - { - static char* fun( char* s ) - { - return boost::range_detail::str_end( s ); - } - }; - - template<> - struct range_end - { - static const char* fun( const char* s ) - { - return boost::range_detail::str_end( s ); - } - }; - - template<> - struct range_end - { - static wchar_t* fun( wchar_t* s ) - { - return boost::range_detail::str_end( s ); - } - }; - - - template<> - struct range_end - { - static const wchar_t* fun( const wchar_t* s ) - { - return boost::range_detail::str_end( s ); - } - }; - - } // namespace 'range_detail' - - template< typename C > - inline BOOST_DEDUCED_TYPENAME range_result_iterator::type - end( C& c ) - { - return range_detail::range_end< BOOST_DEDUCED_TYPENAME range_detail::range::type >::fun( c ); - } - -} // namespace 'boost' - - -#endif diff --git a/include/boost/range/detail/implementation_help.hpp b/include/boost/range/detail/implementation_help.hpp deleted file mode 100755 index 6462815..0000000 --- a/include/boost/range/detail/implementation_help.hpp +++ /dev/null @@ -1,162 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_DETAIL_IMPLEMENTATION_HELP_HPP -#define BOOST_RANGE_DETAIL_IMPLEMENTATION_HELP_HPP - -#include -#include -#include -#include -#include - -#ifndef BOOST_NO_CWCHAR -#include -#endif - -namespace boost -{ - namespace range_detail - { - - ///////////////////////////////////////////////////////////////////// - // end() help - ///////////////////////////////////////////////////////////////////// - - inline const char* str_end( const char* s, const char* ) - { - return s + strlen( s ); - } - -#ifndef BOOST_NO_CWCHAR - inline const wchar_t* str_end( const wchar_t* s, const wchar_t* ) - { - return s + wcslen( s ); - } -#else - inline const wchar_t* str_end( const wchar_t* s, const wchar_t* ) - { - if( s == 0 && s[0] == 0 ) - return s; - while( *++s != 0 ) - ; - return s; - } -#endif - - template< class Char > - inline Char* str_end( Char* s ) - { - return (Char*)str_end( s, s ); - } - - template< class T, std::size_t sz > - inline T* array_end( T BOOST_RANGE_ARRAY_REF()[sz], int ) - { - return array + sz; - } - - template< class T, std::size_t sz > - inline const T* array_end( const T BOOST_RANGE_ARRAY_REF()[sz], int ) - { - return array + sz; - } - - template< class T, std::size_t sz > - inline T* array_end( T BOOST_RANGE_ARRAY_REF()[sz], char_or_wchar_t_array_tag ) - { - return array + sz - 1; - } - - template< class T, std::size_t sz > - inline const T* array_end( const T BOOST_RANGE_ARRAY_REF()[sz], char_or_wchar_t_array_tag ) - { - return array + sz - 1; - } - - template< class T, std::size_t sz > - inline T* array_end( T BOOST_RANGE_ARRAY_REF()[sz] ) - { - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< is_same::value || is_same::value, - char_or_wchar_t_array_tag, - int >::type tag; - - return array_end( array, tag() ); - } - - template< class T, std::size_t sz > - inline const T* array_end( const T BOOST_RANGE_ARRAY_REF()[sz] ) - { - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< is_same::value || is_same::value, - char_or_wchar_t_array_tag, - int >::type tag; - - return array_end( array, tag() ); - } - - ///////////////////////////////////////////////////////////////////// - // size() help - ///////////////////////////////////////////////////////////////////// - - template< class Char > - inline std::size_t str_size( const Char* const& s ) - { - return str_end( s ) - s; - } - - template< class T, std::size_t sz > - inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz], int ) - { - return sz; - } - - template< class T, std::size_t sz > - inline std::size_t array_size( const T BOOST_RANGE_ARRAY_REF()[sz], int ) - { - return sz; - } - - template< class T, std::size_t sz > - inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz], char_or_wchar_t_array_tag ) - { - return sz - 1; - } - - template< class T, std::size_t sz > - inline std::size_t array_size( const T BOOST_RANGE_ARRAY_REF()[sz], char_or_wchar_t_array_tag ) - { - return sz - 1; - } - - template< class T, std::size_t sz > - inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz] ) - { - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< is_same::value || is_same::value || - is_same::value || is_same::value, - char_or_wchar_t_array_tag, - int >::type tag; - return array_size( array, tag() ); - } - - template< class T, std::size_t sz > - inline std::size_t array_size( const T BOOST_RANGE_ARRAY_REF()[sz] ) - { - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< is_same::value || is_same::value, - char_or_wchar_t_array_tag, - int >::type tag; - return array_size( array, tag() ); - } - - } // namespace 'range_detail' - -} // namespace 'boost' - - -#endif diff --git a/include/boost/range/detail/iterator.hpp b/include/boost/range/detail/iterator.hpp deleted file mode 100755 index adedf27..0000000 --- a/include/boost/range/detail/iterator.hpp +++ /dev/null @@ -1,121 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_DETAIL_ITERATOR_HPP -#define BOOST_RANGE_DETAIL_ITERATOR_HPP - -#include -#include - -////////////////////////////////////////////////////////////////////////////// -// missing partial specialization workaround. -////////////////////////////////////////////////////////////////////////////// - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_iterator_; - - template<> - struct range_iterator_ - { - template< typename C > - struct pts - { - typedef BOOST_DEDUCED_TYPENAME C::iterator type; - }; - }; - - template<> - struct range_iterator_ - { - template< typename P > - struct pts - { - typedef BOOST_DEDUCED_TYPENAME P::first_type type; - }; - }; - - template<> - struct range_iterator_ - { - template< typename T > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME - remove_bounds::type* type; - }; - }; - - template<> - struct range_iterator_ - { - template< typename T > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME - remove_bounds::type* type; - }; - }; - - template<> - struct range_iterator_ - { - template< typename S > - struct pts - { - typedef char* type; - }; - }; - - template<> - struct range_iterator_ - { - template< typename S > - struct pts - { - typedef const char* type; - }; - }; - - template<> - struct range_iterator_ - { - template< typename S > - struct pts - { - typedef wchar_t* type; - }; - }; - - template<> - struct range_iterator_ - { - template< typename S > - struct pts - { - typedef const wchar_t* type; - }; - }; - - } - - template< typename C > - class range_iterator - { - typedef BOOST_DEDUCED_TYPENAME range_detail::range::type c_type; - public: - typedef BOOST_DEDUCED_TYPENAME range_detail::range_iterator_::BOOST_NESTED_TEMPLATE pts::type type; - }; -} - -#endif diff --git a/include/boost/range/detail/sfinae.hpp b/include/boost/range/detail/sfinae.hpp deleted file mode 100755 index 5b2c61e..0000000 --- a/include/boost/range/detail/sfinae.hpp +++ /dev/null @@ -1,77 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_DETAIL_SFINAE_HPP -#define BOOST_RANGE_DETAIL_SFINAE_HPP - -#include -#include -#include -#include - - -namespace boost -{ - namespace range_detail - { - using type_traits::yes_type; - using type_traits::no_type; - - ////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////// - - yes_type is_string_impl( const char* const ); - yes_type is_string_impl( const wchar_t* const ); - no_type is_string_impl( ... ); - - template< std::size_t sz > - yes_type is_char_array_impl( char BOOST_RANGE_ARRAY_REF()[sz] ); - template< std::size_t sz > - yes_type is_char_array_impl( const char BOOST_RANGE_ARRAY_REF()[sz] ); - no_type is_char_array_impl( ... ); - - template< std::size_t sz > - yes_type is_wchar_t_array_impl( wchar_t BOOST_RANGE_ARRAY_REF()[sz] ); - template< std::size_t sz > - yes_type is_wchar_t_array_impl( const wchar_t BOOST_RANGE_ARRAY_REF()[sz] ); - no_type is_wchar_t_array_impl( ... ); - - yes_type is_char_ptr_impl( char* const ); - no_type is_char_ptr_impl( ... ); - - yes_type is_const_char_ptr_impl( const char* const ); - no_type is_const_char_ptr_impl( ... ); - - yes_type is_wchar_t_ptr_impl( wchar_t* const ); - no_type is_wchar_t_ptr_impl( ... ); - - yes_type is_const_wchar_t_ptr_impl( const wchar_t* const ); - no_type is_const_wchar_t_ptr_impl( ... ); - - ////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////// - - template< typename Iterator > - yes_type is_pair_impl( const std::pair* ); - no_type is_pair_impl( ... ); - - ////////////////////////////////////////////////////////////////////// - // tags - ////////////////////////////////////////////////////////////////////// - - struct char_or_wchar_t_array_tag {}; - - } // namespace 'range_detail' - -} // namespace 'boost' - -#endif diff --git a/include/boost/range/detail/size.hpp b/include/boost/range/detail/size.hpp deleted file mode 100755 index c53946e..0000000 --- a/include/boost/range/detail/size.hpp +++ /dev/null @@ -1,143 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_DETAIL_SIZE_HPP -#define BOOST_RANGE_DETAIL_SIZE_HPP - -#include -#include -#include -#include - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_size_; - - ////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_size_ - { - template< typename C > - static BOOST_RANGE_DEDUCED_TYPENAME C::size_type fun( const C& c ) - { - return c.size(); - }; - }; - - ////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_size_ - { - template< typename P > - static BOOST_RANGE_DEDUCED_TYPENAME range_size

::type - fun( const P& p ) - { - return std::distance( p.first, p.second ); - } - }; - - ////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_size_ - { - template< typename T, std::size_t sz > - static std::size_t fun( T BOOST_RANGE_ARRAY_REF()[sz] ) - { - return sz; - } - }; - - template<> - struct range_size_ - { - template< typename T, std::size_t sz > - static std::size_t fun( T BOOST_RANGE_ARRAY_REF()[sz] ) - { - return boost::range_detail::array_size( array ); - } - }; - - template<> - struct range_size_ - { - template< typename T, std::size_t sz > - static std::size_t fun( T BOOST_RANGE_ARRAY_REF()[sz] ) - { - return boost::range_detail::array_size( array ); - } - }; - - ////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_size_ - { - static std::size_t fun( const char* s ) - { - return boost::range_detail::str_size( s ); - } - }; - - template<> - struct range_size_ - { - static std::size_t fun( const char* s ) - { - return boost::range_detail::str_size( s ); - } - }; - - template<> - struct range_size_ - { - static std::size_t fun( const wchar_t* s ) - { - return boost::range_detail::str_size( s ); - } - }; - - template<> - struct range_size_ - { - static std::size_t fun( const wchar_t* s ) - { - return boost::range_detail::str_size( s ); - } - }; - - } // namespace 'range_detail' - - - template< typename C > - BOOST_RANGE_DEDUCED_TYPENAME range_size::type - size( const C& c ) - { - return range_detail::range_size_< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range::type >::fun( c ); - } - -} // namespace 'boost' - - -#endif diff --git a/include/boost/range/detail/size_type.hpp b/include/boost/range/detail/size_type.hpp deleted file mode 100755 index ea2df02..0000000 --- a/include/boost/range/detail/size_type.hpp +++ /dev/null @@ -1,118 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_DETAIL_SIZE_TYPE_HPP -#define BOOST_RANGE_DETAIL_SIZE_TYPE_HPP - -#include - -////////////////////////////////////////////////////////////////////////////// -// missing partial specialization workaround. -////////////////////////////////////////////////////////////////////////////// - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_size_type_; - - template<> - struct range_size_type_ - { - template< typename C > - struct pts - { - typedef BOOST_DEDUCED_TYPENAME C::size_type type; - }; - }; - - template<> - struct range_size_type_ - { - template< typename P > - struct pts - { - typedef std::size_t type; - }; - }; - - template<> - struct range_size_type_ - { - template< typename A > - struct pts - { - typedef std::size_t type; - }; - }; - - template<> - struct range_size_type_ - { - template< typename A > - struct pts - { - typedef std::size_t type; - }; - }; - - template<> - struct range_size_type_ - { - template< typename S > - struct pts - { - typedef std::size_t type; - }; - }; - - template<> - struct range_size_type_ - { - template< typename S > - struct pts - { - typedef std::size_t type; - }; - }; - - template<> - struct range_size_type_ - { - template< typename S > - struct pts - { - typedef std::size_t type; - }; - }; - - template<> - struct range_size_type_ - { - template< typename S > - struct pts - { - typedef std::size_t type; - }; - }; - } - - template< typename C > - class range_size - { - typedef BOOST_DEDUCED_TYPENAME range_detail::range::type c_type; - public: - typedef BOOST_DEDUCED_TYPENAME range_detail::range_size_type_::BOOST_NESTED_TEMPLATE pts::type type; - }; -} - -#endif - diff --git a/include/boost/range/detail/sizer.hpp b/include/boost/range/detail/sizer.hpp deleted file mode 100755 index 5d75437..0000000 --- a/include/boost/range/detail/sizer.hpp +++ /dev/null @@ -1,37 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_DETAIL_SIZER_HPP -#define BOOST_RANGE_DETAIL_SIZER_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -#include -#include - -namespace boost -{ - ////////////////////////////////////////////////////////////////////// - // constant array size - ////////////////////////////////////////////////////////////////////// - - template< typename T, std::size_t sz > - char& - sizer( const T BOOST_RANGE_ARRAY_REF()[sz] )[sz]; - - template< typename T, std::size_t sz > - char& - sizer( T BOOST_RANGE_ARRAY_REF()[sz] )[sz]; - -} // namespace 'boost' - -#endif diff --git a/include/boost/range/detail/value_type.hpp b/include/boost/range/detail/value_type.hpp deleted file mode 100755 index 490bce8..0000000 --- a/include/boost/range/detail/value_type.hpp +++ /dev/null @@ -1,122 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_DETAIL_VALUE_TYPE_HPP -#define BOOST_RANGE_DETAIL_VALUE_TYPE_HPP - -#include -#include -#include - -////////////////////////////////////////////////////////////////////////////// -// missing partial specialization workaround. -////////////////////////////////////////////////////////////////////////////// - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_value_type_; - - template<> - struct range_value_type_ - { - template< typename C > - struct pts - { - typedef BOOST_DEDUCED_TYPENAME C::value_type type; - }; - }; - - template<> - struct range_value_type_ - { - template< typename P > - struct pts - { - typedef BOOST_DEDUCED_TYPENAME boost::iterator_value< BOOST_RANGE_DEDUCED_TYPENAME P::first_type >::type type; - }; - }; - - template<> - struct range_value_type_ - { - template< typename T > - struct pts - { - typedef BOOST_DEDUCED_TYPENAME boost::remove_bounds::type type; - }; - }; - - template<> - struct range_value_type_ - { - template< typename T > - struct pts - { - typedef char type; - }; - }; - - template<> - struct range_value_type_ - { - template< typename S > - struct pts - { - typedef char type; - }; - }; - - template<> - struct range_value_type_ - { - template< typename S > - struct pts - { - typedef const char type; - }; - }; - - template<> - struct range_value_type_ - { - template< typename S > - struct pts - { - typedef wchar_t type; - }; - }; - - template<> - struct range_value_type_ - { - template< typename S > - struct pts - { - typedef const wchar_t type; - }; - }; - - } - - template< typename C > - class range_value - { - typedef BOOST_DEDUCED_TYPENAME range_detail::range::type c_type; - public: - typedef BOOST_DEDUCED_TYPENAME range_detail::range_value_type_::BOOST_NESTED_TEMPLATE pts::type type; - }; - -} - -#endif - diff --git a/include/boost/range/difference_type.hpp b/include/boost/range/difference_type.hpp deleted file mode 100755 index 27f71d3..0000000 --- a/include/boost/range/difference_type.hpp +++ /dev/null @@ -1,107 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_DIFFERENCE_TYPE_HPP -#define BOOST_RANGE_DIFFERENCE_TYPE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include - -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#include -#else - -#include -#include -#include - -namespace boost -{ - ////////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////////// - - template< typename C > - struct range_difference - { - typedef BOOST_DEDUCED_TYPENAME C::difference_type type; - }; - - ////////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////////// - - template< typename Iterator > - struct range_difference< std::pair > - { - typedef BOOST_DEDUCED_TYPENAME - iterator_difference::type type; - }; - - template< typename Iterator > - struct range_difference< const std::pair > - { - typedef BOOST_DEDUCED_TYPENAME - iterator_difference::type type; - }; - - - ////////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////////// - - template< typename T, std::size_t sz > - struct range_difference< T[sz] > - { - typedef std::ptrdiff_t type; - }; - - template< typename T, std::size_t sz > - struct range_difference< const T[sz] > - { - typedef std::ptrdiff_t type; - }; - - ////////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////////// - - template<> - struct range_difference< char* > - { - typedef std::ptrdiff_t type; - }; - - template<> - struct range_difference< wchar_t* > - { - typedef std::ptrdiff_t type; - }; - - template<> - struct range_difference< const char* > - { - typedef std::ptrdiff_t type; - }; - - template<> - struct range_difference< const wchar_t* > - { - typedef std::ptrdiff_t type; - }; - -} // namespace boost - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#endif diff --git a/include/boost/range/empty.hpp b/include/boost/range/empty.hpp deleted file mode 100755 index 7363262..0000000 --- a/include/boost/range/empty.hpp +++ /dev/null @@ -1,67 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_EMPTY_HPP -#define BOOST_RANGE_EMPTY_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include -//#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING -//#include -//#else - -#include -#include - -namespace boost -{ -namespace range_detail -{ - - ////////////////////////////////////////////////////////////////////// - // primary template - ////////////////////////////////////////////////////////////////////// - - template< typename C > - inline bool empty( const C& c ) - { - return boost::begin( c ) == boost::end( c ); - } - - ////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////// - - inline bool empty( const char* const& s ) - { - return s == 0 || s[0] == 0; - } - - inline bool empty( const wchar_t* const& s ) - { - return s == 0 || s[0] == 0; - } - -} // namespace 'range_detail' - -template< class T > -inline bool empty( const T& r ) -{ - return range_detail::empty( r ); -} - -} // namepace 'boost' - -//#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -#endif diff --git a/include/boost/range/end.hpp b/include/boost/range/end.hpp deleted file mode 100755 index 5acd61c..0000000 --- a/include/boost/range/end.hpp +++ /dev/null @@ -1,179 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_END_HPP -#define BOOST_RANGE_END_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING -#include -#else - -#include -#include -#include - -namespace boost -{ -namespace range_detail -{ - - ////////////////////////////////////////////////////////////////////// - // primary template - ////////////////////////////////////////////////////////////////////// - - template< typename C > - inline BOOST_DEDUCED_TYPENAME range_const_iterator::type - end( const C& c ) - { - return c.end(); - } - - template< typename C > - inline BOOST_DEDUCED_TYPENAME range_iterator::type - end( C& c ) - { - return c.end(); - } - - ////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////// - - template< typename Iterator > - inline Iterator end( const std::pair& p ) - { - return p.second; - } - - template< typename Iterator > - inline Iterator end( std::pair& p ) - { - return p.second; - } - - ////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////// - - template< typename T, std::size_t sz > - inline const T* end( const T (&array)[sz] ) - { - return range_detail::array_end( array ); - } - - template< typename T, std::size_t sz > - inline T* end( T (&array)[sz] ) - { - return range_detail::array_end( array ); - } - - ////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////// - -#if BOOST_WORKAROUND(__MWERKS__, <= 0x3204 ) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -// CW up to 9.3 and borland have troubles with function ordering - inline char* end( char* s ) - { - return range_detail::str_end( s ); - } - - inline wchar_t* end( wchar_t* s ) - { - return range_detail::str_end( s ); - } - - inline const char* end( const char* s ) - { - return range_detail::str_end( s ); - } - - inline const wchar_t* end( const wchar_t* s ) - { - return range_detail::str_end( s ); - } -#else - inline char* end( char*& s ) - { - return range_detail::str_end( s ); - } - - inline wchar_t* end( wchar_t*& s ) - { - return range_detail::str_end( s ); - } - - inline const char* end( const char*& s ) - { - return range_detail::str_end( s ); - } - - inline const wchar_t* end( const wchar_t*& s ) - { - return range_detail::str_end( s ); - } -#endif - -} // namespace 'range_detail' - -template< class T > -inline BOOST_DEDUCED_TYPENAME range_iterator::type end( T& r ) -{ - return range_detail::end( r ); -} - -template< class T > -inline BOOST_DEDUCED_TYPENAME range_const_iterator::type end( const T& r ) -{ - return range_detail::end( r ); -} - - - -#if BOOST_WORKAROUND(__MWERKS__, <= 3003 ) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -// BCB and CW are not able to overload pointer when class overloads are also available. -template<> -inline range_const_iterator::type end( const char*& r ) -{ - return range_detail::str_end( r ); -} - -template<> -inline range_const_iterator::type end( const wchar_t*& r ) -{ - return range_detail::str_end( r ); -} - -#endif - -} // namespace 'boost' - - - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - -namespace boost -{ - template< class T > - inline BOOST_DEDUCED_TYPENAME range_const_iterator::type - const_end( const T& r ) - { - return end( r ); - } -} - -#endif diff --git a/include/boost/range/functions.hpp b/include/boost/range/functions.hpp deleted file mode 100755 index 5b5fb54..0000000 --- a/include/boost/range/functions.hpp +++ /dev/null @@ -1,25 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_FUNCTIONS_HPP -#define BOOST_RANGE_FUNCTIONS_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include -#include -#include -#include -#include -#include - -#endif diff --git a/include/boost/range/iterator.hpp b/include/boost/range/iterator.hpp deleted file mode 100755 index 67b5948..0000000 --- a/include/boost/range/iterator.hpp +++ /dev/null @@ -1,104 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_ITERATOR_HPP -#define BOOST_RANGE_ITERATOR_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include - -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#include -#else - -#include -#include -#include - -namespace boost -{ - ////////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////////// - - template< typename C > - struct range_iterator - { - typedef BOOST_DEDUCED_TYPENAME C::iterator type; - }; - - ////////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////////// - - template< typename Iterator > - struct range_iterator< std::pair > - { - typedef Iterator type; - }; - - template< typename Iterator > - struct range_iterator< const std::pair > - { - typedef Iterator type; - }; - - ////////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////////// - - template< typename T, std::size_t sz > - struct range_iterator< T[sz] > - { - typedef T* type; - }; - - template< typename T, std::size_t sz > - struct range_iterator< const T[sz] > - { - typedef const T* type; - }; - - ////////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////////// - - template<> - struct range_iterator< char* > - { - typedef char* type; - }; - - template<> - struct range_iterator< wchar_t* > - { - typedef wchar_t* type; - }; - - template<> - struct range_iterator< const char* > - { - typedef const char* type; - }; - - template<> - struct range_iterator< const wchar_t* > - { - typedef const wchar_t* type; - }; - -} // namespace boost - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#endif diff --git a/include/boost/range/iterator_range.hpp b/include/boost/range/iterator_range.hpp deleted file mode 100755 index 6216e3e..0000000 --- a/include/boost/range/iterator_range.hpp +++ /dev/null @@ -1,453 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen & Pavol Droba 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_ITERATOR_RANGE_HPP -#define BOOST_RANGE_ITERATOR_RANGE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - - -/*! \file - Defines the \c iterator_class and related functions. - \c iterator_range is a simple wrapper of iterator pair idiom. It provides - a rich subset of Container interface. -*/ - -namespace boost { - - namespace range_detail - { - template< class Left, class Right > - inline bool equal( const Left& l, const Right& r ) - { - typedef BOOST_DEDUCED_TYPENAME range_size::type sz_type; - sz_type l_size = boost::size( l ), - r_size = boost::size( r ); - - if( l_size != r_size ) - return false; - - return std::equal( boost::begin(l), boost::end(l), - boost::begin(r) ); - } - - template< class Left, class Right > - inline bool less_than( const Left& l, const Right& r ) - { - return std::lexicographical_compare( boost::begin(l), - boost::end(l), - boost::begin(r), - boost::end(r) ); - } - } - -// iterator range template class -----------------------------------------// - - //! iterator_range class - /*! - An \c iterator_range delimits a range in a sequence by beginning and ending iterators. - An iterator_range can be passed to an algorithm which requires a sequence as an input. - For example, the \c toupper() function may be used most frequently on strings, - but can also be used on iterator_ranges: - - \code - boost::tolower( find( s, "UPPERCASE STRING" ) ); - \endcode - - Many algorithms working with sequences take a pair of iterators, - delimiting a working range, as an arguments. The \c iterator_range class is an - encapsulation of a range identified by a pair of iterators. - It provides a collection interface, - so it is possible to pass an instance to an algorithm requiring a collection as an input. - */ - template - class iterator_range - { - public: - //! this type - typedef iterator_range type; - //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type); - - //! Encapsulated value type - typedef BOOST_DEDUCED_TYPENAME - iterator_value::type value_type; - - //! Difference type - typedef BOOST_DEDUCED_TYPENAME - iterator_difference::type difference_type; - //! Size type - typedef std::size_t size_type; // note: must be unsigned - - //! const_iterator type - /*! - There is no distinction between const_iterator and iterator. - These typedefs are provides to fulfill container interface - */ - typedef IteratorT const_iterator; - //! iterator type - typedef IteratorT iterator; - - iterator_range() : m_Begin( iterator() ), m_End( iterator() ), - singular( true ) - { } - - //! Constructor from a pair of iterators - template< class Iterator > - iterator_range( Iterator Begin, Iterator End ) : - m_Begin(Begin), m_End(End), singular(false) {} - - //! Constructor from a Range - template< class Range > - iterator_range( const Range& r ) : - m_Begin( adl_begin( r ) ), m_End( adl_end( r ) ), - singular(false) {} - - //! Constructor from a Range - template< class Range > - iterator_range( Range& r ) : - m_Begin( adl_begin( r ) ), m_End( adl_end( r ) ), - singular(false) {} - - template< class Iterator > - iterator_range& operator=( const iterator_range& r ) - { - m_Begin = r.begin(); - m_End = r.end(); - // - // remark: this need not necessarily be true, but it does no harm - // - singular = r.empty(); - return *this; - } - - template< class ForwardRange > - iterator_range& operator=( ForwardRange& r ) - { - m_Begin = adl_begin( r ); - m_End = adl_end( r ); - singular = false; - return *this; - } - - template< class ForwardRange > - iterator_range& operator=( const ForwardRange& r ) - { - m_Begin = adl_begin( r ); - m_End = adl_end( r ); - singular = false; - return *this; - } - - //! begin access - /*! - Retrieve the begin iterator - */ - IteratorT begin() const - { - return m_Begin; - } - - //! end access - /*! - Retrieve the end iterator - */ - IteratorT end() const - { - return m_End; - } - - //! Size of the range - /*! - Retrieve the size of the range - */ - size_type size() const - { - if( singular ) - return 0; - - return std::distance( m_Begin, m_End ); - } - - bool empty() const - { - if( singular ) - return true; - - return m_Begin == m_End; - } - - //! Safe bool conversion - /*! - Check whenever the range is empty. - Allows to use construction like this: - \code - iterator_range r; - if (!r) - { - ... - } - \endcode - */ - typedef iterator (iterator_range::*unspecified_bool_type) () const; - operator unspecified_bool_type() const - { - return empty() ? 0: &iterator_range::end; - } - - bool equal( const iterator_range& r ) const - { - return singular == r.singular && m_Begin == r.m_Begin && m_End == r.m_End; - } - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - bool operator==( const iterator_range& r ) const - { - return range_detail::equal( *this, r ); - } - - bool operator!=( const iterator_range& r ) const - { - return !operator==(r); - } - - bool operator<( const iterator_range& r ) const - { - return range_detail::less_than( *this, r ); - } - -#endif - - private: - template< class ForwardRange > - iterator adl_begin( ForwardRange& r ) - { - #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) - return boost::begin( r ); - #else - using boost::begin; - return iterator( begin( r ) ); - #endif - } - - template< class ForwardRange > - iterator adl_end( ForwardRange& r ) - { - #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) - return boost::end( r ); - #else - using boost::end; - return iterator( end( r ) ); - #endif - } - - private: - // begin and end iterators - IteratorT m_Begin; - IteratorT m_End; - bool singular; - }; - -// iterator range free-standing operators ---------------------------// - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING -#else - template< class Iterator > - inline bool empty( const iterator_range& r ) - { - // - // this will preserve the well-defined empty() even - // though 'r' is singular. - // - return r.empty(); - } -#endif - - //! iterator_range output operator - /*! - Output the range to an ostream. Elements are outputed - in a sequence without separators. - */ - template< typename IteratorT, typename Elem, typename Traits > - inline std::basic_ostream& operator<<( - std::basic_ostream& Os, - const iterator_range& r ) - { - std::copy( begin(r), end(r), std::ostream_iterator(Os)); - return Os; - } - - ///////////////////////////////////////////////////////////////////// - // comparison operators - ///////////////////////////////////////////////////////////////////// - - template< class IteratorT, class ForwardRange > - inline bool operator==( const ForwardRange& l, - const iterator_range& r ) - { - return range_detail::equal( l, r ); - } - - template< class IteratorT, class ForwardRange > - inline bool operator!=( const ForwardRange& l, - const iterator_range& r ) - { - return !range_detail::equal( l, r ); - } - - template< class IteratorT, class ForwardRange > - inline bool operator<( const ForwardRange& l, - const iterator_range& r ) - { - return range_detail::less_than( l, r ); - } - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING -#else - template< class Iterator1T, class Iterator2T > - inline bool operator==( const iterator_range& l, - const iterator_range& r ) - { - return range_detail::equal( l, r ); - } - - template< class IteratorT, class ForwardRange > - inline bool operator==( const iterator_range& l, - const ForwardRange& r ) - { - return range_detail::equal( l, r ); - } - - - template< class Iterator1T, class Iterator2T > - inline bool operator!=( const iterator_range& l, - const iterator_range& r ) - { - return !range_detail::equal( l, r ); - } - - template< class IteratorT, class ForwardRange > - inline bool operator!=( const iterator_range& l, - const ForwardRange& r ) - { - return !range_detail::equal( l, r ); - } - - - template< class Iterator1T, class Iterator2T > - inline bool operator<( const iterator_range& l, - const iterator_range& r ) - { - return range_detail::less_than( l, r ); - } - - template< class IteratorT, class ForwardRange > - inline bool operator<( const iterator_range& l, - const ForwardRange& r ) - { - return range_detail::less_than( l, r ); - } - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -// iterator range utilities -----------------------------------------// - - //! iterator_range construct helper - /*! - Construct an \c iterator_range from a pair of iterators - - \param Begin A begin iterator - \param End An end iterator - \return iterator_range object - */ - template< typename IteratorT > - inline iterator_range< IteratorT > - make_iterator_range( IteratorT Begin, IteratorT End ) - { - return iterator_range( Begin, End ); - } - - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - template< typename Range > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_result_iterator::type > - make_iterator_range( Range& r ) - { - return iterator_range< BOOST_DEDUCED_TYPENAME range_result_iterator::type > - ( begin( r ), end( r ) ); - } - -#else - //! iterator_range construct helper - /*! - Construct an \c iterator_range from a \c Range containing the begin - and end iterators. - */ - template< class ForwardRange > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > - make_iterator_range( ForwardRange& r ) - { - return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > - ( r ); - } - - template< class ForwardRange > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_const_iterator::type > - make_iterator_range( const ForwardRange& r ) - { - return iterator_range< BOOST_DEDUCED_TYPENAME range_const_iterator::type > - ( r ); - } - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - //! copy a range into a sequence - /*! - Construct a new sequence of the specified type from the elements - in the given range - - \param Range An input range - \return New sequence - */ - template< typename SeqT, typename Range > - inline SeqT copy_range( const Range& r ) - { - return SeqT( begin( r ), end( r ) ); - } - - //! transform a range into a sequence - /*! - Create a new sequence from the elements in the range, transformed - by a function - - \param Range An input range - \param Func Transformation function - \return New sequence - */ - template< typename SeqT, typename Range, typename FuncT > - inline SeqT transform_range( const Range& r, FuncT Func ) - { - SeqT Seq; - std::transform( begin( r ), end( r ), std::back_inserter(Seq), Func ); - return Seq; - } - -} // namespace 'boost' - - -#endif diff --git a/include/boost/range/metafunctions.hpp b/include/boost/range/metafunctions.hpp deleted file mode 100755 index 3bf899f..0000000 --- a/include/boost/range/metafunctions.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_METAFUNCTIONS_HPP -#define BOOST_RANGE_METAFUNCTIONS_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/include/boost/range/rbegin.hpp b/include/boost/range/rbegin.hpp deleted file mode 100755 index 06b7314..0000000 --- a/include/boost/range/rbegin.hpp +++ /dev/null @@ -1,66 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_RBEGIN_HPP -#define BOOST_RANGE_RBEGIN_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include -#include -#include -#include - -namespace boost -{ - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -template< class C > -inline BOOST_DEDUCED_TYPENAME range_reverse_result_iterator::type -rbegin( C& c ) -{ - return BOOST_DEDUCED_TYPENAME range_reverse_result_iterator::type( end( c ) ); -} - -#else - -template< class C > -inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type -rbegin( C& c ) -{ - typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator::type - iter_type; - return iter_type( end( c ) ); -} - -template< class C > -inline BOOST_DEDUCED_TYPENAME range_const_reverse_iterator::type -rbegin( const C& c ) -{ - typedef BOOST_DEDUCED_TYPENAME range_const_reverse_iterator::type - iter_type; - return iter_type( end( c ) ); -} - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -template< class T > -inline BOOST_DEDUCED_TYPENAME range_const_reverse_iterator::type -const_rbegin( const T& r ) -{ - return rbegin( r ); -} - -} // namespace 'boost' - -#endif diff --git a/include/boost/range/rend.hpp b/include/boost/range/rend.hpp deleted file mode 100755 index 151a035..0000000 --- a/include/boost/range/rend.hpp +++ /dev/null @@ -1,66 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_REND_HPP -#define BOOST_RANGE_REND_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include -#include -#include -#include - -namespace boost -{ - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -template< class C > -inline BOOST_DEDUCED_TYPENAME range_reverse_result_iterator::type -rend( C& c ) -{ - return BOOST_DEDUCED_TYPENAME range_reverse_result_iterator::type( begin( c ) ); -} - -#else - -template< class C > -inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type -rend( C& c ) -{ - typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator::type - iter_type; - return iter_type( begin( c ) ); -} - -template< class C > -inline BOOST_DEDUCED_TYPENAME range_const_reverse_iterator::type -rend( const C& c ) -{ - typedef BOOST_DEDUCED_TYPENAME range_const_reverse_iterator::type - iter_type; - return iter_type( begin( c ) ); -} - -#endif - -template< class T > -inline BOOST_DEDUCED_TYPENAME range_const_reverse_iterator::type -const_rend( const T& r ) -{ - return rend( r ); -} - -} // namespace 'boost' - -#endif diff --git a/include/boost/range/result_iterator.hpp b/include/boost/range/result_iterator.hpp deleted file mode 100755 index 86e71cd..0000000 --- a/include/boost/range/result_iterator.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_RESULT_ITERATOR_HPP -#define BOOST_RANGE_RESULT_ITERATOR_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -#include -#include -#include -#include -#include - -namespace boost -{ - ////////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////////// - - template< typename C > - struct range_result_iterator - { - typedef BOOST_RANGE_DEDUCED_TYPENAME - mpl::if_< BOOST_DEDUCED_TYPENAME is_const::type, - BOOST_DEDUCED_TYPENAME range_const_iterator::type, - BOOST_DEDUCED_TYPENAME range_iterator::type >::type type; - }; - -} // namespace boost - -//#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#endif diff --git a/include/boost/range/reverse_iterator.hpp b/include/boost/range/reverse_iterator.hpp deleted file mode 100755 index f8e9221..0000000 --- a/include/boost/range/reverse_iterator.hpp +++ /dev/null @@ -1,40 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_REVERSE_ITERATOR_HPP -#define BOOST_RANGE_REVERSE_ITERATOR_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include -#include -#include - - -namespace boost -{ - ////////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////////// - - template< typename C > - struct range_reverse_iterator - { - typedef reverse_iterator< - BOOST_DEDUCED_TYPENAME range_iterator::type > type; - }; - - -} // namespace boost - - -#endif diff --git a/include/boost/range/reverse_result_iterator.hpp b/include/boost/range/reverse_result_iterator.hpp deleted file mode 100755 index 715ed53..0000000 --- a/include/boost/range/reverse_result_iterator.hpp +++ /dev/null @@ -1,39 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_REVERSE_RESULT_ITERATOR_HPP -#define BOOST_RANGE_REVERSE_RESULT_ITERATOR_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -#include -#include -#include - -namespace boost -{ - ////////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////////// - - template< typename C > - struct range_reverse_result_iterator - { - typedef reverse_iterator< - BOOST_DEDUCED_TYPENAME range_result_iterator::type > type; - }; - -} // namespace boost - -//#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#endif diff --git a/include/boost/range/size.hpp b/include/boost/range/size.hpp deleted file mode 100755 index 90ab308..0000000 --- a/include/boost/range/size.hpp +++ /dev/null @@ -1,116 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_SIZE_HPP -#define BOOST_RANGE_SIZE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING -#include -#else - -#include -#include -#include -#include -#include - -namespace boost -{ -namespace range_detail -{ - - ////////////////////////////////////////////////////////////////////// - // primary template - ////////////////////////////////////////////////////////////////////// - - template< typename C > - inline BOOST_DEDUCED_TYPENAME C::size_type - size( const C& c ) - { - return c.size(); - } - - ////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////// - - template< typename Iterator > - inline std::size_t size( const std::pair& p ) - { - return std::distance( p.first, p.second ); - } - - ////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////// - - template< typename T, std::size_t sz > - inline std::size_t size( const T (&array)[sz] ) - { - return range_detail::array_size( array ); - } - - template< typename T, std::size_t sz > - inline std::size_t size( T (&array)[sz] ) - { - return boost::range_detail::array_size( array ); - } - - ////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////// - - inline std::size_t size( const char* const& s ) - { - return boost::range_detail::str_size( s ); - } - - inline std::size_t size( const wchar_t* const& s ) - { - return boost::range_detail::str_size( s ); - } - -} // namespace 'range_detail' - -template< class T > -inline BOOST_DEDUCED_TYPENAME range_size::type size( const T& r ) -{ - return range_detail::size( r ); -} - - -#if BOOST_WORKAROUND(__MWERKS__, <= 3003 ) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -// BCB and CW are not able to overload pointer when class overloads are also available. -inline range_size::type size( const char* r ) { - return range_detail::str_size( r ); -} -inline range_size::type size( char* r ) { - return range_detail::str_size( r ); -} -inline range_size::type size( const wchar_t* r ) { - return range_detail::str_size( r ); -} -inline range_size::type size( wchar_t* r ) { - return range_detail::str_size( r ); -} -#endif - - -} // namespace 'boost' - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -#endif diff --git a/include/boost/range/size_type.hpp b/include/boost/range/size_type.hpp deleted file mode 100755 index cbc7b83..0000000 --- a/include/boost/range/size_type.hpp +++ /dev/null @@ -1,103 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_SIZE_TYPE_HPP -#define BOOST_RANGE_SIZE_TYPE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -#include - -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#include -#else - -#include -#include - -namespace boost -{ - ////////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////////// - - template< typename C > - struct range_size - { - typedef BOOST_DEDUCED_TYPENAME C::size_type type; - }; - - ////////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////////// - - template< typename Iterator > - struct range_size< std::pair > - { - typedef std::size_t type; - }; - - template< typename Iterator > - struct range_size< const std::pair > - { - typedef std::size_t type; - }; - - ////////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////////// - - template< typename T, std::size_t sz > - struct range_size< T[sz] > - { - typedef std::size_t type; - }; - - template< typename T, std::size_t sz > - struct range_size< const T[sz] > - { - typedef std::size_t type; - }; - - ////////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////////// - - template<> - struct range_size< char* > - { - typedef std::size_t type; - }; - - template<> - struct range_size< wchar_t* > - { - typedef std::size_t type; - }; - - template<> - struct range_size< const char* > - { - typedef std::size_t type; - }; - - template<> - struct range_size< const wchar_t* > - { - typedef std::size_t type; - }; - -} // namespace boost - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#endif diff --git a/include/boost/range/sub_range.hpp b/include/boost/range/sub_range.hpp deleted file mode 100755 index 53c245c..0000000 --- a/include/boost/range/sub_range.hpp +++ /dev/null @@ -1,114 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_SUB_RANGE_HPP -#define BOOST_RANGE_SUB_RANGE_HPP - -#include -#include -#include -#include -#include -#include - -namespace boost -{ - - template< class ForwardRange > - class sub_range : public iterator_range< BOOST_DEDUCED_TYPENAME range_result_iterator::type > - { - typedef BOOST_DEDUCED_TYPENAME range_result_iterator::type iterator_t; - typedef iterator_range< iterator_t > base; - - public: - typedef BOOST_DEDUCED_TYPENAME range_value::type value_type; - typedef BOOST_DEDUCED_TYPENAME range_result_iterator::type iterator; - typedef BOOST_DEDUCED_TYPENAME range_const_iterator::type const_iterator; - typedef BOOST_DEDUCED_TYPENAME range_difference::type difference_type; - typedef BOOST_DEDUCED_TYPENAME range_size::type size_type; - - public: - sub_range() : base() - { } - - template< class ForwardRange2 > - sub_range( ForwardRange2& r ) : - -#if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 800 ) - base( boost::begin( r ), boost::end( r ) ) -#else - base( r ) -#endif - { } - - template< class ForwardRange2 > - sub_range( const ForwardRange2& r ) : - -#if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 800 ) - base( boost::begin( r ), boost::end( r ) ) -#else - base( r ) -#endif - { } - - template< class Iter > - sub_range( Iter first, Iter last ) : - base( first, last ) - { } - - template< class ForwardRange2 > - sub_range& operator=( ForwardRange2& r ) - { - base::operator=( r ); - return *this; - } - - template< class ForwardRange2 > - sub_range& operator=( const ForwardRange2& r ) - { - base::operator=( r ); - return *this; - } - - public: - - iterator begin() { return base::begin(); } - const_iterator begin() const { return base::begin(); } - iterator end() { return base::end(); } - const_iterator end() const { return base::end(); } - size_type size() const { return base::size(); } - - }; - - template< class ForwardRange, class ForwardRange2 > - inline bool operator==( const sub_range& l, - const sub_range& r ) - { - return range_detail::equal( l, r ); - } - - template< class ForwardRange, class ForwardRange2 > - inline bool operator!=( const sub_range& l, - const sub_range& r ) - { - return !range_detail::equal( l, r ); - } - - template< class ForwardRange, class ForwardRange2 > - inline bool operator<( const sub_range& l, - const sub_range& r ) - { - return range_detail::less_than( l, r ); - } - - -} // namespace 'boost' - -#endif diff --git a/include/boost/range/value_type.hpp b/include/boost/range/value_type.hpp deleted file mode 100755 index 137b410..0000000 --- a/include/boost/range/value_type.hpp +++ /dev/null @@ -1,108 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 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_VALUE_TYPE_HPP -#define BOOST_RANGE_VALUE_TYPE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include - -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#include -#else - -#include -#include -#include - - -namespace boost -{ - ////////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////////// - - template< typename C > - struct range_value - { - typedef BOOST_DEDUCED_TYPENAME C::value_type type; - }; - - ////////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////////// - - template< typename Iterator > - struct range_value< std::pair > - { - typedef BOOST_DEDUCED_TYPENAME - iterator_value::type type; - }; - - - template< typename Iterator > - struct range_value< const std::pair > - { - typedef BOOST_DEDUCED_TYPENAME - iterator_value::type type; - }; - - ////////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////////// - - template< typename T, std::size_t sz > - struct range_value< T[sz] > - { - typedef T type; - }; - - template< typename T, std::size_t sz > - struct range_value< const T[sz] > - { - typedef const T type; - }; - - ////////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////////// - - template<> - struct range_value< char* > - { - typedef char type; - }; - - template<> - struct range_value< wchar_t* > - { - typedef wchar_t type; - }; - - template<> - struct range_value< const char* > - { - typedef const char type; - }; - - template<> - struct range_value< const wchar_t* > - { - typedef const wchar_t type; - }; - -} // namespace boost - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#endif