diff options
Diffstat (limited to '3rdParty/Boost/src/boost/range/detail')
11 files changed, 235 insertions, 375 deletions
diff --git a/3rdParty/Boost/src/boost/range/detail/as_literal.hpp b/3rdParty/Boost/src/boost/range/detail/as_literal.hpp index 0bd9a15..8b219ea 100644 --- a/3rdParty/Boost/src/boost/range/detail/as_literal.hpp +++ b/3rdParty/Boost/src/boost/range/detail/as_literal.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_RANGE_DETAIL_AS_LITERAL_HPP #define BOOST_RANGE_DETAIL_AS_LITERAL_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/range/detail/begin.hpp b/3rdParty/Boost/src/boost/range/detail/begin.hpp index f3da732..1d9390f 100644 --- a/3rdParty/Boost/src/boost/range/detail/begin.hpp +++ b/3rdParty/Boost/src/boost/range/detail/begin.hpp @@ -15,9 +15,6 @@ #include <boost/detail/workaround.hpp> #include <boost/range/iterator.hpp> #include <boost/range/detail/common.hpp> -#if BOOST_WORKAROUND(BOOST_MSVC, < 1310) -# include <boost/range/value_type.hpp> -#endif namespace boost { @@ -62,19 +59,11 @@ namespace boost template<> struct range_begin<array_> { - #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) - template< typename T, std::size_t sz > - static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] ) - { - return boost_range_array; - } - #else template<typename T> static BOOST_RANGE_DEDUCED_TYPENAME range_value<T>::type* fun(T& t) { return t; } - #endif }; } // namespace 'range_detail' diff --git a/3rdParty/Boost/src/boost/range/detail/common.hpp b/3rdParty/Boost/src/boost/range/detail/common.hpp index f7539f5..b0ad535 100644 --- a/3rdParty/Boost/src/boost/range/detail/common.hpp +++ b/3rdParty/Boost/src/boost/range/detail/common.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_RANGE_DETAIL_COMMON_HPP #define BOOST_RANGE_DETAIL_COMMON_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/range/detail/const_iterator.hpp b/3rdParty/Boost/src/boost/range/detail/const_iterator.hpp deleted file mode 100644 index e5cb34a..0000000 --- a/3rdParty/Boost/src/boost/range/detail/const_iterator.hpp +++ /dev/null @@ -1,71 +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 <boost/range/detail/common.hpp> -#include <boost/range/detail/remove_extent.hpp> - -////////////////////////////////////////////////////////////////////////////// -// missing partial specialization workaround. -////////////////////////////////////////////////////////////////////////////// - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_const_iterator_; - - template<> - struct range_const_iterator_<std_container_> - { - template< typename C > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME C::const_iterator type; - }; - }; - - template<> - struct range_const_iterator_<std_pair_> - { - template< typename P > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME P::first_type type; - }; - }; - - - template<> - struct range_const_iterator_<array_> - { - template< typename T > - struct pts - { - typedef const BOOST_RANGE_DEDUCED_TYPENAME - remove_extent<T>::type* type; - }; - }; - } - - template< typename C > - class range_const_iterator - { - typedef BOOST_DEDUCED_TYPENAME range_detail::range<C>::type c_type; - public: - typedef BOOST_DEDUCED_TYPENAME range_detail::range_const_iterator_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type; - }; - -} - -#endif diff --git a/3rdParty/Boost/src/boost/range/detail/end.hpp b/3rdParty/Boost/src/boost/range/detail/end.hpp index 8b5f35d..f2f7178 100644 --- a/3rdParty/Boost/src/boost/range/detail/end.hpp +++ b/3rdParty/Boost/src/boost/range/detail/end.hpp @@ -14,15 +14,9 @@ #include <boost/config.hpp> // BOOST_MSVC #include <boost/detail/workaround.hpp> -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -# include <boost/range/detail/vc6/end.hpp> -#else -# include <boost/range/detail/implementation_help.hpp> -# include <boost/range/iterator.hpp> -# include <boost/range/detail/common.hpp> -# if BOOST_WORKAROUND(BOOST_MSVC, < 1310) -# include <boost/range/detail/remove_extent.hpp> -# endif +#include <boost/range/detail/implementation_help.hpp> +#include <boost/range/iterator.hpp> +#include <boost/range/detail/common.hpp> namespace boost { @@ -68,19 +62,11 @@ namespace boost template<> struct range_end<array_> { - #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) - template< typename T, std::size_t sz > - static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] ) - { - return boost::range_detail::array_end( boost_range_array ); - } - #else template<typename T> static BOOST_RANGE_DEDUCED_TYPENAME remove_extent<T>::type* fun(T& t) { return t + remove_extent<T>::size; } - #endif }; } // namespace 'range_detail' @@ -97,5 +83,4 @@ namespace boost } // namespace 'boost' -# endif // VC6 #endif diff --git a/3rdParty/Boost/src/boost/range/detail/extract_optional_type.hpp b/3rdParty/Boost/src/boost/range/detail/extract_optional_type.hpp index 8292e34..0381434 100644 --- a/3rdParty/Boost/src/boost/range/detail/extract_optional_type.hpp +++ b/3rdParty/Boost/src/boost/range/detail/extract_optional_type.hpp @@ -10,41 +10,37 @@ #ifndef BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED #define BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif #include <boost/config.hpp> +#include <boost/preprocessor/cat.hpp> +#include <boost/mpl/has_xxx.hpp> -#ifdef BOOST_NO_PARTIAL_TEMPLATE_SPECIALIZATION +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX) -#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \ - template< typename C > \ - struct extract_ ## a_typedef \ - { \ - typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \ +// 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 -namespace boost { - namespace range_detail { - template< typename T > struct exists { typedef void type; }; - } -} - -// 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 ) \ - template< typename C, typename Enable=void > \ - struct extract_ ## a_typedef \ - {}; \ - template< typename C > \ - struct extract_ ## a_typedef< C \ - , BOOST_DEDUCED_TYPENAME boost::range_detail::exists< BOOST_DEDUCED_TYPENAME C::a_typedef >::type \ - > { \ - typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \ +#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 diff --git a/3rdParty/Boost/src/boost/range/detail/has_member_size.hpp b/3rdParty/Boost/src/boost/range/detail/has_member_size.hpp new file mode 100644 index 0000000..0c639aa --- /dev/null +++ b/3rdParty/Boost/src/boost/range/detail/has_member_size.hpp @@ -0,0 +1,66 @@ +// Boost.Range library +// +// Copyright Neil Groves 2014. +// +// Use, modification and distribution are 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_HAS_MEMBER_SIZE_HPP +#define BOOST_RANGE_DETAIL_HAS_MEMBER_SIZE_HPP + +#include <boost/type_traits/is_class.hpp> +#include <boost/type_traits/is_member_function_pointer.hpp> +#include <boost/mpl/and.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/cstdint.hpp> + +namespace boost +{ + namespace range_detail + { + +template<class T> +class has_member_size_impl +{ +private: + template<class U, U> + class check + { + }; + + template<class C> + static boost::uint8_t f(check<std::size_t(C::*)(void) const, &C::size>*); + + template<class C> + static boost::uint16_t f(...); + +public: + static const bool value = + (sizeof(f<T>(0)) == sizeof(boost::uint8_t)); + + typedef typename mpl::if_c< + (sizeof(f<T>(0)) == sizeof(boost::uint8_t)), + mpl::true_, + mpl::false_ + >::type type; +}; + +template<class T> +struct has_member_size +{ + typedef typename mpl::and_< + typename is_class<T>::type, + typename has_member_size_impl<const T>::type + >::type type; + + static const bool value = + is_class<T>::value && has_member_size_impl<const T>::value; +}; + + } // namespace range_detail +}// namespace boost + +#endif // include guard diff --git a/3rdParty/Boost/src/boost/range/detail/implementation_help.hpp b/3rdParty/Boost/src/boost/range/detail/implementation_help.hpp index 1f7d163..f35953f 100644 --- a/3rdParty/Boost/src/boost/range/detail/implementation_help.hpp +++ b/3rdParty/Boost/src/boost/range/detail/implementation_help.hpp @@ -95,6 +95,17 @@ namespace boost 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' diff --git a/3rdParty/Boost/src/boost/range/detail/iterator.hpp b/3rdParty/Boost/src/boost/range/detail/iterator.hpp deleted file mode 100644 index 58346d4..0000000 --- a/3rdParty/Boost/src/boost/range/detail/iterator.hpp +++ /dev/null @@ -1,78 +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 <boost/range/detail/common.hpp> -#include <boost/range/detail/remove_extent.hpp> - -#include <boost/static_assert.hpp> - -////////////////////////////////////////////////////////////////////////////// -// missing partial specialization workaround. -////////////////////////////////////////////////////////////////////////////// - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_iterator_ { - template< typename C > - struct pts - { - typedef int type; - }; - }; - - template<> - struct range_iterator_<std_container_> - { - template< typename C > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME C::iterator type; - }; - }; - - template<> - struct range_iterator_<std_pair_> - { - template< typename P > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME P::first_type type; - }; - }; - - template<> - struct range_iterator_<array_> - { - template< typename T > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME - remove_extent<T>::type* type; - }; - }; - - } - - template< typename C > - class range_mutable_iterator - { - typedef BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type c_type; - public: - typedef typename range_detail::range_iterator_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type; - }; -} - -#endif diff --git a/3rdParty/Boost/src/boost/range/detail/msvc_has_iterator_workaround.hpp b/3rdParty/Boost/src/boost/range/detail/msvc_has_iterator_workaround.hpp new file mode 100644 index 0000000..62b67fd --- /dev/null +++ b/3rdParty/Boost/src/boost/range/detail/msvc_has_iterator_workaround.hpp @@ -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 diff --git a/3rdParty/Boost/src/boost/range/detail/vc6/end.hpp b/3rdParty/Boost/src/boost/range/detail/vc6/end.hpp deleted file mode 100644 index 4f76af5..0000000 --- a/3rdParty/Boost/src/boost/range/detail/vc6/end.hpp +++ /dev/null @@ -1,170 +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_VC6_END_HPP -#define BOOST_RANGE_DETAIL_VC6_END_HPP - -#include <boost/range/detail/implementation_help.hpp> -#include <boost/range/detail/implementation_help.hpp> -#include <boost/range/result_iterator.hpp> -#include <boost/range/detail/common.hpp> -#include <boost/range/detail/remove_extent.hpp> - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_end; - - ////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_end<std_container_> - { - template< typename C > - struct inner { - static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator<C>::type - fun( C& c ) - { - return c.end(); - }; - }; - }; - - ////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_end<std_pair_> - { - template< typename P > - struct inner { - static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator<P>::type - fun( const P& p ) - { - return p.second; - } - }; - }; - - ////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_end<array_> - { - template< typename T > - struct inner { - static BOOST_DEDUCED_TYPENAME remove_extent<T>::type* - fun(T& t) - { - return t + remove_extent<T>::size; - } - }; - }; - - - template<> - struct range_end<char_array_> - { - template< typename T > - struct inner { - static BOOST_DEDUCED_TYPENAME remove_extent<T>::type* - fun(T& t) - { - return t + remove_extent<T>::size; - } - }; - }; - - template<> - struct range_end<wchar_t_array_> - { - template< typename T > - struct inner { - static BOOST_DEDUCED_TYPENAME remove_extent<T>::type* - fun(T& t) - { - return t + remove_extent<T>::size; - } - }; - }; - - ////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_end<char_ptr_> - { - template< typename T > - struct inner { - static char* fun( char* s ) - { - return boost::range_detail::str_end( s ); - } - }; - }; - - template<> - struct range_end<const_char_ptr_> - { - template< typename T > - struct inner { - static const char* fun( const char* s ) - { - return boost::range_detail::str_end( s ); - } - }; - }; - - template<> - struct range_end<wchar_t_ptr_> - { - template< typename T > - struct inner { - static wchar_t* fun( wchar_t* s ) - { - return boost::range_detail::str_end( s ); - } - }; - }; - - - template<> - struct range_end<const_wchar_t_ptr_> - { - template< typename T > - struct inner { - 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<C>::type - end( C& c ) - { - return range_detail::range_end<range_detail::range<C>::type>::inner<C>::fun( c ); - } - -} // namespace 'boost' - - -#endif |