mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
miniboost: add foreach required by kdevplatform
This commit is contained in:
parent
97d4818db2
commit
b9344c9028
19 changed files with 2564 additions and 1 deletions
2
boost.sh
2
boost.sh
|
@ -20,5 +20,5 @@ mkdir -vp miniboost/
|
|||
bcp --boost="$boost" boost/shared_array.hpp boost/concept_check.hpp \
|
||||
boost/scoped_ptr.hpp boost/circular_buffer.hpp boost/scoped_array.hpp \
|
||||
boost/shared_ptr.hpp boost/enable_shared_from_this.hpp boost/weak_ptr.hpp \
|
||||
boost/bind.hpp boost/multi_index_container.hpp \
|
||||
boost/bind.hpp boost/multi_index_container.hpp boost/foreach.hpp \
|
||||
boost/multi_index/member.hpp boost/multi_index/ordered_index.hpp miniboost/
|
1121
miniboost/boost/foreach.hpp
Normal file
1121
miniboost/boost/foreach.hpp
Normal file
File diff suppressed because it is too large
Load diff
135
miniboost/boost/range/begin.hpp
Normal file
135
miniboost/boost/range/begin.hpp
Normal file
|
@ -0,0 +1,135 @@
|
|||
// 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)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/range/config.hpp>
|
||||
|
||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
#include <boost/range/detail/begin.hpp>
|
||||
#else
|
||||
|
||||
#include <boost/range/iterator.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
namespace range_detail
|
||||
{
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// primary template
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< typename C >
|
||||
inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
|
||||
range_begin( C& c )
|
||||
{
|
||||
//
|
||||
// If you get a compile-error here, it is most likely because
|
||||
// you have not implemented range_begin() properly in
|
||||
// the namespace of C
|
||||
//
|
||||
return c.begin();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// pair
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< typename Iterator >
|
||||
inline Iterator range_begin( const std::pair<Iterator,Iterator>& p )
|
||||
{
|
||||
return p.first;
|
||||
}
|
||||
|
||||
template< typename Iterator >
|
||||
inline Iterator range_begin( std::pair<Iterator,Iterator>& p )
|
||||
{
|
||||
return p.first;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// array
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
// May this be discarded? Or is it needed for bad compilers?
|
||||
//
|
||||
template< typename T, std::size_t sz >
|
||||
inline const T* range_begin( const T (&a)[sz] )
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
template< typename T, std::size_t sz >
|
||||
inline T* range_begin( T (&a)[sz] )
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
} // namespace 'range_detail'
|
||||
#endif
|
||||
|
||||
// Use a ADL namespace barrier to avoid ambiguity with other unqualified
|
||||
// calls. This is particularly important with C++0x encouraging
|
||||
// unqualified calls to begin/end.
|
||||
namespace range_adl_barrier
|
||||
{
|
||||
|
||||
template< class T >
|
||||
inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type begin( T& r )
|
||||
{
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
using namespace range_detail;
|
||||
#endif
|
||||
return range_begin( r );
|
||||
}
|
||||
|
||||
template< class T >
|
||||
inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type begin( const T& r )
|
||||
{
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
using namespace range_detail;
|
||||
#endif
|
||||
return range_begin( r );
|
||||
}
|
||||
|
||||
} // namespace range_adl_barrier
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace range_adl_barrier
|
||||
{
|
||||
template< class T >
|
||||
inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
|
||||
const_begin( const T& r )
|
||||
{
|
||||
return boost::range_adl_barrier::begin( r );
|
||||
}
|
||||
} // namespace range_adl_barrier
|
||||
|
||||
using namespace range_adl_barrier;
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
56
miniboost/boost/range/config.hpp
Normal file
56
miniboost/boost/range/config.hpp
Normal file
|
@ -0,0 +1,56 @@
|
|||
// 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 <boost/detail/workaround.hpp>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#ifdef BOOST_RANGE_DEDUCED_TYPENAME
|
||||
#error "macro already defined!"
|
||||
#endif
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
# define BOOST_RANGE_DEDUCED_TYPENAME typename
|
||||
#else
|
||||
#define BOOST_RANGE_DEDUCED_TYPENAME BOOST_DEDUCED_TYPENAME
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_RANGE_NO_ARRAY_SUPPORT
|
||||
#error "macro already defined!"
|
||||
#endif
|
||||
|
||||
#if BOOST_WORKAROUND( __MWERKS__, <= 0x3003 )
|
||||
#define BOOST_RANGE_NO_ARRAY_SUPPORT 1
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_RANGE_NO_ARRAY_SUPPORT
|
||||
#define BOOST_RANGE_ARRAY_REF() (boost_range_array)
|
||||
#define BOOST_RANGE_NO_STATIC_ASSERT
|
||||
#else
|
||||
#define BOOST_RANGE_ARRAY_REF() (&boost_range_array)
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)))
|
||||
# define BOOST_RANGE_UNUSED __attribute__((unused))
|
||||
#else
|
||||
# define BOOST_RANGE_UNUSED
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
76
miniboost/boost/range/const_iterator.hpp
Normal file
76
miniboost/boost/range/const_iterator.hpp
Normal file
|
@ -0,0 +1,76 @@
|
|||
// 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)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/range/config.hpp>
|
||||
|
||||
#include <boost/range/range_fwd.hpp>
|
||||
#include <boost/range/detail/extract_optional_type.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <cstddef>
|
||||
#include <utility>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// default
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace range_detail
|
||||
{
|
||||
|
||||
BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( const_iterator )
|
||||
|
||||
template< typename C >
|
||||
struct range_const_iterator
|
||||
: extract_const_iterator<C>
|
||||
{};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// pair
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< typename Iterator >
|
||||
struct range_const_iterator<std::pair<Iterator,Iterator> >
|
||||
{
|
||||
typedef Iterator type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// array
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< typename T, std::size_t sz >
|
||||
struct range_const_iterator< T[sz] >
|
||||
{
|
||||
typedef const T* type;
|
||||
};
|
||||
|
||||
} // namespace range_detail
|
||||
|
||||
template<typename C, typename Enabler=void>
|
||||
struct range_const_iterator
|
||||
: range_detail::range_const_iterator<
|
||||
BOOST_DEDUCED_TYPENAME remove_reference<C>::type
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif
|
83
miniboost/boost/range/detail/begin.hpp
Normal file
83
miniboost/boost/range/detail/begin.hpp
Normal file
|
@ -0,0 +1,83 @@
|
|||
// 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 <boost/config.hpp> // BOOST_MSVC
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/range/iterator.hpp>
|
||||
#include <boost/range/detail/common.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace range_detail
|
||||
{
|
||||
template< typename T >
|
||||
struct range_begin;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// default
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<>
|
||||
struct range_begin<std_container_>
|
||||
{
|
||||
template< typename C >
|
||||
static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type fun( C& c )
|
||||
{
|
||||
return c.begin();
|
||||
};
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// pair
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<>
|
||||
struct range_begin<std_pair_>
|
||||
{
|
||||
template< typename P >
|
||||
static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type fun( const P& p )
|
||||
{
|
||||
return p.first;
|
||||
}
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// array
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<>
|
||||
struct range_begin<array_>
|
||||
{
|
||||
template<typename T>
|
||||
static BOOST_RANGE_DEDUCED_TYPENAME range_value<T>::type* fun(T& t)
|
||||
{
|
||||
return t;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace 'range_detail'
|
||||
|
||||
namespace range_adl_barrier
|
||||
{
|
||||
template< typename C >
|
||||
inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
|
||||
begin( C& c )
|
||||
{
|
||||
return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
|
||||
}
|
||||
}
|
||||
} // namespace 'boost'
|
||||
|
||||
|
||||
#endif
|
117
miniboost/boost/range/detail/common.hpp
Normal file
117
miniboost/boost/range/detail/common.hpp
Normal file
|
@ -0,0 +1,117 @@
|
|||
// 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)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/range/config.hpp>
|
||||
#include <boost/range/detail/sfinae.hpp>
|
||||
#include <boost/type_traits/is_void.hpp>
|
||||
#include <boost/type_traits/detail/ice_or.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// 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<is_const_char_ptr_, is_const_wchar_t_ptr_>::value ));
|
||||
BOOST_STATIC_CONSTANT( bool, is_array_ = boost::is_array<C>::value );
|
||||
|
||||
};
|
||||
|
||||
template< typename C >
|
||||
class range
|
||||
{
|
||||
typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::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<C>::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<C>::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<C>::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<C>::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<C>::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<C>::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<C>::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<C>::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<char_array_t>::value,
|
||||
boost::range_detail::std_container_,
|
||||
char_array_t >::type type;
|
||||
}; // class 'range'
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
86
miniboost/boost/range/detail/end.hpp
Normal file
86
miniboost/boost/range/detail/end.hpp
Normal file
|
@ -0,0 +1,86 @@
|
|||
// 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 <boost/config.hpp> // BOOST_MSVC
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#include <boost/range/detail/implementation_help.hpp>
|
||||
#include <boost/range/iterator.hpp>
|
||||
#include <boost/range/detail/common.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace range_detail
|
||||
{
|
||||
template< typename T >
|
||||
struct range_end;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// default
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<>
|
||||
struct range_end<std_container_>
|
||||
{
|
||||
template< typename C >
|
||||
static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
|
||||
fun( C& c )
|
||||
{
|
||||
return c.end();
|
||||
};
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// pair
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<>
|
||||
struct range_end<std_pair_>
|
||||
{
|
||||
template< typename P >
|
||||
static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type
|
||||
fun( const P& p )
|
||||
{
|
||||
return p.second;
|
||||
}
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// array
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<>
|
||||
struct range_end<array_>
|
||||
{
|
||||
template<typename T>
|
||||
static BOOST_RANGE_DEDUCED_TYPENAME remove_extent<T>::type* fun(T& t)
|
||||
{
|
||||
return t + remove_extent<T>::size;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace 'range_detail'
|
||||
|
||||
namespace range_adl_barrier
|
||||
{
|
||||
template< typename C >
|
||||
inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
|
||||
end( C& c )
|
||||
{
|
||||
return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
|
||||
}
|
||||
} // namespace range_adl_barrier
|
||||
|
||||
} // namespace 'boost'
|
||||
|
||||
#endif
|
48
miniboost/boost/range/detail/extract_optional_type.hpp
Normal file
48
miniboost/boost/range/detail/extract_optional_type.hpp
Normal file
|
@ -0,0 +1,48 @@
|
|||
// Boost.Range library
|
||||
//
|
||||
// Copyright Arno Schoedl & Neil Groves 2009.
|
||||
// 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_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED
|
||||
#define BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_HAS_XXX)
|
||||
|
||||
// Defines extract_some_typedef<T> which exposes T::some_typedef as
|
||||
// extract_some_typedef<T>::type if T::some_typedef exists. Otherwise
|
||||
// extract_some_typedef<T> is empty.
|
||||
#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \
|
||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(a_typedef) \
|
||||
template< typename C, bool B = BOOST_PP_CAT(has_, a_typedef)<C>::value > \
|
||||
struct BOOST_PP_CAT(extract_, a_typedef) \
|
||||
{}; \
|
||||
template< typename C > \
|
||||
struct BOOST_PP_CAT(extract_, a_typedef)< C, true > \
|
||||
{ \
|
||||
typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \
|
||||
template< typename C > \
|
||||
struct BOOST_PP_CAT(extract_, a_typedef) \
|
||||
{ \
|
||||
typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // include guard
|
114
miniboost/boost/range/detail/implementation_help.hpp
Normal file
114
miniboost/boost/range/detail/implementation_help.hpp
Normal file
|
@ -0,0 +1,114 @@
|
|||
// 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 <boost/range/config.hpp>
|
||||
#include <boost/range/detail/common.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <cstddef>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef BOOST_NO_CWCHAR
|
||||
#include <wchar.h>
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace range_detail
|
||||
{
|
||||
template <typename T>
|
||||
inline void boost_range_silence_warning( const T& ) { }
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// 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 const_cast<Char*>( str_end( s, s ) );
|
||||
}
|
||||
|
||||
template< class T, std::size_t sz >
|
||||
inline T* array_end( T BOOST_RANGE_ARRAY_REF()[sz] )
|
||||
{
|
||||
return boost_range_array + sz;
|
||||
}
|
||||
|
||||
template< class T, std::size_t sz >
|
||||
inline const T* array_end( const T BOOST_RANGE_ARRAY_REF()[sz] )
|
||||
{
|
||||
return boost_range_array + sz;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// 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] )
|
||||
{
|
||||
boost_range_silence_warning( boost_range_array );
|
||||
return sz;
|
||||
}
|
||||
|
||||
template< class T, std::size_t sz >
|
||||
inline std::size_t array_size( const T BOOST_RANGE_ARRAY_REF()[sz] )
|
||||
{
|
||||
boost_range_silence_warning( boost_range_array );
|
||||
return sz;
|
||||
}
|
||||
|
||||
inline bool is_same_address(const void* l, const void* r)
|
||||
{
|
||||
return l == r;
|
||||
}
|
||||
|
||||
template<class T1, class T2>
|
||||
inline bool is_same_object(const T1& l, const T2& r)
|
||||
{
|
||||
return range_detail::is_same_address(&l, &r);
|
||||
}
|
||||
|
||||
} // namespace 'range_detail'
|
||||
|
||||
} // namespace 'boost'
|
||||
|
||||
|
||||
#endif
|
132
miniboost/boost/range/detail/msvc_has_iterator_workaround.hpp
Normal file
132
miniboost/boost/range/detail/msvc_has_iterator_workaround.hpp
Normal file
|
@ -0,0 +1,132 @@
|
|||
// Boost.Range library
|
||||
//
|
||||
// Copyright Eric Niebler 2014. 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_MSVC_HAS_ITERATOR_WORKAROUND_HPP
|
||||
#define BOOST_RANGE_DETAIL_MSVC_HAS_ITERATOR_WORKAROUND_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_RANGE_MUTABLE_ITERATOR_HPP
|
||||
# error This file should only be included from <boost/range/mutable_iterator.hpp>
|
||||
#endif
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
|
||||
namespace boost
|
||||
{
|
||||
namespace cb_details
|
||||
{
|
||||
template <class Buff, class Traits>
|
||||
struct iterator;
|
||||
}
|
||||
|
||||
namespace python
|
||||
{
|
||||
template <class Container
|
||||
, class NextPolicies /*= objects::default_iterator_call_policies*/>
|
||||
struct iterator;
|
||||
}
|
||||
|
||||
namespace type_erasure
|
||||
{
|
||||
template<
|
||||
class Traversal,
|
||||
class T /*= _self*/,
|
||||
class Reference /*= ::boost::use_default*/,
|
||||
class DifferenceType /*= ::std::ptrdiff_t*/,
|
||||
class ValueType /*= typename deduced<iterator_value_type<T> >::type*/
|
||||
>
|
||||
struct iterator;
|
||||
}
|
||||
|
||||
namespace unordered { namespace iterator_detail
|
||||
{
|
||||
template <typename Node>
|
||||
struct iterator;
|
||||
}}
|
||||
|
||||
namespace container { namespace container_detail
|
||||
{
|
||||
template<class IIterator, bool IsConst>
|
||||
class iterator;
|
||||
}}
|
||||
|
||||
namespace spirit { namespace lex { namespace lexertl
|
||||
{
|
||||
template <typename Functor>
|
||||
class iterator;
|
||||
}}}
|
||||
|
||||
namespace range_detail
|
||||
{
|
||||
template <class Buff, class Traits>
|
||||
struct has_iterator< ::boost::cb_details::iterator<Buff, Traits> >
|
||||
: mpl::false_
|
||||
{};
|
||||
|
||||
template <class Buff, class Traits>
|
||||
struct has_iterator< ::boost::cb_details::iterator<Buff, Traits> const>
|
||||
: mpl::false_
|
||||
{};
|
||||
|
||||
template <class Container, class NextPolicies>
|
||||
struct has_iterator< ::boost::python::iterator<Container, NextPolicies> >
|
||||
: mpl::false_
|
||||
{};
|
||||
|
||||
template <class Container, class NextPolicies>
|
||||
struct has_iterator< ::boost::python::iterator<Container, NextPolicies> const>
|
||||
: mpl::false_
|
||||
{};
|
||||
|
||||
template<class Traversal, class T, class Reference, class DifferenceType, class ValueType>
|
||||
struct has_iterator< ::boost::type_erasure::iterator<Traversal, T, Reference, DifferenceType, ValueType> >
|
||||
: mpl::false_
|
||||
{};
|
||||
|
||||
template<class Traversal, class T, class Reference, class DifferenceType, class ValueType>
|
||||
struct has_iterator< ::boost::type_erasure::iterator<Traversal, T, Reference, DifferenceType, ValueType> const>
|
||||
: mpl::false_
|
||||
{};
|
||||
|
||||
template <typename Node>
|
||||
struct has_iterator< ::boost::unordered::iterator_detail::iterator<Node> >
|
||||
: mpl::false_
|
||||
{};
|
||||
|
||||
template <typename Node>
|
||||
struct has_iterator< ::boost::unordered::iterator_detail::iterator<Node> const>
|
||||
: mpl::false_
|
||||
{};
|
||||
|
||||
template<class IIterator, bool IsConst>
|
||||
struct has_iterator< ::boost::container::container_detail::iterator<IIterator, IsConst> >
|
||||
: mpl::false_
|
||||
{};
|
||||
|
||||
template<class IIterator, bool IsConst>
|
||||
struct has_iterator< ::boost::container::container_detail::iterator<IIterator, IsConst> const>
|
||||
: mpl::false_
|
||||
{};
|
||||
|
||||
template <typename Functor>
|
||||
struct has_iterator< ::boost::spirit::lex::lexertl::iterator<Functor> >
|
||||
: mpl::false_
|
||||
{};
|
||||
|
||||
template <typename Functor>
|
||||
struct has_iterator< ::boost::spirit::lex::lexertl::iterator<Functor> const>
|
||||
: mpl::false_
|
||||
{};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
77
miniboost/boost/range/detail/sfinae.hpp
Normal file
77
miniboost/boost/range/detail/sfinae.hpp
Normal file
|
@ -0,0 +1,77 @@
|
|||
// 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 <boost/range/config.hpp>
|
||||
#include <boost/type_traits/is_array.hpp>
|
||||
#include <boost/type_traits/detail/yes_no_type.hpp>
|
||||
#include <utility>
|
||||
|
||||
|
||||
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<Iterator,Iterator>* );
|
||||
no_type is_pair_impl( ... );
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// tags
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct char_or_wchar_t_array_tag {};
|
||||
|
||||
} // namespace 'range_detail'
|
||||
|
||||
} // namespace 'boost'
|
||||
|
||||
#endif
|
128
miniboost/boost/range/end.hpp
Normal file
128
miniboost/boost/range/end.hpp
Normal file
|
@ -0,0 +1,128 @@
|
|||
// 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)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/range/config.hpp>
|
||||
|
||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
#include <boost/range/detail/end.hpp>
|
||||
#else
|
||||
|
||||
#include <boost/range/detail/implementation_help.hpp>
|
||||
#include <boost/range/iterator.hpp>
|
||||
#include <boost/range/const_iterator.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
namespace range_detail
|
||||
{
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// primary template
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
template< typename C >
|
||||
inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
|
||||
range_end( C& c )
|
||||
{
|
||||
//
|
||||
// If you get a compile-error here, it is most likely because
|
||||
// you have not implemented range_begin() properly in
|
||||
// the namespace of C
|
||||
//
|
||||
return c.end();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// pair
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< typename Iterator >
|
||||
inline Iterator range_end( const std::pair<Iterator,Iterator>& p )
|
||||
{
|
||||
return p.second;
|
||||
}
|
||||
|
||||
template< typename Iterator >
|
||||
inline Iterator range_end( std::pair<Iterator,Iterator>& p )
|
||||
{
|
||||
return p.second;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// array
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< typename T, std::size_t sz >
|
||||
inline const T* range_end( const T (&a)[sz] )
|
||||
{
|
||||
return range_detail::array_end<T,sz>( a );
|
||||
}
|
||||
|
||||
template< typename T, std::size_t sz >
|
||||
inline T* range_end( T (&a)[sz] )
|
||||
{
|
||||
return range_detail::array_end<T,sz>( a );
|
||||
}
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
} // namespace 'range_detail'
|
||||
#endif
|
||||
|
||||
namespace range_adl_barrier
|
||||
{
|
||||
|
||||
template< class T >
|
||||
inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r )
|
||||
{
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
using namespace range_detail;
|
||||
#endif
|
||||
return range_end( r );
|
||||
}
|
||||
|
||||
template< class T >
|
||||
inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
|
||||
{
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
using namespace range_detail;
|
||||
#endif
|
||||
return range_end( r );
|
||||
}
|
||||
|
||||
} // namespace range_adl_barrier
|
||||
} // namespace 'boost'
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace range_adl_barrier
|
||||
{
|
||||
template< class T >
|
||||
inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
|
||||
const_end( const T& r )
|
||||
{
|
||||
return boost::range_adl_barrier::end( r );
|
||||
}
|
||||
} // namespace range_adl_barrier
|
||||
using namespace range_adl_barrier;
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
76
miniboost/boost/range/iterator.hpp
Normal file
76
miniboost/boost/range/iterator.hpp
Normal file
|
@ -0,0 +1,76 @@
|
|||
// 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)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/range/config.hpp>
|
||||
#include <boost/range/range_fwd.hpp>
|
||||
#include <boost/range/mutable_iterator.hpp>
|
||||
#include <boost/range/const_iterator.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
|
||||
|
||||
namespace range_detail_vc7_1
|
||||
{
|
||||
template< typename C, typename Sig = void(C) >
|
||||
struct range_iterator
|
||||
{
|
||||
typedef BOOST_RANGE_DEDUCED_TYPENAME
|
||||
mpl::eval_if_c< is_const<C>::value,
|
||||
range_const_iterator< typename remove_const<C>::type >,
|
||||
range_mutable_iterator<C> >::type type;
|
||||
};
|
||||
|
||||
template< typename C, typename T >
|
||||
struct range_iterator< C, void(T[]) >
|
||||
{
|
||||
typedef T* type;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template< typename C, typename Enabler=void >
|
||||
struct range_iterator
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
|
||||
|
||||
typedef BOOST_RANGE_DEDUCED_TYPENAME
|
||||
range_detail_vc7_1::range_iterator<C>::type type;
|
||||
|
||||
#else
|
||||
|
||||
private:
|
||||
typedef typename remove_reference<C>::type param_t;
|
||||
|
||||
public:
|
||||
typedef typename mpl::eval_if_c<
|
||||
is_const<param_t>::value,
|
||||
range_const_iterator<typename remove_const<param_t>::type>,
|
||||
range_mutable_iterator<param_t>
|
||||
>::type type;
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
79
miniboost/boost/range/mutable_iterator.hpp
Normal file
79
miniboost/boost/range/mutable_iterator.hpp
Normal file
|
@ -0,0 +1,79 @@
|
|||
// 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_MUTABLE_ITERATOR_HPP
|
||||
#define BOOST_RANGE_MUTABLE_ITERATOR_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/range/config.hpp>
|
||||
|
||||
#include <boost/range/range_fwd.hpp>
|
||||
#include <boost/range/detail/extract_optional_type.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/iterator/iterator_traits.hpp>
|
||||
#include <cstddef>
|
||||
#include <utility>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// default
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace range_detail
|
||||
{
|
||||
|
||||
BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( iterator )
|
||||
|
||||
template< typename C >
|
||||
struct range_mutable_iterator
|
||||
: range_detail::extract_iterator<
|
||||
BOOST_DEDUCED_TYPENAME remove_reference<C>::type>
|
||||
{};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// pair
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< typename Iterator >
|
||||
struct range_mutable_iterator< std::pair<Iterator,Iterator> >
|
||||
{
|
||||
typedef Iterator type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// array
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< typename T, std::size_t sz >
|
||||
struct range_mutable_iterator< T[sz] >
|
||||
{
|
||||
typedef T* type;
|
||||
};
|
||||
|
||||
} // namespace range_detail
|
||||
|
||||
template<typename C, typename Enabler=void>
|
||||
struct range_mutable_iterator
|
||||
: range_detail::range_mutable_iterator<
|
||||
BOOST_DEDUCED_TYPENAME remove_reference<C>::type
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include <boost/range/detail/msvc_has_iterator_workaround.hpp>
|
||||
|
||||
#endif
|
63
miniboost/boost/range/range_fwd.hpp
Normal file
63
miniboost/boost/range/range_fwd.hpp
Normal 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
|
65
miniboost/boost/range/rbegin.hpp
Normal file
65
miniboost/boost/range/rbegin.hpp
Normal file
|
@ -0,0 +1,65 @@
|
|||
// 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)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/range/reverse_iterator.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< class C >
|
||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
|
||||
rbegin( C& c )
|
||||
{
|
||||
return BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( boost::end( c ) );
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
template< class C >
|
||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
|
||||
rbegin( C& c )
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
|
||||
iter_type;
|
||||
return iter_type( boost::end( c ) );
|
||||
}
|
||||
|
||||
template< class C >
|
||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
|
||||
rbegin( const C& c )
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
|
||||
iter_type;
|
||||
return iter_type( boost::end( c ) );
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< class T >
|
||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const T>::type
|
||||
const_rbegin( const T& r )
|
||||
{
|
||||
return boost::rbegin( r );
|
||||
}
|
||||
|
||||
} // namespace 'boost'
|
||||
|
||||
#endif
|
||||
|
65
miniboost/boost/range/rend.hpp
Normal file
65
miniboost/boost/range/rend.hpp
Normal file
|
@ -0,0 +1,65 @@
|
|||
// 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)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/reverse_iterator.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< class C >
|
||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
|
||||
rend( C& c )
|
||||
{
|
||||
return BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( boost::begin( c ) );
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
template< class C >
|
||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
|
||||
rend( C& c )
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
|
||||
iter_type;
|
||||
return iter_type( boost::begin( c ) );
|
||||
}
|
||||
|
||||
template< class C >
|
||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
|
||||
rend( const C& c )
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
|
||||
iter_type;
|
||||
return iter_type( boost::begin( c ) );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template< class T >
|
||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const T>::type
|
||||
const_rend( const T& r )
|
||||
{
|
||||
return boost::rend( r );
|
||||
}
|
||||
|
||||
} // namespace 'boost'
|
||||
|
||||
#endif
|
||||
|
42
miniboost/boost/range/reverse_iterator.hpp
Normal file
42
miniboost/boost/range/reverse_iterator.hpp
Normal file
|
@ -0,0 +1,42 @@
|
|||
// 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)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/range/config.hpp>
|
||||
#include <boost/range/iterator.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/iterator/reverse_iterator.hpp>
|
||||
|
||||
|
||||
namespace boost
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// default
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< typename T >
|
||||
struct range_reverse_iterator
|
||||
{
|
||||
typedef reverse_iterator<
|
||||
BOOST_DEDUCED_TYPENAME range_iterator<
|
||||
BOOST_DEDUCED_TYPENAME remove_reference<T>::type>::type > type;
|
||||
};
|
||||
|
||||
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif
|
Loading…
Add table
Reference in a new issue