diff options
author | bugaevskiy <bugaevskiy@yandex-team.com> | 2022-08-13 16:12:40 +0300 |
---|---|---|
committer | bugaevskiy <bugaevskiy@yandex-team.com> | 2022-08-13 16:12:40 +0300 |
commit | 167bbfedbd3a21f0da22ca76f6c81772c6acb9ec (patch) | |
tree | 280c8f13430dda34ebc7f998906307247a05987b | |
parent | 63727ce4a70378db0021af1d58d675ed4100939a (diff) | |
download | ydb-167bbfedbd3a21f0da22ca76f6c81772c6acb9ec.tar.gz |
Reimport boost/range as a separate project
171 files changed, 1602 insertions, 14903 deletions
diff --git a/CMakeLists.darwin.txt b/CMakeLists.darwin.txt index 2ca68929e0..d450c03d64 100644 --- a/CMakeLists.darwin.txt +++ b/CMakeLists.darwin.txt @@ -318,6 +318,9 @@ add_subdirectory(contrib/restricted/boost/functional) add_subdirectory(contrib/restricted/boost/numeric_conversion) add_subdirectory(contrib/restricted/boost/polygon) add_subdirectory(contrib/restricted/boost/qvm) +add_subdirectory(contrib/restricted/boost/range) +add_subdirectory(contrib/restricted/boost/regex) +add_subdirectory(contrib/libs/icu) add_subdirectory(contrib/restricted/boost/rational) add_subdirectory(contrib/restricted/boost/tokenizer) add_subdirectory(contrib/restricted/boost/tti) @@ -910,7 +913,6 @@ add_subdirectory(ydb/core/yq/libs/audit/events) add_subdirectory(ydb/library/folder_service/mock) add_subdirectory(ydb/library/keys) add_subdirectory(ydb/library/yql/parser/pg_wrapper) -add_subdirectory(contrib/libs/icu) add_subdirectory(ydb/library/yql/sql/pg) add_subdirectory(ydb/library/yql/udfs/common/clickhouse/client) add_subdirectory(ydb/library/yql/public/udf/support) diff --git a/CMakeLists.linux.txt b/CMakeLists.linux.txt index 090ef2b050..80a7d405d2 100644 --- a/CMakeLists.linux.txt +++ b/CMakeLists.linux.txt @@ -321,6 +321,9 @@ add_subdirectory(contrib/restricted/boost/functional) add_subdirectory(contrib/restricted/boost/numeric_conversion) add_subdirectory(contrib/restricted/boost/polygon) add_subdirectory(contrib/restricted/boost/qvm) +add_subdirectory(contrib/restricted/boost/range) +add_subdirectory(contrib/restricted/boost/regex) +add_subdirectory(contrib/libs/icu) add_subdirectory(contrib/restricted/boost/rational) add_subdirectory(contrib/restricted/boost/tokenizer) add_subdirectory(contrib/restricted/boost/tti) @@ -934,7 +937,6 @@ add_subdirectory(ydb/core/yq/libs/audit/events) add_subdirectory(ydb/library/folder_service/mock) add_subdirectory(ydb/library/keys) add_subdirectory(ydb/library/yql/parser/pg_wrapper) -add_subdirectory(contrib/libs/icu) add_subdirectory(ydb/library/yql/sql/pg) add_subdirectory(ydb/library/yql/udfs/common/datetime) add_subdirectory(library/cpp/timezone_conversion) diff --git a/contrib/restricted/boost/CMakeLists.txt b/contrib/restricted/boost/CMakeLists.txt index 7827728877..9f92aee9f2 100644 --- a/contrib/restricted/boost/CMakeLists.txt +++ b/contrib/restricted/boost/CMakeLists.txt @@ -48,6 +48,7 @@ target_link_libraries(contrib-restricted-boost INTERFACE restricted-boost-predef restricted-boost-preprocessor restricted-boost-qvm + restricted-boost-range restricted-boost-rational restricted-boost-smart_ptr restricted-boost-static_assert diff --git a/contrib/restricted/boost/boost/range/adaptor/adjacent_filtered.hpp b/contrib/restricted/boost/boost/range/adaptor/adjacent_filtered.hpp deleted file mode 100644 index 287a4ae773..0000000000 --- a/contrib/restricted/boost/boost/range/adaptor/adjacent_filtered.hpp +++ /dev/null @@ -1,237 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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_ADAPTOR_ADJACENT_FILTER_IMPL_HPP -#define BOOST_RANGE_ADAPTOR_ADJACENT_FILTER_IMPL_HPP - -#include <boost/config.hpp> -#ifdef BOOST_MSVC -#pragma warning( push ) -#pragma warning( disable : 4355 ) -#endif - -#include <boost/range/adaptor/argument_fwd.hpp> -#include <boost/range/iterator_range.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/iterator/iterator_adaptor.hpp> -#include <boost/next_prior.hpp> - - -namespace boost -{ - namespace range_detail - { - template< class Iter, class Pred, bool default_pass > - class skip_iterator - : public boost::iterator_adaptor< - skip_iterator<Iter,Pred,default_pass>, - Iter, - BOOST_DEDUCED_TYPENAME std::iterator_traits<Iter>::value_type, - boost::forward_traversal_tag, - BOOST_DEDUCED_TYPENAME std::iterator_traits<Iter>::reference, - BOOST_DEDUCED_TYPENAME std::iterator_traits<Iter>::difference_type - > - , private Pred - { - private: - typedef boost::iterator_adaptor< - skip_iterator<Iter,Pred,default_pass>, - Iter, - BOOST_DEDUCED_TYPENAME std::iterator_traits<Iter>::value_type, - boost::forward_traversal_tag, - BOOST_DEDUCED_TYPENAME std::iterator_traits<Iter>::reference, - BOOST_DEDUCED_TYPENAME std::iterator_traits<Iter>::difference_type - > base_t; - - public: - typedef Pred pred_t; - typedef Iter iter_t; - - skip_iterator() : m_last() {} - - skip_iterator(iter_t it, iter_t last, const Pred& pred) - : base_t(it) - , pred_t(pred) - , m_last(last) - { - } - - template<class OtherIter> - skip_iterator( const skip_iterator<OtherIter, pred_t, default_pass>& other ) - : base_t(other.base()) - , pred_t(other) - , m_last(other.m_last) - { - } - - void increment() - { - iter_t& it = this->base_reference(); - BOOST_ASSERT( it != m_last ); - pred_t& bi_pred = *this; - iter_t prev = it; - ++it; - if (it != m_last) - { - if (default_pass) - { - while (it != m_last && !bi_pred(*prev, *it)) - { - ++it; - ++prev; - } - } - else - { - for (; it != m_last; ++it, ++prev) - { - if (bi_pred(*prev, *it)) - { - break; - } - } - } - } - } - - iter_t m_last; - }; - - template< class P, class R, bool default_pass > - struct adjacent_filtered_range - : iterator_range< skip_iterator< - BOOST_DEDUCED_TYPENAME range_iterator<R>::type, - P, - default_pass - > - > - { - private: - typedef skip_iterator< - BOOST_DEDUCED_TYPENAME range_iterator<R>::type, - P, - default_pass - > - skip_iter; - - typedef iterator_range<skip_iter> - base_range; - - typedef BOOST_DEDUCED_TYPENAME range_iterator<R>::type raw_iterator; - - public: - adjacent_filtered_range( const P& p, R& r ) - : base_range(skip_iter(boost::begin(r), boost::end(r), p), - skip_iter(boost::end(r), boost::end(r), p)) - { - } - }; - - template< class T > - struct adjacent_holder : holder<T> - { - adjacent_holder( T r ) : holder<T>(r) - { } - }; - - template< class T > - struct adjacent_excl_holder : holder<T> - { - adjacent_excl_holder( T r ) : holder<T>(r) - { } - }; - - template< class ForwardRng, class BinPredicate > - inline adjacent_filtered_range<BinPredicate, ForwardRng, true> - operator|( ForwardRng& r, - const adjacent_holder<BinPredicate>& f ) - { - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRng>)); - - return adjacent_filtered_range<BinPredicate, ForwardRng, true>( f.val, r ); - } - - template< class ForwardRng, class BinPredicate > - inline adjacent_filtered_range<BinPredicate, const ForwardRng, true> - operator|( const ForwardRng& r, - const adjacent_holder<BinPredicate>& f ) - { - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<const ForwardRng>)); - - return adjacent_filtered_range<BinPredicate, - const ForwardRng, true>( f.val, r ); - } - - template< class ForwardRng, class BinPredicate > - inline adjacent_filtered_range<BinPredicate, ForwardRng, false> - operator|( ForwardRng& r, - const adjacent_excl_holder<BinPredicate>& f ) - { - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRng>)); - return adjacent_filtered_range<BinPredicate, ForwardRng, false>( f.val, r ); - } - - template< class ForwardRng, class BinPredicate > - inline adjacent_filtered_range<BinPredicate, ForwardRng, false> - operator|( const ForwardRng& r, - const adjacent_excl_holder<BinPredicate>& f ) - { - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<const ForwardRng>)); - return adjacent_filtered_range<BinPredicate, - const ForwardRng, false>( f.val, r ); - } - - } // 'range_detail' - - // Bring adjacent_filter_range into the boost namespace so that users of - // this library may specify the return type of the '|' operator and - // adjacent_filter() - using range_detail::adjacent_filtered_range; - - namespace adaptors - { - namespace - { - const range_detail::forwarder<range_detail::adjacent_holder> - adjacent_filtered = - range_detail::forwarder<range_detail::adjacent_holder>(); - - const range_detail::forwarder<range_detail::adjacent_excl_holder> - adjacent_filtered_excl = - range_detail::forwarder<range_detail::adjacent_excl_holder>(); - } - - template<class ForwardRng, class BinPredicate> - inline adjacent_filtered_range<BinPredicate, ForwardRng, true> - adjacent_filter(ForwardRng& rng, BinPredicate filter_pred) - { - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRng>)); - return adjacent_filtered_range<BinPredicate, ForwardRng, true>(filter_pred, rng); - } - - template<class ForwardRng, class BinPredicate> - inline adjacent_filtered_range<BinPredicate, const ForwardRng, true> - adjacent_filter(const ForwardRng& rng, BinPredicate filter_pred) - { - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<const ForwardRng>)); - return adjacent_filtered_range<BinPredicate, const ForwardRng, true>(filter_pred, rng); - } - - } // 'adaptors' - -} - -#ifdef BOOST_MSVC -#pragma warning( pop ) -#endif - -#endif diff --git a/contrib/restricted/boost/boost/range/adaptor/copied.hpp b/contrib/restricted/boost/boost/range/adaptor/copied.hpp deleted file mode 100644 index f7dfbcd846..0000000000 --- a/contrib/restricted/boost/boost/range/adaptor/copied.hpp +++ /dev/null @@ -1,68 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen, Neil Groves 2006. 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_ADAPTOR_COPIED_HPP -#define BOOST_RANGE_ADAPTOR_COPIED_HPP - -#include <boost/range/adaptor/argument_fwd.hpp> -#include <boost/range/adaptor/sliced.hpp> -#include <boost/range/size_type.hpp> -#include <boost/range/iterator_range.hpp> -#include <boost/range/concepts.hpp> - -namespace boost -{ - namespace adaptors - { - struct copied - { - copied(std::size_t t_, std::size_t u_) - : t(t_), u(u_) {} - - std::size_t t; - std::size_t u; - }; - - template<class CopyableRandomAccessRange> - inline CopyableRandomAccessRange - operator|(const CopyableRandomAccessRange& r, const copied& f) - { - BOOST_RANGE_CONCEPT_ASSERT(( - RandomAccessRangeConcept<const CopyableRandomAccessRange>)); - - iterator_range< - BOOST_DEDUCED_TYPENAME range_iterator< - const CopyableRandomAccessRange - >::type - > temp(adaptors::slice(r, f.t, f.u)); - - return CopyableRandomAccessRange(temp.begin(), temp.end()); - } - - template<class CopyableRandomAccessRange> - inline CopyableRandomAccessRange - copy(const CopyableRandomAccessRange& rng, std::size_t t, std::size_t u) - { - BOOST_RANGE_CONCEPT_ASSERT(( - RandomAccessRangeConcept<const CopyableRandomAccessRange>)); - - iterator_range< - BOOST_DEDUCED_TYPENAME range_iterator< - const CopyableRandomAccessRange - >::type - > temp(adaptors::slice(rng, t, u)); - - return CopyableRandomAccessRange( temp.begin(), temp.end() ); - } - } // 'adaptors' - -} - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/adaptor/define_adaptor.hpp b/contrib/restricted/boost/boost/range/adaptor/define_adaptor.hpp deleted file mode 100644 index b228df3831..0000000000 --- a/contrib/restricted/boost/boost/range/adaptor/define_adaptor.hpp +++ /dev/null @@ -1,109 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 2010. 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_DEFINE_ADAPTOR_HPP_INCLUDED -#define BOOST_RANGE_DEFINE_ADAPTOR_HPP_INCLUDED - -#include <boost/tuple/tuple.hpp> - -#define BOOST_DEFINE_RANGE_ADAPTOR( adaptor_name, range_adaptor ) \ - struct adaptor_name##_forwarder {}; \ - \ - template<typename Range> range_adaptor <Range> \ - operator|(Range& rng, adaptor_name##_forwarder) \ - { \ - return range_adaptor <Range>( rng ); \ - } \ - \ - template<typename Range> range_adaptor <const Range> \ - operator|(const Range& rng, adaptor_name##_forwarder) \ - { \ - return range_adaptor <const Range>( rng ); \ - } \ - \ - static adaptor_name##_forwarder adaptor_name = adaptor_name##_forwarder(); \ - \ - template<typename Range> \ - range_adaptor <Range> \ - make_##adaptor_name(Range& rng) \ - { \ - return range_adaptor <Range>(rng); \ - } \ - \ - template<typename Range> \ - range_adaptor <const Range> \ - make_##adaptor_name(const Range& rng) \ - { \ - return range_adaptor <const Range>(rng); \ - } - -#define BOOST_DEFINE_RANGE_ADAPTOR_1( adaptor_name, range_adaptor, arg1_type ) \ - struct adaptor_name \ - { \ - explicit adaptor_name (arg1_type arg1_) \ - : arg1(arg1_) {} \ - arg1_type arg1; \ - }; \ - \ - template<typename Range> range_adaptor <Range> \ - operator|(Range& rng, adaptor_name args) \ - { \ - return range_adaptor <Range>(rng, args.arg1); \ - } \ - \ - template<typename Range> range_adaptor <const Range> \ - operator|(const Range& rng, adaptor_name args) \ - { \ - return range_adaptor <const Range>(rng, args.arg1); \ - } \ - \ - template<typename Range> \ - range_adaptor <Range> \ - make_##adaptor_name(Range& rng, arg1_type arg1) \ - { \ - return range_adaptor <Range>(rng, arg1); \ - } \ - \ - template<typename Range> \ - range_adaptor <const Range> \ - make_##adaptor_name(const Range& rng, arg1_type arg1) \ - { \ - return range_adaptor <const Range>(rng, arg1); \ - } - -#define BOOST_RANGE_ADAPTOR_2( adaptor_name, range_adaptor, arg1_type, arg2_type ) \ - struct adaptor_name \ - { \ - explicit adaptor_name (arg1_type arg1_, arg2_type arg2_) \ - : arg1(arg1_), arg2(arg2_) {} \ - arg1_type arg1; \ - arg2_type arg2; \ - }; \ - \ - template<typename Range> range_adaptor <Range> \ - operator|(Range& rng, adaptor_name args) \ - { \ - return range_adaptor <Range>(rng, args.arg1, args.arg2); \ - } \ - template<typename Range> \ - range_adaptor <Range> \ - make_##adaptor_name(Range& rng, arg1_type arg1, arg2_type arg2) \ - { \ - return range_adaptor <Range>(rng, arg1, arg2); \ - } \ - template<typename Range> \ - range_adaptor <const Range> \ - make_##adaptor_name(const Range& rng, arg1_type arg1, arg2_type arg2) \ - { \ - return range_adaptor <const Range>(rng, arg1, arg2); \ - } - - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/adaptor/filtered.hpp b/contrib/restricted/boost/boost/range/adaptor/filtered.hpp deleted file mode 100644 index 1fb778e58d..0000000000 --- a/contrib/restricted/boost/boost/range/adaptor/filtered.hpp +++ /dev/null @@ -1,121 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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_ADAPTOR_FILTERED_HPP -#define BOOST_RANGE_ADAPTOR_FILTERED_HPP - -#include <boost/range/adaptor/argument_fwd.hpp> -#include <boost/range/detail/default_constructible_unary_fn.hpp> -#include <boost/range/iterator_range.hpp> -#include <boost/range/concepts.hpp> -#include <boost/iterator/filter_iterator.hpp> - -namespace boost -{ - namespace range_detail - { - template< class P, class R > - struct filtered_range : - boost::iterator_range< - boost::filter_iterator< - typename default_constructible_unary_fn_gen<P, bool>::type, - typename range_iterator<R>::type - > - > - { - private: - typedef boost::iterator_range< - boost::filter_iterator< - typename default_constructible_unary_fn_gen<P, bool>::type, - typename range_iterator<R>::type - > - > base; - public: - typedef typename default_constructible_unary_fn_gen<P, bool>::type - pred_t; - - filtered_range(P p, R& r) - : base(make_filter_iterator(pred_t(p), - boost::begin(r), boost::end(r)), - make_filter_iterator(pred_t(p), - boost::end(r), boost::end(r))) - { } - }; - - template< class T > - struct filter_holder : holder<T> - { - filter_holder( T r ) : holder<T>(r) - { } - }; - - template< class SinglePassRange, class Predicate > - inline filtered_range<Predicate, SinglePassRange> - operator|(SinglePassRange& r, - const filter_holder<Predicate>& f) - { - BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange>)); - return filtered_range<Predicate, SinglePassRange>( f.val, r ); - } - - template< class SinglePassRange, class Predicate > - inline filtered_range<Predicate, const SinglePassRange> - operator|(const SinglePassRange& r, - const filter_holder<Predicate>& f ) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange>)); - return filtered_range<Predicate, const SinglePassRange>( f.val, r ); - } - - } // 'range_detail' - - // Unusual use of 'using' is intended to bring filter_range into the boost namespace - // while leaving the mechanics of the '|' operator in range_detail and maintain - // argument dependent lookup. - // filter_range logically needs to be in the boost namespace to allow user of - // the library to define the return type for filter() - using range_detail::filtered_range; - - namespace adaptors - { - namespace - { - const range_detail::forwarder<range_detail::filter_holder> - filtered = - range_detail::forwarder<range_detail::filter_holder>(); - } - - template<class SinglePassRange, class Predicate> - inline filtered_range<Predicate, SinglePassRange> - filter(SinglePassRange& rng, Predicate filter_pred) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<SinglePassRange>)); - - return range_detail::filtered_range< - Predicate, SinglePassRange>( filter_pred, rng ); - } - - template<class SinglePassRange, class Predicate> - inline filtered_range<Predicate, const SinglePassRange> - filter(const SinglePassRange& rng, Predicate filter_pred) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange>)); - - return range_detail::filtered_range< - Predicate, const SinglePassRange>( filter_pred, rng ); - } - } // 'adaptors' - -} - -#endif diff --git a/contrib/restricted/boost/boost/range/adaptor/formatted.hpp b/contrib/restricted/boost/boost/range/adaptor/formatted.hpp deleted file mode 100644 index f31f1bceb2..0000000000 --- a/contrib/restricted/boost/boost/range/adaptor/formatted.hpp +++ /dev/null @@ -1,229 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 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_ADAPTOR_FORMATTED_HPP_INCLUDED -#define BOOST_RANGE_ADAPTOR_FORMATTED_HPP_INCLUDED - -#include <boost/config.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/iterator.hpp> -#include <boost/range/iterator_range_core.hpp> -#include <boost/mpl/if.hpp> -#include <boost/type_traits/is_array.hpp> -#include <boost/type_traits/remove_extent.hpp> -#include <ostream> - -namespace boost -{ - namespace range_detail - { - -template<typename Sep, typename Prefix, typename Postfix> -struct formatted_holder -{ - typedef typename boost::mpl::if_< - boost::is_array<Sep>, - const typename boost::remove_extent<Sep>::type*, - Sep - >::type separator_t; - - typedef typename boost::mpl::if_< - boost::is_array<Prefix>, - const typename boost::remove_extent<Prefix>::type*, - Prefix - >::type prefix_t; - - typedef typename boost::mpl::if_< - boost::is_array<Postfix>, - const typename boost::remove_extent<Postfix>::type*, - Postfix - >::type postfix_t; - - formatted_holder( - const separator_t& sep, - const prefix_t& prefix, - const postfix_t& postfix) - : m_sep(sep) - , m_prefix(prefix) - , m_postfix(postfix) - { - } - - separator_t m_sep; - prefix_t m_prefix; - postfix_t m_postfix; -}; - -template<typename Iter, typename Sep, typename Prefix, typename Postfix> -class formatted_range - : public boost::iterator_range<Iter> -{ - typedef formatted_holder<Sep,Prefix,Postfix> holder_t; -public: - formatted_range(Iter first, Iter last, const holder_t& holder) - : boost::iterator_range<Iter>(first, last) - , m_holder(holder) - { - } - - template<typename OStream> - void write(OStream& out) const - { - Iter it(this->begin()); - out << m_holder.m_prefix; - if (it != this->end()) - { - out << *it; - for (++it; it != this->end(); ++it) - { - out << m_holder.m_sep << *it; - } - } - out << m_holder.m_postfix; - } - -private: - holder_t m_holder; -}; - -template< - typename SinglePassRange, - typename Sep, - typename Prefix, - typename Postfix -> -inline range_detail::formatted_range< - typename range_iterator<const SinglePassRange>::type, Sep, Prefix, Postfix -> -operator|( - const SinglePassRange& rng, - const range_detail::formatted_holder<Sep,Prefix,Postfix>& holder -) -{ - typedef typename range_iterator<const SinglePassRange>::type iterator; - return range_detail::formatted_range<iterator, Sep, Prefix, Postfix>( - boost::begin(rng), boost::end(rng), holder); -} - -template<typename Char, typename Traits, typename Iter, typename Sep, - typename Prefix, typename Postfix> -std::basic_ostream<Char, Traits>& -operator<<( - std::basic_ostream<Char, Traits>& out, - const formatted_range<Iter, Sep, Prefix, Postfix>& writer) -{ - writer.write(out); - return out; -} - - } // namespace range_detail - - namespace adaptors - { - -template<typename Sep, typename Prefix, typename Postfix> -range_detail::formatted_holder<Sep, Prefix, Postfix> -formatted(const Sep& sep, const Prefix& prefix, const Postfix& postfix) -{ - return range_detail::formatted_holder<Sep,Prefix,Postfix>( - sep, prefix, postfix); -} - -template<typename Sep, typename Prefix> -range_detail::formatted_holder<Sep, Prefix, char> -formatted(const Sep& sep, const Prefix& prefix) -{ - return range_detail::formatted_holder<Sep, Prefix, char>(sep, prefix, '}'); -} - -template<typename Sep> -range_detail::formatted_holder<Sep, char, char> -formatted(const Sep& sep) -{ - return range_detail::formatted_holder<Sep, char, char>(sep, '{', '}'); -} - -inline range_detail::formatted_holder<char, char, char> -formatted() -{ - return range_detail::formatted_holder<char, char, char>(',', '{', '}'); -} - -using range_detail::formatted_range; - -template<typename SinglePassRange, typename Sep, typename Prefix, - typename Postfix> -inline boost::range_detail::formatted_range< - typename boost::range_iterator<const SinglePassRange>::type, - Sep, Prefix, Postfix -> -format( - const SinglePassRange& rng, - const Sep& sep, - const Prefix& prefix, - const Postfix& postfix -) -{ - typedef typename boost::range_iterator<const SinglePassRange>::type - iterator_t; - - typedef boost::range_detail::formatted_range< - iterator_t, Sep, Prefix, Postfix> result_t; - - typedef boost::range_detail::formatted_holder<Sep, Prefix, Postfix> - holder_t; - - return result_t(boost::begin(rng), boost::end(rng), - holder_t(sep, prefix, postfix)); -} - -template<typename SinglePassRange, typename Sep, typename Prefix> -inline boost::range_detail::formatted_range< - typename boost::range_iterator<const SinglePassRange>::type, - Sep, Prefix, char -> -format( - const SinglePassRange& rng, - const Sep& sep, - const Prefix& prefix) -{ - return adaptors::format<SinglePassRange, Sep, Prefix, char>(rng, sep, prefix, '}'); -} - -template<typename SinglePassRange, typename Sep> -inline boost::range_detail::formatted_range< - typename boost::range_iterator<const SinglePassRange>::type, - Sep, char, char -> -format(const SinglePassRange& rng, const Sep& sep) -{ - return adaptors::format<SinglePassRange, Sep, char, char>(rng, sep, '{', '}'); -} - -template<typename SinglePassRange> -inline boost::range_detail::formatted_range< - typename boost::range_iterator<const SinglePassRange>::type, - char, char, char -> -format(const SinglePassRange& rng) -{ - return adaptors::format<SinglePassRange, char, char, char>(rng, ',', '{', '}'); -} - - } // namespace adaptors - - namespace range - { - using boost::range_detail::formatted_range; - } // namespace range -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/adaptor/indexed.hpp b/contrib/restricted/boost/boost/range/adaptor/indexed.hpp deleted file mode 100644 index a426bd6b66..0000000000 --- a/contrib/restricted/boost/boost/range/adaptor/indexed.hpp +++ /dev/null @@ -1,370 +0,0 @@ -// Copyright 2014 Neil Groves -// -// Copyright (c) 2010 Ilya Murav'jov -// -// 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) -// -// Credits: -// My (Neil's) first indexed adaptor was hindered by having the underlying -// iterator return the same reference as the wrapped iterator. This meant that -// to obtain the index one had to get to the index_iterator and call the -// index() function on it. Ilya politely pointed out that this was useless in -// a number of scenarios since one naturally hides the use of iterators in -// good range-based code. Ilya provided a new interface (which has remained) -// and a first implementation. Much of this original implementation has -// been simplified and now supports more compilers and platforms. -// -#ifndef BOOST_RANGE_ADAPTOR_INDEXED_HPP_INCLUDED -#define BOOST_RANGE_ADAPTOR_INDEXED_HPP_INCLUDED - -#include <boost/range/config.hpp> -#include <boost/range/adaptor/argument_fwd.hpp> -#include <boost/range/iterator_range.hpp> -#include <boost/range/traversal.hpp> -#include <boost/range/size.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/mpl/if.hpp> -#include <boost/type_traits/is_convertible.hpp> - -#include <boost/iterator/iterator_traits.hpp> -#include <boost/iterator/iterator_facade.hpp> - -#include <boost/tuple/tuple.hpp> - -namespace boost -{ - namespace adaptors - { - -struct indexed -{ - explicit indexed(std::ptrdiff_t x = 0) - : val(x) - { - } - std::ptrdiff_t val; -}; - - } // namespace adaptors - - namespace range - { - -// Why yet another "pair" class: -// - std::pair can't store references -// - no need for typing for index type (default to "std::ptrdiff_t"); this is -// useful in BOOST_FOREACH() expressions that have pitfalls with commas -// ( see http://www.boost.org/doc/libs/1_44_0/doc/html/foreach/pitfalls.html ) -// - meaningful access functions index(), value() -template<class T, class Indexable = std::ptrdiff_t> -class index_value - : public tuple<Indexable, T> -{ - typedef tuple<Indexable, T> base_t; - - template<int N> - struct iv_types - { - typedef typename tuples::element<N, base_t>::type n_type; - - typedef typename tuples::access_traits<n_type>::non_const_type non_const_type; - typedef typename tuples::access_traits<n_type>::const_type const_type; - }; - -public: - typedef typename iv_types<0>::non_const_type index_type; - typedef typename iv_types<0>::const_type const_index_type; - typedef typename iv_types<1>::non_const_type value_type; - typedef typename iv_types<1>::const_type const_value_type; - - index_value() - { - } - - index_value(typename tuples::access_traits<Indexable>::parameter_type t0, - typename tuples::access_traits<T>::parameter_type t1) - : base_t(t0, t1) - { - } - - // member functions index(), value() (non-const and const) - index_type index() - { - return boost::tuples::get<0>(*this); - } - - const_index_type index() const - { - return boost::tuples::get<0>(*this); - } - - value_type value() - { - return boost::tuples::get<1>(*this); - } - - const_value_type value() const - { - return boost::tuples::get<1>(*this); - } -}; - - } // namespace range - -namespace range_detail -{ - -template<typename Iter> -struct indexed_iterator_value_type -{ - typedef ::boost::range::index_value< - typename iterator_reference<Iter>::type, - typename iterator_difference<Iter>::type - > type; -}; - -// Meta-function to get the traversal for the range and therefore iterator -// returned by the indexed adaptor for a specified iterator type. -// -// Random access -> Random access -// Bidirectional -> Forward -// Forward -> Forward -// SinglePass -> SinglePass -// -// The rationale for demoting a Bidirectional input to Forward is that the end -// iterator cannot cheaply have an index computed for it. Therefore I chose to -// demote to forward traversal. I can maintain the ability to traverse randomly -// when the input is Random Access since the index for the end iterator is cheap -// to compute. -template<typename Iter> -struct indexed_traversal -{ -private: - typedef typename iterator_traversal<Iter>::type wrapped_traversal; - -public: - - typedef typename mpl::if_< - is_convertible<wrapped_traversal, random_access_traversal_tag>, - random_access_traversal_tag, - typename mpl::if_< - is_convertible<wrapped_traversal, bidirectional_traversal_tag>, - forward_traversal_tag, - wrapped_traversal - >::type - >::type type; -}; - -template<typename Iter> -class indexed_iterator - : public iterator_facade< - indexed_iterator<Iter>, - typename indexed_iterator_value_type<Iter>::type, - typename indexed_traversal<Iter>::type, - typename indexed_iterator_value_type<Iter>::type, - typename iterator_difference<Iter>::type - > -{ -public: - typedef Iter wrapped; - -private: - typedef iterator_facade< - indexed_iterator<wrapped>, - typename indexed_iterator_value_type<wrapped>::type, - typename indexed_traversal<wrapped>::type, - typename indexed_iterator_value_type<wrapped>::type, - typename iterator_difference<wrapped>::type - > base_t; - -public: - typedef typename base_t::difference_type difference_type; - typedef typename base_t::reference reference; - typedef typename base_t::difference_type index_type; - - indexed_iterator() - : m_it() - , m_index() - { - } - - template<typename OtherWrapped> - indexed_iterator( - const indexed_iterator<OtherWrapped>& other, - typename enable_if<is_convertible<OtherWrapped, wrapped> >::type* = 0 - ) - : m_it(other.get()) - , m_index(other.get_index()) - { - } - - explicit indexed_iterator(wrapped it, index_type index) - : m_it(it) - , m_index(index) - { - } - - wrapped get() const - { - return m_it; - } - - index_type get_index() const - { - return m_index; - } - - private: - friend class boost::iterator_core_access; - - reference dereference() const - { - return reference(m_index, *m_it); - } - - bool equal(const indexed_iterator& other) const - { - return m_it == other.m_it; - } - - void increment() - { - ++m_index; - ++m_it; - } - - void decrement() - { - BOOST_ASSERT_MSG(m_index > 0, "indexed Iterator out of bounds"); - --m_index; - --m_it; - } - - void advance(index_type n) - { - m_index += n; - BOOST_ASSERT_MSG(m_index >= 0, "indexed Iterator out of bounds"); - m_it += n; - } - - difference_type distance_to(const indexed_iterator& other) const - { - return other.m_it - m_it; - } - - wrapped m_it; - index_type m_index; -}; - -template<typename SinglePassRange> -struct indexed_range - : iterator_range< - indexed_iterator< - typename range_iterator<SinglePassRange>::type - > - > -{ - typedef iterator_range< - indexed_iterator< - typename range_iterator<SinglePassRange>::type - > - > base_t; - - BOOST_RANGE_CONCEPT_ASSERT(( - boost::SinglePassRangeConcept<SinglePassRange>)); -public: - typedef indexed_iterator< - typename range_iterator<SinglePassRange>::type - > iterator; - - // Constructor for non-random access iterators. - // This sets the end iterator index to i despite this being incorrect it - // is never observable since bidirectional iterators are demoted to - // forward iterators. - indexed_range( - typename base_t::difference_type i, - SinglePassRange& r, - single_pass_traversal_tag - ) - : base_t(iterator(boost::begin(r), i), - iterator(boost::end(r), i)) - { - } - - indexed_range( - typename base_t::difference_type i, - SinglePassRange& r, - random_access_traversal_tag - ) - : base_t(iterator(boost::begin(r), i), - iterator(boost::end(r), i + boost::size(r))) - { - } -}; - - } // namespace range_detail - - using range_detail::indexed_range; - - namespace adaptors - { - -template<class SinglePassRange> -inline indexed_range<SinglePassRange> -operator|(SinglePassRange& r, indexed e) -{ - BOOST_RANGE_CONCEPT_ASSERT(( - boost::SinglePassRangeConcept<SinglePassRange> - )); - return indexed_range<SinglePassRange>( - e.val, r, - typename range_traversal<SinglePassRange>::type()); -} - -template<class SinglePassRange> -inline indexed_range<const SinglePassRange> -operator|(const SinglePassRange& r, indexed e) -{ - BOOST_RANGE_CONCEPT_ASSERT(( - boost::SinglePassRangeConcept<const SinglePassRange> - )); - return indexed_range<const SinglePassRange>( - e.val, r, - typename range_traversal<const SinglePassRange>::type()); -} - -template<class SinglePassRange> -inline indexed_range<SinglePassRange> -index( - SinglePassRange& rng, - typename range_difference<SinglePassRange>::type index_value = 0) -{ - BOOST_RANGE_CONCEPT_ASSERT(( - boost::SinglePassRangeConcept<SinglePassRange> - )); - return indexed_range<SinglePassRange>( - index_value, rng, - typename range_traversal<SinglePassRange>::type()); -} - -template<class SinglePassRange> -inline indexed_range<const SinglePassRange> -index( - const SinglePassRange& rng, - typename range_difference<const SinglePassRange>::type index_value = 0) -{ - BOOST_RANGE_CONCEPT_ASSERT(( - boost::SinglePassRangeConcept<SinglePassRange> - )); - return indexed_range<const SinglePassRange>( - index_value, rng, - typename range_traversal<const SinglePassRange>::type()); -} - - } // namespace adaptors -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/adaptor/indirected.hpp b/contrib/restricted/boost/boost/range/adaptor/indirected.hpp deleted file mode 100644 index e741f17f5e..0000000000 --- a/contrib/restricted/boost/boost/range/adaptor/indirected.hpp +++ /dev/null @@ -1,100 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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_ADAPTOR_INDIRECTED_HPP -#define BOOST_RANGE_ADAPTOR_INDIRECTED_HPP - -#include <boost/range/iterator_range.hpp> -#include <boost/range/concepts.hpp> -#include <boost/iterator/indirect_iterator.hpp> - -namespace boost -{ - namespace range_detail - { - template< class R > - struct indirected_range : - public boost::iterator_range< - boost::indirect_iterator< - BOOST_DEDUCED_TYPENAME range_iterator<R>::type - > - > - { - private: - typedef boost::iterator_range< - boost::indirect_iterator< - BOOST_DEDUCED_TYPENAME range_iterator<R>::type - > - > - base; - - public: - explicit indirected_range( R& r ) - : base( r ) - { } - }; - - struct indirect_forwarder {}; - - template< class SinglePassRange > - inline indirected_range<SinglePassRange> - operator|( SinglePassRange& r, indirect_forwarder ) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<SinglePassRange>)); - - return indirected_range<SinglePassRange>( r ); - } - - template< class SinglePassRange > - inline indirected_range<const SinglePassRange> - operator|( const SinglePassRange& r, indirect_forwarder ) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange>)); - - return indirected_range<const SinglePassRange>( r ); - } - - } // 'range_detail' - - using range_detail::indirected_range; - - namespace adaptors - { - namespace - { - const range_detail::indirect_forwarder indirected = - range_detail::indirect_forwarder(); - } - - template<class SinglePassRange> - inline indirected_range<SinglePassRange> - indirect(SinglePassRange& rng) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<SinglePassRange>)); - return indirected_range<SinglePassRange>(rng); - } - - template<class SinglePassRange> - inline indirected_range<const SinglePassRange> - indirect(const SinglePassRange& rng) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange>)); - - return indirected_range<const SinglePassRange>(rng); - } - } // 'adaptors' - -} - -#endif diff --git a/contrib/restricted/boost/boost/range/adaptor/replaced.hpp b/contrib/restricted/boost/boost/range/adaptor/replaced.hpp deleted file mode 100644 index 1950b82946..0000000000 --- a/contrib/restricted/boost/boost/range/adaptor/replaced.hpp +++ /dev/null @@ -1,169 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 2007. 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_ADAPTOR_REPLACED_IMPL_HPP_INCLUDED -#define BOOST_RANGE_ADAPTOR_REPLACED_IMPL_HPP_INCLUDED - -#include <boost/config.hpp> -#include <boost/range/adaptor/argument_fwd.hpp> -#include <boost/range/iterator_range.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/value_type.hpp> -#include <boost/range/concepts.hpp> -#include <boost/iterator/iterator_adaptor.hpp> -#include <boost/iterator/transform_iterator.hpp> -#include <boost/optional/optional.hpp> - -namespace boost -{ - namespace range_detail - { - template< class Value > - class replace_value - { - public: - typedef const Value& result_type; - typedef const Value& first_argument_type; - - // Rationale: - // The default constructor is required to allow the transform - // iterator to properly model the iterator concept. - replace_value() - { - } - - replace_value(const Value& from, const Value& to) - : m_impl(data(from, to)) - { - } - - const Value& operator()(const Value& x) const - { - return (x == m_impl->m_from) ? m_impl->m_to : x; - } - - private: - struct data - { - data(const Value& from, const Value& to) - : m_from(from) - , m_to(to) - { - } - - Value m_from; - Value m_to; - }; - boost::optional<data> m_impl; - }; - - template< class R > - class replaced_range : - public boost::iterator_range< - boost::transform_iterator< - replace_value< BOOST_DEDUCED_TYPENAME range_value<R>::type >, - BOOST_DEDUCED_TYPENAME range_iterator<R>::type > > - { - private: - typedef replace_value< BOOST_DEDUCED_TYPENAME range_value<R>::type > Fn; - - typedef boost::iterator_range< - boost::transform_iterator< - replace_value< BOOST_DEDUCED_TYPENAME range_value<R>::type >, - BOOST_DEDUCED_TYPENAME range_iterator<R>::type > > base_t; - - public: - typedef BOOST_DEDUCED_TYPENAME range_value<R>::type value_type; - - replaced_range( R& r, value_type from, value_type to ) - : base_t( make_transform_iterator( boost::begin(r), Fn(from, to) ), - make_transform_iterator( boost::end(r), Fn(from, to) ) ) - { } - }; - - template< class T > - class replace_holder : public holder2<T> - { - public: - replace_holder( const T& from, const T& to ) - : holder2<T>(from, to) - { } - private: - // not assignable - void operator=(const replace_holder&); - }; - - template< class SinglePassRange > - inline replaced_range<SinglePassRange> - operator|( - SinglePassRange& r, - const replace_holder< - BOOST_DEDUCED_TYPENAME range_value<SinglePassRange>::type>& f ) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<SinglePassRange>)); - - return replaced_range<SinglePassRange>(r, f.val1, f.val2); - } - - template< class SinglePassRange > - inline replaced_range<const SinglePassRange> - operator|( - const SinglePassRange& r, - const replace_holder< - BOOST_DEDUCED_TYPENAME range_value<SinglePassRange>::type>& f) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange>)); - - return replaced_range<const SinglePassRange>(r, f.val1, f.val2); - } - } // 'range_detail' - - using range_detail::replaced_range; - - namespace adaptors - { - namespace - { - const range_detail::forwarder2<range_detail::replace_holder> - replaced = - range_detail::forwarder2<range_detail::replace_holder>(); - } - - template<class SinglePassRange> - inline replaced_range<SinglePassRange> - replace(SinglePassRange& rng, - BOOST_DEDUCED_TYPENAME range_value<SinglePassRange>::type from, - BOOST_DEDUCED_TYPENAME range_value<SinglePassRange>::type to) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<SinglePassRange>)); - - return replaced_range<SinglePassRange>(rng, from, to); - } - - template<class SinglePassRange> - inline replaced_range<const SinglePassRange> - replace(const SinglePassRange& rng, - BOOST_DEDUCED_TYPENAME range_value<SinglePassRange>::type from, - BOOST_DEDUCED_TYPENAME range_value<SinglePassRange>::type to) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange>)); - - return replaced_range<const SinglePassRange>(rng, from ,to); - } - - } // 'adaptors' -} // 'boost' - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/adaptor/replaced_if.hpp b/contrib/restricted/boost/boost/range/adaptor/replaced_if.hpp deleted file mode 100644 index e425e7d842..0000000000 --- a/contrib/restricted/boost/boost/range/adaptor/replaced_if.hpp +++ /dev/null @@ -1,177 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 2007. 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_ADAPTOR_REPLACED_IF_IMPL_HPP_INCLUDED -#define BOOST_RANGE_ADAPTOR_REPLACED_IF_IMPL_HPP_INCLUDED - -#include <boost/config.hpp> -#include <boost/range/adaptor/argument_fwd.hpp> -#include <boost/range/iterator_range.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/value_type.hpp> -#include <boost/range/concepts.hpp> -#include <boost/iterator/iterator_adaptor.hpp> -#include <boost/iterator/transform_iterator.hpp> -#include <boost/optional/optional.hpp> - -namespace boost -{ - namespace range_detail - { - template< class Pred, class Value > - class replace_value_if - { - public: - typedef const Value& result_type; - typedef const Value& first_argument_type; - - // Rationale: - // required to allow the iterator to be default constructible. - replace_value_if() - { - } - - replace_value_if(const Pred& pred, const Value& to) - : m_impl(data(pred, to)) - { - } - - const Value& operator()(const Value& x) const - { - return m_impl->m_pred(x) ? m_impl->m_to : x; - } - - private: - struct data - { - data(const Pred& p, const Value& t) - : m_pred(p), m_to(t) - { - } - - Pred m_pred; - Value m_to; - }; - boost::optional<data> m_impl; - }; - - template< class Pred, class R > - class replaced_if_range : - public boost::iterator_range< - boost::transform_iterator< - replace_value_if< Pred, BOOST_DEDUCED_TYPENAME range_value<R>::type >, - BOOST_DEDUCED_TYPENAME range_iterator<R>::type > > - { - private: - typedef replace_value_if< Pred, BOOST_DEDUCED_TYPENAME range_value<R>::type > Fn; - - typedef boost::iterator_range< - boost::transform_iterator< - replace_value_if< Pred, BOOST_DEDUCED_TYPENAME range_value<R>::type >, - BOOST_DEDUCED_TYPENAME range_iterator<R>::type > > base_t; - - public: - typedef BOOST_DEDUCED_TYPENAME range_value<R>::type value_type; - - replaced_if_range( R& r, const Pred& pred, value_type to ) - : base_t( make_transform_iterator( boost::begin(r), Fn(pred, to) ), - make_transform_iterator( boost::end(r), Fn(pred, to) ) ) - { } - }; - - template< class Pred, class T > - class replace_if_holder - { - public: - replace_if_holder( const Pred& pred, const T& to ) - : m_pred(pred), m_to(to) - { } - - const Pred& pred() const { return m_pred; } - const T& to() const { return m_to; } - - private: - Pred m_pred; - T m_to; - }; - - template< class Pred, class SinglePassRange > - inline replaced_if_range<Pred, SinglePassRange> - operator|( - SinglePassRange& r, - const replace_if_holder< - Pred, - BOOST_DEDUCED_TYPENAME range_value<SinglePassRange>::type>& f) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<SinglePassRange>)); - - return replaced_if_range<Pred, SinglePassRange>( - r, f.pred(), f.to()); - } - - template< class Pred, class SinglePassRange > - inline replaced_if_range<Pred, const SinglePassRange> - operator|( - const SinglePassRange& r, - const replace_if_holder< - Pred, - BOOST_DEDUCED_TYPENAME range_value<SinglePassRange>::type>& f) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange>)); - - return replaced_if_range<Pred, const SinglePassRange>( - r, f.pred(), f.to()); - } - } // 'range_detail' - - using range_detail::replaced_if_range; - - namespace adaptors - { - namespace - { - const range_detail::forwarder2TU<range_detail::replace_if_holder> - replaced_if = - range_detail::forwarder2TU<range_detail::replace_if_holder>(); - } - - template<class Pred, class SinglePassRange> - inline replaced_if_range<Pred, SinglePassRange> - replace_if(SinglePassRange& rng, Pred pred, - BOOST_DEDUCED_TYPENAME range_value<SinglePassRange>::type to) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<SinglePassRange>)); - - return range_detail::replaced_if_range<Pred, SinglePassRange>( - rng, pred, to); - } - - template<class Pred, class SinglePassRange> - inline replaced_if_range<Pred, const SinglePassRange> - replace_if( - const SinglePassRange& rng, - Pred pred, - BOOST_DEDUCED_TYPENAME range_value<const SinglePassRange>::type to) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange>)); - - return range_detail::replaced_if_range<Pred, const SinglePassRange>( - rng, pred, to); - } - } // 'adaptors' - -} // 'boost' - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/adaptor/sliced.hpp b/contrib/restricted/boost/boost/range/adaptor/sliced.hpp deleted file mode 100644 index f8d9612430..0000000000 --- a/contrib/restricted/boost/boost/range/adaptor/sliced.hpp +++ /dev/null @@ -1,97 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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_ADAPTOR_SLICED_HPP -#define BOOST_RANGE_ADAPTOR_SLICED_HPP - -#include <boost/range/adaptor/argument_fwd.hpp> -#include <boost/range/size_type.hpp> -#include <boost/range/iterator_range.hpp> -#include <boost/range/concepts.hpp> -#include <boost/next_prior.hpp> - -namespace boost -{ - namespace adaptors - { - struct sliced - { - sliced(std::size_t t_, std::size_t u_) - : t(t_), u(u_) {} - std::size_t t; - std::size_t u; - }; - - template< class RandomAccessRange > - class sliced_range : public boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type > - { - typedef boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type > base_t; - public: - template<typename Rng, typename T, typename U> - sliced_range(Rng& rng, T t, U u) - : base_t(boost::next(boost::begin(rng), t), - boost::next(boost::begin(rng), u)) - { - } - }; - - template< class RandomAccessRange > - inline sliced_range<RandomAccessRange> - slice( RandomAccessRange& rng, std::size_t t, std::size_t u ) - { - BOOST_RANGE_CONCEPT_ASSERT(( - RandomAccessRangeConcept<RandomAccessRange>)); - - BOOST_ASSERT( t <= u && "error in slice indices" ); - BOOST_ASSERT( static_cast<std::size_t>(boost::size(rng)) >= u && - "second slice index out of bounds" ); - - return sliced_range<RandomAccessRange>(rng, t, u); - } - - template< class RandomAccessRange > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type > - slice( const RandomAccessRange& rng, std::size_t t, std::size_t u ) - { - BOOST_RANGE_CONCEPT_ASSERT(( - RandomAccessRangeConcept<const RandomAccessRange>)); - - BOOST_ASSERT( t <= u && "error in slice indices" ); - BOOST_ASSERT( static_cast<std::size_t>(boost::size(rng)) >= u && - "second slice index out of bounds" ); - - return sliced_range<const RandomAccessRange>(rng, t, u); - } - - template< class RandomAccessRange > - inline sliced_range<RandomAccessRange> - operator|( RandomAccessRange& r, const sliced& f ) - { - BOOST_RANGE_CONCEPT_ASSERT(( - RandomAccessRangeConcept<RandomAccessRange>)); - - return sliced_range<RandomAccessRange>( r, f.t, f.u ); - } - - template< class RandomAccessRange > - inline sliced_range<const RandomAccessRange> - operator|( const RandomAccessRange& r, const sliced& f ) - { - BOOST_RANGE_CONCEPT_ASSERT(( - RandomAccessRangeConcept<const RandomAccessRange>)); - - return sliced_range<const RandomAccessRange>( r, f.t, f.u ); - } - - } // namespace adaptors - using adaptors::sliced_range; -} // namespace boost - -#endif diff --git a/contrib/restricted/boost/boost/range/adaptor/strided.hpp b/contrib/restricted/boost/boost/range/adaptor/strided.hpp deleted file mode 100644 index 560b8200c7..0000000000 --- a/contrib/restricted/boost/boost/range/adaptor/strided.hpp +++ /dev/null @@ -1,697 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 2007. 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_ADAPTOR_STRIDED_HPP_INCLUDED -#define BOOST_RANGE_ADAPTOR_STRIDED_HPP_INCLUDED - -#include <boost/range/adaptor/argument_fwd.hpp> -#include <boost/range/iterator_range.hpp> -#include <boost/iterator/iterator_facade.hpp> -#include <iterator> - -namespace boost -{ - namespace range_detail - { - // strided_iterator for wrapping a forward traversal iterator - template<class BaseIterator, class Category> - class strided_iterator - : public iterator_facade< - strided_iterator<BaseIterator, Category> - , typename iterator_value<BaseIterator>::type - , forward_traversal_tag - , typename iterator_reference<BaseIterator>::type - , typename iterator_difference<BaseIterator>::type - > - { - friend class ::boost::iterator_core_access; - - typedef iterator_facade< - strided_iterator<BaseIterator, Category> - , typename iterator_value<BaseIterator>::type - , forward_traversal_tag - , typename iterator_reference<BaseIterator>::type - , typename iterator_difference<BaseIterator>::type - > super_t; - - public: - typedef typename super_t::difference_type difference_type; - typedef typename super_t::reference reference; - typedef BaseIterator base_iterator; - typedef std::forward_iterator_tag iterator_category; - - strided_iterator() - : m_it() - , m_last() - , m_stride() - { - } - - strided_iterator(base_iterator it, - base_iterator last, - difference_type stride) - : m_it(it) - , m_last(last) - , m_stride(stride) - { - } - - template<class OtherIterator> - strided_iterator( - const strided_iterator<OtherIterator, Category>& other, - typename enable_if_convertible< - OtherIterator, - base_iterator - >::type* = 0 - ) - : m_it(other.base()) - , m_last(other.base_end()) - , m_stride(other.get_stride()) - { - } - - base_iterator base() const - { - return m_it; - } - - base_iterator base_end() const - { - return m_last; - } - - difference_type get_stride() const - { - return m_stride; - } - - private: - void increment() - { - for (difference_type i = 0; - (m_it != m_last) && (i < m_stride); ++i) - { - ++m_it; - } - } - - reference dereference() const - { - return *m_it; - } - - template<class OtherIterator> - bool equal( - const strided_iterator<OtherIterator, Category>& other, - typename enable_if_convertible< - OtherIterator, - base_iterator - >::type* = 0) const - { - return m_it == other.m_it; - } - - base_iterator m_it; - base_iterator m_last; - difference_type m_stride; - }; - - // strided_iterator for wrapping a bidirectional iterator - template<class BaseIterator> - class strided_iterator<BaseIterator, bidirectional_traversal_tag> - : public iterator_facade< - strided_iterator<BaseIterator, bidirectional_traversal_tag> - , typename iterator_value<BaseIterator>::type - , bidirectional_traversal_tag - , typename iterator_reference<BaseIterator>::type - , typename iterator_difference<BaseIterator>::type - > - { - friend class ::boost::iterator_core_access; - - typedef iterator_facade< - strided_iterator<BaseIterator, bidirectional_traversal_tag> - , typename iterator_value<BaseIterator>::type - , bidirectional_traversal_tag - , typename iterator_reference<BaseIterator>::type - , typename iterator_difference<BaseIterator>::type - > super_t; - public: - typedef typename super_t::difference_type difference_type; - typedef typename super_t::reference reference; - typedef BaseIterator base_iterator; - typedef typename boost::make_unsigned<difference_type>::type - size_type; - typedef std::bidirectional_iterator_tag iterator_category; - - strided_iterator() - : m_it() - , m_offset() - , m_index() - , m_stride() - { - } - - strided_iterator(base_iterator it, - size_type index, - difference_type stride) - : m_it(it) - , m_offset() - , m_index(index) - , m_stride(stride) - { - if (stride && ((m_index % stride) != 0)) - m_index += (stride - (m_index % stride)); - } - - template<class OtherIterator> - strided_iterator( - const strided_iterator< - OtherIterator, - bidirectional_traversal_tag - >& other, - typename enable_if_convertible< - OtherIterator, - base_iterator - >::type* = 0 - ) - : m_it(other.base()) - , m_offset(other.get_offset()) - , m_index(other.get_index()) - , m_stride(other.get_stride()) - { - } - - base_iterator base() const - { - return m_it; - } - - difference_type get_offset() const - { - return m_offset; - } - - size_type get_index() const - { - return m_index; - } - - difference_type get_stride() const - { - return m_stride; - } - - private: - void increment() - { - m_offset += m_stride; - } - - void decrement() - { - m_offset -= m_stride; - } - - reference dereference() const - { - update(); - return *m_it; - } - - void update() const - { - std::advance(m_it, m_offset); - m_index += m_offset; - m_offset = 0; - } - - template<class OtherIterator> - bool equal( - const strided_iterator< - OtherIterator, - bidirectional_traversal_tag - >& other, - typename enable_if_convertible< - OtherIterator, - base_iterator - >::type* = 0) const - { - return (m_index + m_offset) == - (other.get_index() + other.get_offset()); - } - - mutable base_iterator m_it; - mutable difference_type m_offset; - mutable size_type m_index; - difference_type m_stride; - }; - - // strided_iterator implementation for wrapping a random access iterator - template<class BaseIterator> - class strided_iterator<BaseIterator, random_access_traversal_tag> - : public iterator_facade< - strided_iterator<BaseIterator, random_access_traversal_tag> - , typename iterator_value<BaseIterator>::type - , random_access_traversal_tag - , typename iterator_reference<BaseIterator>::type - , typename iterator_difference<BaseIterator>::type - > - { - friend class ::boost::iterator_core_access; - - typedef iterator_facade< - strided_iterator<BaseIterator, random_access_traversal_tag> - , typename iterator_value<BaseIterator>::type - , random_access_traversal_tag - , typename iterator_reference<BaseIterator>::type - , typename iterator_difference<BaseIterator>::type - > super_t; - public: - typedef typename super_t::difference_type difference_type; - typedef typename super_t::reference reference; - typedef BaseIterator base_iterator; - typedef std::random_access_iterator_tag iterator_category; - - strided_iterator() - : m_it() - , m_first() - , m_index(0) - , m_stride() - { - } - - strided_iterator( - base_iterator first, - base_iterator it, - difference_type stride - ) - : m_it(it) - , m_first(first) - , m_index(stride ? (it - first) : difference_type()) - , m_stride(stride) - { - if (stride && ((m_index % stride) != 0)) - m_index += (stride - (m_index % stride)); - } - - template<class OtherIterator> - strided_iterator( - const strided_iterator< - OtherIterator, - random_access_traversal_tag - >& other, - typename enable_if_convertible< - OtherIterator, - base_iterator - >::type* = 0 - ) - : m_it(other.base()) - , m_first(other.base_begin()) - , m_index(other.get_index()) - , m_stride(other.get_stride()) - { - } - - base_iterator base_begin() const - { - return m_first; - } - - base_iterator base() const - { - return m_it; - } - - difference_type get_stride() const - { - return m_stride; - } - - difference_type get_index() const - { - return m_index; - } - - private: - void increment() - { - m_index += m_stride; - } - - void decrement() - { - m_index -= m_stride; - } - - void advance(difference_type offset) - { - m_index += (m_stride * offset); - } - - // Implementation detail: only update the actual underlying iterator - // at the point of dereference. This is done so that the increment - // and decrement can overshoot the valid sequence as is required - // by striding. Since we can do all comparisons just with the index - // simply, and all dereferences must be within the valid range. - void update() const - { - m_it = m_first + m_index; - } - - template<class OtherIterator> - difference_type distance_to( - const strided_iterator< - OtherIterator, - random_access_traversal_tag - >& other, - typename enable_if_convertible< - OtherIterator, base_iterator>::type* = 0) const - { - BOOST_ASSERT((other.m_index - m_index) % m_stride == difference_type()); - return (other.m_index - m_index) / m_stride; - } - - template<class OtherIterator> - bool equal( - const strided_iterator< - OtherIterator, - random_access_traversal_tag - >& other, - typename enable_if_convertible< - OtherIterator, base_iterator>::type* = 0) const - { - return m_index == other.m_index; - } - - reference dereference() const - { - update(); - return *m_it; - } - - private: - mutable base_iterator m_it; - base_iterator m_first; - difference_type m_index; - difference_type m_stride; - }; - - template<class Rng, class Difference> inline - strided_iterator< - typename range_iterator<Rng>::type, - forward_traversal_tag - > - make_begin_strided_iterator( - Rng& rng, - Difference stride, - forward_traversal_tag) - { - return strided_iterator< - typename range_iterator<Rng>::type, - forward_traversal_tag - >(boost::begin(rng), boost::end(rng), stride); - } - - template<class Rng, class Difference> inline - strided_iterator< - typename range_iterator<const Rng>::type, - forward_traversal_tag - > - make_begin_strided_iterator( - const Rng& rng, - Difference stride, - forward_traversal_tag) - { - return strided_iterator< - typename range_iterator<const Rng>::type, - forward_traversal_tag - >(boost::begin(rng), boost::end(rng), stride); - } - - template<class Rng, class Difference> inline - strided_iterator< - typename range_iterator<Rng>::type, - forward_traversal_tag - > - make_end_strided_iterator( - Rng& rng, - Difference stride, - forward_traversal_tag) - { - return strided_iterator< - typename range_iterator<Rng>::type, - forward_traversal_tag - >(boost::end(rng), boost::end(rng), stride); - } - - template<class Rng, class Difference> inline - strided_iterator< - typename range_iterator<const Rng>::type, - forward_traversal_tag - > - make_end_strided_iterator( - const Rng& rng, - Difference stride, - forward_traversal_tag) - { - return strided_iterator< - typename range_iterator<const Rng>::type, - forward_traversal_tag - >(boost::end(rng), boost::end(rng), stride); - } - - template<class Rng, class Difference> inline - strided_iterator< - typename range_iterator<Rng>::type, - bidirectional_traversal_tag - > - make_begin_strided_iterator( - Rng& rng, - Difference stride, - bidirectional_traversal_tag) - { - typedef typename range_difference<Rng>::type difference_type; - - return strided_iterator< - typename range_iterator<Rng>::type, - bidirectional_traversal_tag - >(boost::begin(rng), difference_type(), stride); - } - - template<class Rng, class Difference> inline - strided_iterator< - typename range_iterator<const Rng>::type, - bidirectional_traversal_tag - > - make_begin_strided_iterator( - const Rng& rng, - Difference stride, - bidirectional_traversal_tag) - { - typedef typename range_difference<const Rng>::type difference_type; - - return strided_iterator< - typename range_iterator<const Rng>::type, - bidirectional_traversal_tag - >(boost::begin(rng), difference_type(), stride); - } - - template<class Rng, class Difference> inline - strided_iterator< - typename range_iterator<Rng>::type, - bidirectional_traversal_tag - > - make_end_strided_iterator( - Rng& rng, - Difference stride, - bidirectional_traversal_tag) - { - return strided_iterator< - typename range_iterator<Rng>::type, - bidirectional_traversal_tag - >(boost::end(rng), boost::size(rng), stride); - } - - template<class Rng, class Difference> inline - strided_iterator< - typename range_iterator<const Rng>::type, - bidirectional_traversal_tag - > - make_end_strided_iterator( - const Rng& rng, - Difference stride, - bidirectional_traversal_tag) - { - return strided_iterator< - typename range_iterator<const Rng>::type, - bidirectional_traversal_tag - >(boost::end(rng), boost::size(rng), stride); - } - - template<class Rng, class Difference> inline - strided_iterator< - typename range_iterator<Rng>::type, - random_access_traversal_tag - > - make_begin_strided_iterator( - Rng& rng, - Difference stride, - random_access_traversal_tag) - { - return strided_iterator< - typename range_iterator<Rng>::type, - random_access_traversal_tag - >(boost::begin(rng), boost::begin(rng), stride); - } - - template<class Rng, class Difference> inline - strided_iterator< - typename range_iterator<const Rng>::type, - random_access_traversal_tag - > - make_begin_strided_iterator( - const Rng& rng, - Difference stride, - random_access_traversal_tag) - { - return strided_iterator< - typename range_iterator<const Rng>::type, - random_access_traversal_tag - >(boost::begin(rng), boost::begin(rng), stride); - } - - template<class Rng, class Difference> inline - strided_iterator< - typename range_iterator<Rng>::type, - random_access_traversal_tag - > - make_end_strided_iterator( - Rng& rng, - Difference stride, - random_access_traversal_tag) - { - return strided_iterator< - typename range_iterator<Rng>::type, - random_access_traversal_tag - >(boost::begin(rng), boost::end(rng), stride); - } - - template<class Rng, class Difference> inline - strided_iterator< - typename range_iterator<const Rng>::type, - random_access_traversal_tag - > - make_end_strided_iterator( - const Rng& rng, - Difference stride, - random_access_traversal_tag) - { - return strided_iterator< - typename range_iterator<const Rng>::type, - random_access_traversal_tag - >(boost::begin(rng), boost::end(rng), stride); - } - - template< - class Rng, - class Category = - typename iterators::pure_iterator_traversal< - typename range_iterator<Rng>::type - >::type - > - class strided_range - : public iterator_range< - range_detail::strided_iterator< - typename range_iterator<Rng>::type, - Category - > - > - { - typedef range_detail::strided_iterator< - typename range_iterator<Rng>::type, - Category - > iter_type; - typedef iterator_range<iter_type> super_t; - public: - template<class Difference> - strided_range(Difference stride, Rng& rng) - : super_t( - range_detail::make_begin_strided_iterator( - rng, stride, - typename iterator_traversal< - typename range_iterator<Rng>::type - >::type()), - range_detail::make_end_strided_iterator( - rng, stride, - typename iterator_traversal< - typename range_iterator<Rng>::type - >::type())) - { - BOOST_ASSERT( stride >= 0 ); - } - }; - - template<class Difference> - class strided_holder : public holder<Difference> - { - public: - explicit strided_holder(Difference value) - : holder<Difference>(value) - { - } - }; - - template<class Rng, class Difference> - inline strided_range<Rng> - operator|(Rng& rng, const strided_holder<Difference>& stride) - { - return strided_range<Rng>(stride.val, rng); - } - - template<class Rng, class Difference> - inline strided_range<const Rng> - operator|(const Rng& rng, const strided_holder<Difference>& stride) - { - return strided_range<const Rng>(stride.val, rng); - } - - } // namespace range_detail - - using range_detail::strided_range; - - namespace adaptors - { - - namespace - { - const range_detail::forwarder<range_detail::strided_holder> - strided = range_detail::forwarder< - range_detail::strided_holder>(); - } - - template<class Range, class Difference> - inline strided_range<Range> - stride(Range& rng, Difference step) - { - return strided_range<Range>(step, rng); - } - - template<class Range, class Difference> - inline strided_range<const Range> - stride(const Range& rng, Difference step) - { - return strided_range<const Range>(step, rng); - } - - } // namespace 'adaptors' -} // namespace 'boost' - -#endif diff --git a/contrib/restricted/boost/boost/range/adaptor/tokenized.hpp b/contrib/restricted/boost/boost/range/adaptor/tokenized.hpp deleted file mode 100644 index f0aa12eea5..0000000000 --- a/contrib/restricted/boost/boost/range/adaptor/tokenized.hpp +++ /dev/null @@ -1,137 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen, Neil Groves 2006. 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_ADAPTOR_TOKENIZED_HPP -#define BOOST_RANGE_ADAPTOR_TOKENIZED_HPP - -#include <boost/regex.hpp> -#include <boost/range/iterator_range.hpp> - -namespace boost -{ - namespace range_detail - { - - template< class R > - struct tokenized_range : - public boost::iterator_range< - boost::regex_token_iterator< - BOOST_DEDUCED_TYPENAME range_iterator<R>::type - > - > - { - private: - typedef - boost::regex_token_iterator< - BOOST_DEDUCED_TYPENAME range_iterator<R>::type - > - regex_iter; - - typedef BOOST_DEDUCED_TYPENAME regex_iter::regex_type - regex_type; - - typedef boost::iterator_range<regex_iter> - base; - - public: - template< class Regex, class Submatch, class Flag > - tokenized_range( R& r, const Regex& re, const Submatch& sub, Flag f ) - : base( regex_iter( boost::begin(r), boost::end(r), - regex_type(re), sub, f ), - regex_iter() ) - { } - }; - - template< class T, class U, class V > - struct regex_holder - { - T re; - U sub; - V f; - - regex_holder( const T& rex, const U& subm, V flag ) : - re(rex), sub(subm), f(flag) - { } - private: - // Not assignable - void operator=(const regex_holder&); - }; - - struct regex_forwarder - { - template< class Regex > - regex_holder<Regex,int,regex_constants::match_flag_type> - operator()( const Regex& re, - int submatch = 0, - regex_constants::match_flag_type f = - regex_constants::match_default ) const - { - return regex_holder<Regex,int, - regex_constants::match_flag_type>( re, submatch, f ); - } - - template< class Regex, class Submatch > - regex_holder<Regex,Submatch,regex_constants::match_flag_type> - operator()( const Regex& re, - const Submatch& sub, - regex_constants::match_flag_type f = - regex_constants::match_default ) const - { - return regex_holder<Regex,Submatch, - regex_constants::match_flag_type>( re, sub, f ); - } - }; - - template< class BidirectionalRng, class R, class S, class F > - inline tokenized_range<BidirectionalRng> - operator|( BidirectionalRng& r, - const regex_holder<R,S,F>& f ) - { - return tokenized_range<BidirectionalRng>( r, f.re, f.sub, f.f ); - } - - template< class BidirectionalRng, class R, class S, class F > - inline tokenized_range<const BidirectionalRng> - operator|( const BidirectionalRng& r, - const regex_holder<R,S,F>& f ) - { - return tokenized_range<const BidirectionalRng>( r, f.re, f.sub, f.f ); - } - - } // 'range_detail' - - using range_detail::tokenized_range; - - namespace adaptors - { - namespace - { - const range_detail::regex_forwarder tokenized = - range_detail::regex_forwarder(); - } - - template<class BidirectionalRange, class Regex, class Submatch, class Flag> - inline tokenized_range<BidirectionalRange> - tokenize(BidirectionalRange& rng, const Regex& reg, const Submatch& sub, Flag f) - { - return tokenized_range<BidirectionalRange>(rng, reg, sub, f); - } - - template<class BidirectionalRange, class Regex, class Submatch, class Flag> - inline tokenized_range<const BidirectionalRange> - tokenize(const BidirectionalRange& rng, const Regex& reg, const Submatch& sub, Flag f) - { - return tokenized_range<const BidirectionalRange>(rng, reg, sub, f); - } - } // 'adaptors' - -} - -#endif diff --git a/contrib/restricted/boost/boost/range/adaptor/type_erased.hpp b/contrib/restricted/boost/boost/range/adaptor/type_erased.hpp deleted file mode 100644 index ba5b159886..0000000000 --- a/contrib/restricted/boost/boost/range/adaptor/type_erased.hpp +++ /dev/null @@ -1,196 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 2010. 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_ADAPTOR_TYPE_ERASED_HPP_INCLUDED -#define BOOST_RANGE_ADAPTOR_TYPE_ERASED_HPP_INCLUDED - -#include <boost/range/reference.hpp> -#include <boost/range/value_type.hpp> -#include <boost/range/iterator_range_core.hpp> -#include <boost/range/any_range.hpp> -#include <boost/range/concepts.hpp> - -namespace boost -{ - namespace adaptors - { - template< - class Value = use_default - , class Traversal = use_default - , class Reference = use_default - , class Difference = use_default - , class Buffer = use_default - > - struct type_erased - { - }; - - template< - class SinglePassRange - , class Value - , class Traversal - , class Reference - , class Difference - , class Buffer - > - typename any_range_type_generator< - SinglePassRange - , Value - , Traversal - , Reference - , Difference - , Buffer - >::type - operator|(SinglePassRange& rng, - type_erased< - Value - , Traversal - , Reference - , Difference - , Buffer - >) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<SinglePassRange>)); - - typedef typename any_range_type_generator< - SinglePassRange - , Value - , Traversal - , Reference - , Difference - , Buffer - >::type range_type; - return range_type(boost::begin(rng), boost::end(rng)); - } - - template< - class SinglePassRange - , class Value - , class Traversal - , class Reference - , class Difference - , class Buffer - > - typename any_range_type_generator< - const SinglePassRange - , Value - , Traversal - , Reference - , Difference - , Buffer - >::type - operator|(const SinglePassRange& rng, - type_erased< - Value - , Traversal - , Reference - , Difference - , Buffer - >) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange>)); - - typedef typename any_range_type_generator< - const SinglePassRange - , Value - , Traversal - , Reference - , Difference - , Buffer - >::type range_type; - return range_type(boost::begin(rng), boost::end(rng)); - } - - template< - class SinglePassRange - , class Value - , class Traversal - , class Reference - , class Difference - , class Buffer - > - typename any_range_type_generator< - SinglePassRange - , Value - , Traversal - , Reference - , Difference - , Buffer - >::type - type_erase(SinglePassRange& rng - , type_erased< - Value - , Traversal - , Reference - , Difference - , Buffer - > = type_erased<>() - ) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<SinglePassRange>)); - - typedef typename any_range_type_generator< - SinglePassRange - , Value - , Traversal - , Reference - , Difference - , Buffer - >::type range_type; - - return range_type(boost::begin(rng), boost::end(rng)); - } - - template< - class SinglePassRange - , class Value - , class Traversal - , class Reference - , class Difference - , class Buffer - > - typename any_range_type_generator< - const SinglePassRange - , Value - , Traversal - , Reference - , Difference - , Buffer - >::type - type_erase(const SinglePassRange& rng - , type_erased< - Value - , Traversal - , Reference - , Difference - , Buffer - > = type_erased<>() - ) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange>)); - - typedef typename any_range_type_generator< - const SinglePassRange - , Value - , Traversal - , Reference - , Difference - , Buffer - >::type range_type; - - return range_type(boost::begin(rng), boost::end(rng)); - } - } -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/adaptor/uniqued.hpp b/contrib/restricted/boost/boost/range/adaptor/uniqued.hpp deleted file mode 100644 index 29101d3260..0000000000 --- a/contrib/restricted/boost/boost/range/adaptor/uniqued.hpp +++ /dev/null @@ -1,97 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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_ADAPTOR_UNIQUED_IMPL_HPP -#define BOOST_RANGE_ADAPTOR_UNIQUED_IMPL_HPP - -#include <boost/range/adaptor/adjacent_filtered.hpp> -#include <boost/range/concepts.hpp> - -namespace boost -{ - - namespace range_detail - { - struct unique_forwarder { }; - - struct unique_not_equal_to - { - typedef bool result_type; - - template< class T > - bool operator()( const T& l, const T& r ) const - { - return !(l == r); - } - }; - - template<class ForwardRng> - class uniqued_range : public adjacent_filtered_range<unique_not_equal_to, ForwardRng, true> - { - typedef adjacent_filtered_range<unique_not_equal_to, ForwardRng, true> base; - public: - explicit uniqued_range(ForwardRng& rng) - : base(unique_not_equal_to(), rng) - { - } - }; - - template< class ForwardRng > - inline uniqued_range<ForwardRng> - operator|( ForwardRng& r, - unique_forwarder ) - { - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRng>)); - return uniqued_range<ForwardRng>(r); - } - - template< class ForwardRng > - inline uniqued_range<const ForwardRng> - operator|( const ForwardRng& r, - unique_forwarder ) - { - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<const ForwardRng>)); - return uniqued_range<const ForwardRng>(r); - } - - } // 'range_detail' - - using range_detail::uniqued_range; - - namespace adaptors - { - namespace - { - const range_detail::unique_forwarder uniqued = - range_detail::unique_forwarder(); - } - - template<class ForwardRange> - inline uniqued_range<ForwardRange> - unique(ForwardRange& rng) - { - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>)); - return uniqued_range<ForwardRange>(rng); - } - - template<class ForwardRange> - inline uniqued_range<const ForwardRange> - unique(const ForwardRange& rng) - { - BOOST_RANGE_CONCEPT_ASSERT(( - ForwardRangeConcept<const ForwardRange>)); - - return uniqued_range<const ForwardRange>(rng); - } - } // 'adaptors' - -} - -#endif diff --git a/contrib/restricted/boost/boost/range/adaptors.hpp b/contrib/restricted/boost/boost/range/adaptors.hpp deleted file mode 100644 index 0530c4d36c..0000000000 --- a/contrib/restricted/boost/boost/range/adaptors.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 2007. -// Copyright Thorsten Ottosen 2006. -// 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_ADAPTORS_HPP -#define BOOST_RANGE_ADAPTORS_HPP - -#include <boost/range/adaptor/adjacent_filtered.hpp> -#include <boost/range/adaptor/copied.hpp> -#include <boost/range/adaptor/filtered.hpp> -#include <boost/range/adaptor/formatted.hpp> -#include <boost/range/adaptor/indexed.hpp> -#include <boost/range/adaptor/indirected.hpp> -#include <boost/range/adaptor/map.hpp> -#include <boost/range/adaptor/replaced.hpp> -#include <boost/range/adaptor/replaced_if.hpp> -#include <boost/range/adaptor/reversed.hpp> -#include <boost/range/adaptor/sliced.hpp> -#include <boost/range/adaptor/strided.hpp> -#include <boost/range/adaptor/tokenized.hpp> -#include <boost/range/adaptor/transformed.hpp> -#include <boost/range/adaptor/uniqued.hpp> - -#endif diff --git a/contrib/restricted/boost/boost/range/algorithm.hpp b/contrib/restricted/boost/boost/range/algorithm.hpp deleted file mode 100644 index 30dc5836e9..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm.hpp +++ /dev/null @@ -1,104 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file algorithm.hpp -/// Includes the range-based versions of the algorithms in the -/// C++ standard header file <algorithm> -// -///////////////////////////////////////////////////////////////////////////// - -// Copyright 2009 Neil Groves. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// Acknowledgements: -// This code uses combinations of ideas, techniques and code snippets -// from: Thorsten Ottosen, Eric Niebler, Jeremy Siek, -// and Vladimir Prus' -// -// The original mutating algorithms that served as the first version -// were originally written by Vladimir Prus' -// <ghost@cs.msu.su> code from Boost Wiki - -#if defined(_MSC_VER) -#pragma once -#endif - -#ifndef BOOST_RANGE_ALGORITHM_HPP_INCLUDED_01012009 -#define BOOST_RANGE_ALGORITHM_HPP_INCLUDED_01012009 - -#include <boost/range/concepts.hpp> -#include <boost/range/iterator_range.hpp> -#include <boost/range/difference_type.hpp> -#include <boost/range/detail/range_return.hpp> -#include <boost/iterator/iterator_traits.hpp> -#include <boost/next_prior.hpp> -#include <algorithm> - -// Non-mutating algorithms -#include <boost/range/algorithm/adjacent_find.hpp> -#include <boost/range/algorithm/count.hpp> -#include <boost/range/algorithm/count_if.hpp> -#include <boost/range/algorithm/equal.hpp> -#include <boost/range/algorithm/for_each.hpp> -#include <boost/range/algorithm/find.hpp> -#include <boost/range/algorithm/find_end.hpp> -#include <boost/range/algorithm/find_first_of.hpp> -#include <boost/range/algorithm/find_if.hpp> -#include <boost/range/algorithm/lexicographical_compare.hpp> -#include <boost/range/algorithm/mismatch.hpp> -#include <boost/range/algorithm/search.hpp> -#include <boost/range/algorithm/search_n.hpp> - -// Mutating algorithms -#include <boost/range/algorithm/copy.hpp> -#include <boost/range/algorithm/copy_backward.hpp> -#include <boost/range/algorithm/fill.hpp> -#include <boost/range/algorithm/fill_n.hpp> -#include <boost/range/algorithm/generate.hpp> -#include <boost/range/algorithm/inplace_merge.hpp> -#include <boost/range/algorithm/merge.hpp> -#include <boost/range/algorithm/nth_element.hpp> -#include <boost/range/algorithm/partial_sort.hpp> -#include <boost/range/algorithm/partial_sort_copy.hpp> -#include <boost/range/algorithm/partition.hpp> -#include <boost/range/algorithm/random_shuffle.hpp> -#include <boost/range/algorithm/remove.hpp> -#include <boost/range/algorithm/remove_copy.hpp> -#include <boost/range/algorithm/remove_copy_if.hpp> -#include <boost/range/algorithm/remove_if.hpp> -#include <boost/range/algorithm/replace.hpp> -#include <boost/range/algorithm/replace_copy.hpp> -#include <boost/range/algorithm/replace_copy_if.hpp> -#include <boost/range/algorithm/replace_if.hpp> -#include <boost/range/algorithm/reverse.hpp> -#include <boost/range/algorithm/reverse_copy.hpp> -#include <boost/range/algorithm/rotate.hpp> -#include <boost/range/algorithm/rotate_copy.hpp> -#include <boost/range/algorithm/sort.hpp> -#include <boost/range/algorithm/stable_partition.hpp> -#include <boost/range/algorithm/stable_sort.hpp> -#include <boost/range/algorithm/transform.hpp> -#include <boost/range/algorithm/unique.hpp> -#include <boost/range/algorithm/unique_copy.hpp> - -// Binary search -#include <boost/range/algorithm/binary_search.hpp> -#include <boost/range/algorithm/equal_range.hpp> -#include <boost/range/algorithm/lower_bound.hpp> -#include <boost/range/algorithm/upper_bound.hpp> - -// Set operations of sorted ranges -#include <boost/range/algorithm/set_algorithm.hpp> - -// Heap operations -#include <boost/range/algorithm/heap_algorithm.hpp> - -// Minimum and Maximum -#include <boost/range/algorithm/max_element.hpp> -#include <boost/range/algorithm/min_element.hpp> - -// Permutations -#include <boost/range/algorithm/permutation.hpp> - -#endif // include guard - diff --git a/contrib/restricted/boost/boost/range/algorithm/adjacent_find.hpp b/contrib/restricted/boost/boost/range/algorithm/adjacent_find.hpp deleted file mode 100644 index 1b88dae86e..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/adjacent_find.hpp +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 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_ALGORITHM_ADJACENT_FIND_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_ADJACENT_FIND_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/value_type.hpp> -#include <boost/range/detail/range_return.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function adjacent_find -/// -/// range-based version of the adjacent_find std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template< typename ForwardRange > -inline typename range_iterator<ForwardRange>::type -adjacent_find(ForwardRange & rng) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>)); - return std::adjacent_find(boost::begin(rng),boost::end(rng)); -} - -/// \overload -template< typename ForwardRange > -inline typename range_iterator<const ForwardRange>::type -adjacent_find(const ForwardRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>)); - return std::adjacent_find(boost::begin(rng),boost::end(rng)); -} - -/// \overload -template< typename ForwardRange, typename BinaryPredicate > -inline typename range_iterator<ForwardRange>::type -adjacent_find(ForwardRange & rng, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>)); - BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate, - typename range_value<ForwardRange>::type, - typename range_value<ForwardRange>::type>)); - return std::adjacent_find(boost::begin(rng),boost::end(rng),pred); -} - -/// \overload -template< typename ForwardRange, typename BinaryPredicate > -inline typename range_iterator<const ForwardRange>::type -adjacent_find(const ForwardRange& rng, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>)); - BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate, - typename range_value<const ForwardRange>::type, - typename range_value<const ForwardRange>::type>)); - return std::adjacent_find(boost::begin(rng),boost::end(rng),pred); -} - -// range_return overloads - -/// \overload -template< range_return_value re, typename ForwardRange > -inline typename range_return<ForwardRange,re>::type -adjacent_find(ForwardRange & rng) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>)); - return range_return<ForwardRange,re>:: - pack(std::adjacent_find(boost::begin(rng),boost::end(rng)), - rng); -} - -/// \overload -template< range_return_value re, typename ForwardRange > -inline typename range_return<const ForwardRange,re>::type -adjacent_find(const ForwardRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>)); - return range_return<const ForwardRange,re>:: - pack(std::adjacent_find(boost::begin(rng),boost::end(rng)), - rng); -} - -/// \overload -template< range_return_value re, typename ForwardRange, typename BinaryPredicate > -inline typename range_return<ForwardRange,re>::type -adjacent_find(ForwardRange& rng, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>)); - BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate, - typename range_value<ForwardRange>::type, - typename range_value<ForwardRange>::type>)); - return range_return<ForwardRange,re>:: - pack(std::adjacent_find(boost::begin(rng),boost::end(rng),pred), - rng); -} - -/// \overload -template< range_return_value re, typename ForwardRange, typename BinaryPredicate > -inline typename range_return<const ForwardRange,re>::type -adjacent_find(const ForwardRange& rng, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>)); - return range_return<const ForwardRange,re>:: - pack(std::adjacent_find(boost::begin(rng),boost::end(rng),pred), - rng); -} - - } // namespace range - using range::adjacent_find; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/binary_search.hpp b/contrib/restricted/boost/boost/range/algorithm/binary_search.hpp deleted file mode 100644 index bb64ec8f16..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/binary_search.hpp +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 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_ALGORITHM_BINARY_SEARCH_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_BINARY_SEARCH_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function binary_search -/// -/// range-based version of the binary_search std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template<class ForwardRange, class Value> -inline bool binary_search(const ForwardRange& rng, const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::binary_search(boost::begin(rng), boost::end(rng), val); -} - -/// \overload -template<class ForwardRange, class Value, class BinaryPredicate> -inline bool binary_search(const ForwardRange& rng, const Value& val, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::binary_search(boost::begin(rng), boost::end(rng), val, pred); -} - - } // namespace range - using range::binary_search; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/copy.hpp b/contrib/restricted/boost/boost/range/algorithm/copy.hpp deleted file mode 100644 index f15b31f913..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/copy.hpp +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 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_ALGORITHM_COPY_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_COPY_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/iterator_range.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function copy -/// -/// range-based version of the copy std algorithm -/// -/// \pre SinglePassRange is a model of the SinglePassRangeConcept -/// \pre OutputIterator is a model of the OutputIteratorConcept -template< class SinglePassRange, class OutputIterator > -inline OutputIterator copy(const SinglePassRange& rng, OutputIterator out) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> )); - return std::copy(boost::begin(rng),boost::end(rng),out); -} - - } // namespace range - using range::copy; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/copy_backward.hpp b/contrib/restricted/boost/boost/range/algorithm/copy_backward.hpp deleted file mode 100644 index c95c6f1f36..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/copy_backward.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 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_ALGORITHM_COPY_BACKWARD_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_COPY_BACKWARD_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function copy_backward -/// -/// range-based version of the copy_backwards std algorithm -/// -/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept -/// \pre BidirectionalTraversalWriteableIterator is a model of the BidirectionalIteratorConcept -/// \pre BidirectionalTraversalWriteableIterator is a model of the WriteableIteratorConcept -template< class BidirectionalRange, class BidirectionalTraversalWriteableIterator > -inline BidirectionalTraversalWriteableIterator -copy_backward(const BidirectionalRange& rng, - BidirectionalTraversalWriteableIterator out) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> )); - return std::copy_backward(boost::begin(rng), boost::end(rng), out); -} - - } // namespace range - using range::copy_backward; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/count.hpp b/contrib/restricted/boost/boost/range/algorithm/count.hpp deleted file mode 100644 index 8316ce0f11..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/count.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 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_ALGORITHM_COUNT_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_COUNT_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/difference_type.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function count -/// -/// range-based version of the count std algorithm -/// -/// \pre SinglePassRange is a model of the SinglePassRangeConcept -template< class SinglePassRange, class Value > -inline BOOST_DEDUCED_TYPENAME range_difference<SinglePassRange>::type -count(SinglePassRange& rng, const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> )); - return std::count(boost::begin(rng), boost::end(rng), val); -} - -/// \overload -template< class SinglePassRange, class Value > -inline BOOST_DEDUCED_TYPENAME range_difference<SinglePassRange const>::type -count(const SinglePassRange& rng, const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> )); - return std::count(boost::begin(rng), boost::end(rng), val); -} - - } // namespace range - using range::count; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/count_if.hpp b/contrib/restricted/boost/boost/range/algorithm/count_if.hpp deleted file mode 100644 index ae17b0e3ae..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/count_if.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 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_ALGORITHM_COUNT_IF_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_COUNT_IF_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/difference_type.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function count_if -/// -/// range-based version of the count_if std algorithm -/// -/// \pre SinglePassRange is a model of the SinglePassRangeConcept -/// \pre UnaryPredicate is a model of the UnaryPredicateConcept -template< class SinglePassRange, class UnaryPredicate > -inline BOOST_DEDUCED_TYPENAME boost::range_difference<SinglePassRange>::type -count_if(SinglePassRange& rng, UnaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> )); - return std::count_if(boost::begin(rng), boost::end(rng), pred); -} - -/// \overload -template< class SinglePassRange, class UnaryPredicate > -inline BOOST_DEDUCED_TYPENAME boost::range_difference<const SinglePassRange>::type -count_if(const SinglePassRange& rng, UnaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> )); - return std::count_if(boost::begin(rng), boost::end(rng), pred); -} - - } // namespace range - using range::count_if; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/equal_range.hpp b/contrib/restricted/boost/boost/range/algorithm/equal_range.hpp deleted file mode 100644 index 4aa4a54dd7..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/equal_range.hpp +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 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_ALGORITHM_EQUAL_RANGE_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_EQUAL_RANGE_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function equal_range -/// -/// range-based version of the equal_range std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -/// \pre SortPredicate is a model of the BinaryPredicateConcept -template<class ForwardRange, class Value> -inline std::pair< - BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type, - BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type - > -equal_range(ForwardRange& rng, const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return std::equal_range(boost::begin(rng), boost::end(rng), val); -} - -/// \overload -template<class ForwardRange, class Value> -inline std::pair< - BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type, - BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type - > -equal_range(const ForwardRange& rng, const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::equal_range(boost::begin(rng), boost::end(rng), val); -} - -/// \overload -template<class ForwardRange, class Value, class SortPredicate> -inline std::pair< - BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type, - BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type - > -equal_range(ForwardRange& rng, const Value& val, SortPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return std::equal_range(boost::begin(rng), boost::end(rng), val, pred); -} - -/// \overload -template<class ForwardRange, class Value, class SortPredicate> -inline std::pair< - BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type, - BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type - > -equal_range(const ForwardRange& rng, const Value& val, SortPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::equal_range(boost::begin(rng), boost::end(rng), val, pred); -} - - } // namespace range - using range::equal_range; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/fill.hpp b/contrib/restricted/boost/boost/range/algorithm/fill.hpp deleted file mode 100644 index 95231a82f7..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/fill.hpp +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 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_ALGORITHM_FILL_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_FILL_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function fill -/// -/// range-based version of the fill std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -template< class ForwardRange, class Value > -inline ForwardRange& fill(ForwardRange& rng, const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - std::fill(boost::begin(rng), boost::end(rng), val); - return rng; -} - -/// \overload -template< class ForwardRange, class Value > -inline const ForwardRange& fill(const ForwardRange& rng, const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - std::fill(boost::begin(rng), boost::end(rng), val); - return rng; -} - - } // namespace range - using range::fill; -} - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/fill_n.hpp b/contrib/restricted/boost/boost/range/algorithm/fill_n.hpp deleted file mode 100644 index 02a0c2a362..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/fill_n.hpp +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 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_ALGORITHM_FILL_N_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_FILL_N_HPP_INCLUDED - -#include <boost/assert.hpp> -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function fill_n -/// -/// range-based version of the fill_n std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -/// \pre n <= std::distance(boost::begin(rng), boost::end(rng)) -template< class ForwardRange, class Size, class Value > -inline ForwardRange& fill_n(ForwardRange& rng, Size n, const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - BOOST_ASSERT( static_cast<Size>(std::distance(boost::begin(rng), boost::end(rng))) >= n ); - std::fill_n(boost::begin(rng), n, val); - return rng; -} - -/// \overload -template< class ForwardRange, class Size, class Value > -inline const ForwardRange& fill_n(const ForwardRange& rng, Size n, const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - BOOST_ASSERT( static_cast<Size>(std::distance(boost::begin(rng), boost::end(rng))) >= n ); - std::fill_n(boost::begin(rng), n, val); - return rng; -} - - } // namespace range - using range::fill_n; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/find_end.hpp b/contrib/restricted/boost/boost/range/algorithm/find_end.hpp deleted file mode 100644 index 757e9996c0..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/find_end.hpp +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 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_ALGORITHM_FIND_END_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_FIND_END_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/detail/range_return.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function find_end -/// -/// range-based version of the find_end std algorithm -/// -/// \pre ForwardRange1 is a model of the ForwardRangeConcept -/// \pre ForwardRange2 is a model of the ForwardRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template< class ForwardRange1, class ForwardRange2 > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<ForwardRange1>, - BOOST_DEDUCED_TYPENAME range_iterator< ForwardRange1 >::type ->::type -find_end(ForwardRange1 & rng1, const ForwardRange2& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return std::find_end(boost::begin(rng1),boost::end(rng1), - boost::begin(rng2),boost::end(rng2)); -} - -/// \overload -template< class ForwardRange1, class ForwardRange2 > -inline BOOST_DEDUCED_TYPENAME range_iterator< const ForwardRange1 >::type -find_end(const ForwardRange1 & rng1, const ForwardRange2& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return std::find_end(boost::begin(rng1),boost::end(rng1), - boost::begin(rng2),boost::end(rng2)); -} - -/// \overload -template< class ForwardRange1, class ForwardRange2, class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<ForwardRange1>, - BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange1>::type ->::type -find_end(ForwardRange1 & rng1, const ForwardRange2& rng2, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return std::find_end(boost::begin(rng1),boost::end(rng1), - boost::begin(rng2),boost::end(rng2),pred); -} - -/// \overload -template< class ForwardRange1, class ForwardRange2, class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type -find_end(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return std::find_end(boost::begin(rng1),boost::end(rng1), - boost::begin(rng2),boost::end(rng2),pred); -} - -/// \overload -template< range_return_value re, class ForwardRange1, class ForwardRange2 > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<ForwardRange1>, - BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type ->::type -find_end(ForwardRange1& rng1, const ForwardRange2& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return range_return<ForwardRange1,re>:: - pack(std::find_end(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2)), - rng1); -} - -/// \overload -template< range_return_value re, class ForwardRange1, class ForwardRange2 > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type -find_end(const ForwardRange1& rng1, const ForwardRange2& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return range_return<const ForwardRange1,re>:: - pack(std::find_end(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2)), - rng1); -} - -/// \overload -template< range_return_value re, class ForwardRange1, class ForwardRange2, - class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<ForwardRange1>, - BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type ->::type -find_end(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return range_return<ForwardRange1,re>:: - pack(std::find_end(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), pred), - rng1); -} - -/// \overload -template< range_return_value re, class ForwardRange1, class ForwardRange2, - class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type -find_end(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return range_return<const ForwardRange1,re>:: - pack(std::find_end(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), pred), - rng1); -} - - } // namespace range - using range::find_end; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/find_first_of.hpp b/contrib/restricted/boost/boost/range/algorithm/find_first_of.hpp deleted file mode 100644 index 4cb5989afa..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/find_first_of.hpp +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 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_ALGORITHM_FIND_FIRST_OF_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_FIND_FIRST_OF_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/detail/range_return.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function find_first_of -/// -/// range-based version of the find_first_of std algorithm -/// -/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept -/// \pre ForwardRange2 is a model of the ForwardRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template< class SinglePassRange1, class ForwardRange2 > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<SinglePassRange1>, - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type ->::type -find_first_of(SinglePassRange1 & rng1, ForwardRange2 const & rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return std::find_first_of(boost::begin(rng1),boost::end(rng1), - boost::begin(rng2),boost::end(rng2)); -} - -/// \overload -template< class SinglePassRange1, class ForwardRange2 > -inline BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type -find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return std::find_first_of(boost::begin(rng1),boost::end(rng1), - boost::begin(rng2),boost::end(rng2)); -} - -/// \overload -template< class SinglePassRange1, class ForwardRange2, class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<SinglePassRange1>, - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type ->::type -find_first_of(SinglePassRange1 & rng1, ForwardRange2 const & rng2, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return std::find_first_of(boost::begin(rng1),boost::end(rng1), - boost::begin(rng2),boost::end(rng2),pred); -} - -/// \overload -template< class SinglePassRange1, class ForwardRange2, class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type -find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return std::find_first_of(boost::begin(rng1),boost::end(rng1), - boost::begin(rng2),boost::end(rng2),pred); -} - -// range return overloads -/// \overload -template< range_return_value re, class SinglePassRange1, class ForwardRange2 > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<SinglePassRange1>, - BOOST_DEDUCED_TYPENAME range_return<SinglePassRange1,re>::type ->::type -find_first_of(SinglePassRange1& rng1, const ForwardRange2& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return range_return<SinglePassRange1,re>:: - pack(std::find_first_of(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2)), - rng1); -} - -/// \overload -template< range_return_value re, class SinglePassRange1, class ForwardRange2 > -inline BOOST_DEDUCED_TYPENAME range_return<const SinglePassRange1,re>::type -find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return range_return<const SinglePassRange1,re>:: - pack(std::find_first_of(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2)), - rng1); -} - -/// \overload -template< range_return_value re, class SinglePassRange1, class ForwardRange2, - class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<SinglePassRange1>, - BOOST_DEDUCED_TYPENAME range_return<SinglePassRange1,re>::type ->::type -find_first_of(SinglePassRange1 & rng1, const ForwardRange2& rng2, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return range_return<SinglePassRange1,re>:: - pack(std::find_first_of(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), pred), - rng1); -} - -/// \overload -template< range_return_value re, class SinglePassRange1, class ForwardRange2, - class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<const SinglePassRange1,re>::type -find_first_of(const SinglePassRange1 & rng1, const ForwardRange2& rng2, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - - return range_return<const SinglePassRange1,re>:: - pack(std::find_first_of(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), pred), - rng1); -} - - } // namespace range - using range::find_first_of; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/find_if.hpp b/contrib/restricted/boost/boost/range/algorithm/find_if.hpp deleted file mode 100644 index 2d1926dabb..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/find_if.hpp +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 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_ALGORITHM_FIND_IF_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_FIND_IF_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/detail/range_return.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function find_if -/// -/// range-based version of the find_if std algorithm -/// -/// \pre SinglePassRange is a model of the SinglePassRangeConcept -/// \pre UnaryPredicate is a model of the UnaryPredicateConcept -template< class SinglePassRange, class UnaryPredicate > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<SinglePassRange>, - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type ->::type -find_if( SinglePassRange& rng, UnaryPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> )); - return std::find_if(boost::begin(rng), boost::end(rng), pred); -} - -/// \overload -template< class SinglePassRange, class UnaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange>::type -find_if( const SinglePassRange& rng, UnaryPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> )); - return std::find_if(boost::begin(rng), boost::end(rng), pred); -} - -// range_return overloads - -/// \overload -template< range_return_value re, class SinglePassRange, class UnaryPredicate > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<SinglePassRange>, - BOOST_DEDUCED_TYPENAME range_return<SinglePassRange,re>::type ->::type -find_if( SinglePassRange& rng, UnaryPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> )); - return range_return<SinglePassRange,re>:: - pack(std::find_if(boost::begin(rng), boost::end(rng), pred), - rng); -} - -/// \overload -template< range_return_value re, class SinglePassRange, class UnaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<const SinglePassRange,re>::type -find_if( const SinglePassRange& rng, UnaryPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> )); - return range_return<const SinglePassRange,re>:: - pack(std::find_if(boost::begin(rng), boost::end(rng), pred), - rng); -} - - } // namespace range - using range::find_if; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/for_each.hpp b/contrib/restricted/boost/boost/range/algorithm/for_each.hpp deleted file mode 100644 index ea731b2fdd..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/for_each.hpp +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 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_ALGORITHM_FOR_EACH_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_FOR_EACH_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/utility/enable_if.hpp> -#include <boost/ref.hpp> -#include <algorithm> - -#if BOOST_WORKAROUND(BOOST_MSVC, == 1600) -#include <xutility> -#endif - -namespace boost -{ - namespace range - { - -#if BOOST_WORKAROUND(BOOST_MSVC, == 1600) - namespace for_each_detail - { - template<typename Iterator, typename UnaryFunction> - inline UnaryFunction - for_each_impl(Iterator first, Iterator last, UnaryFunction fun, - typename ::boost::enable_if< - is_reference_wrapper<UnaryFunction>, - void - >::type* = 0) - { - typedef typename std::_Get_unchecked_type<Iterator>::type - unchecked_iterator; - - unchecked_iterator unchecked_last = std::_Unchecked(last); - for (unchecked_iterator unchecked_first = std::_Unchecked(first); first != last; ++first) - fun.get()(*unchecked_first); - - return fun; - } - - template<typename Iterator, typename UnaryFunction> - inline UnaryFunction - for_each_impl(Iterator first, Iterator last, UnaryFunction fn, - typename disable_if< - is_reference_wrapper<UnaryFunction>, - void - >::type* = 0) - { - return std::for_each<Iterator, UnaryFunction>(first, last, fn); - } - } -#endif - -/// \brief template function for_each -/// -/// range-based version of the for_each std algorithm -/// -/// \pre SinglePassRange is a model of the SinglePassRangeConcept -/// \pre UnaryFunction is a model of the UnaryFunctionConcept -template< class SinglePassRange, class UnaryFunction > -inline UnaryFunction for_each(SinglePassRange & rng, UnaryFunction fun) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> )); - -#if BOOST_WORKAROUND(BOOST_MSVC, == 1600) - return for_each_detail::for_each_impl< - typename range_iterator<SinglePassRange>::type, - UnaryFunction - >(boost::begin(rng), boost::end(rng), fun); -#else - return std::for_each< - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type, - UnaryFunction - >(boost::begin(rng),boost::end(rng),fun); -#endif -} - -/// \overload -template< class SinglePassRange, class UnaryFunction > -inline UnaryFunction for_each(const SinglePassRange& rng, UnaryFunction fun) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> )); - -#if BOOST_WORKAROUND(BOOST_MSVC, == 1600) - return for_each_detail::for_each_impl< - typename range_iterator<const SinglePassRange>::type, - UnaryFunction - >(boost::begin(rng), boost::end(rng), fun); -#else - return std::for_each< - BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange>::type, - UnaryFunction - >(boost::begin(rng), boost::end(rng), fun); -#endif -} - - } // namespace range - using range::for_each; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/generate.hpp b/contrib/restricted/boost/boost/range/algorithm/generate.hpp deleted file mode 100644 index 324412c454..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/generate.hpp +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 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_ALGORITHM_GENERATE_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_GENERATE_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { -/// \brief template function generate -/// -/// range-based version of the generate std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -/// \pre Generator is a model of the UnaryFunctionConcept -template< class ForwardRange, class Generator > -inline ForwardRange& generate( ForwardRange& rng, Generator gen ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - std::generate(boost::begin(rng), boost::end(rng), gen); - return rng; -} - -/// \overload -template< class ForwardRange, class Generator > -inline const ForwardRange& generate( const ForwardRange& rng, Generator gen ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - std::generate(boost::begin(rng), boost::end(rng), gen); - return rng; -} - - } // namespace range - using range::generate; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/heap_algorithm.hpp b/contrib/restricted/boost/boost/range/algorithm/heap_algorithm.hpp deleted file mode 100644 index 584920d655..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/heap_algorithm.hpp +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 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_ALGORITHM_HEAP_ALGORITHM_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_HEAP_ALGORITHM_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function push_heap -/// -/// range-based version of the push_heap std algorithm -/// -/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept -/// \pre Compare is a model of the BinaryPredicateConcept -template<class RandomAccessRange> -inline RandomAccessRange& push_heap(RandomAccessRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::push_heap(boost::begin(rng), boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange> -inline const RandomAccessRange& push_heap(const RandomAccessRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::push_heap(boost::begin(rng), boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange, class Compare> -inline RandomAccessRange& push_heap(RandomAccessRange& rng, Compare comp_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::push_heap(boost::begin(rng), boost::end(rng), comp_pred); - return rng; -} - -/// \overload -template<class RandomAccessRange, class Compare> -inline const RandomAccessRange& push_heap(const RandomAccessRange& rng, Compare comp_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::push_heap(boost::begin(rng), boost::end(rng), comp_pred); - return rng; -} - -/// \brief template function pop_heap -/// -/// range-based version of the pop_heap std algorithm -/// -/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept -/// \pre Compare is a model of the BinaryPredicateConcept -template<class RandomAccessRange> -inline RandomAccessRange& pop_heap(RandomAccessRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::pop_heap(boost::begin(rng), boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange> -inline const RandomAccessRange& pop_heap(const RandomAccessRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::pop_heap(boost::begin(rng), boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange, class Compare> -inline RandomAccessRange& pop_heap(RandomAccessRange& rng, Compare comp_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::pop_heap(boost::begin(rng), boost::end(rng), comp_pred); - return rng; -} - -/// \overload -template<class RandomAccessRange, class Compare> -inline const RandomAccessRange& pop_heap(const RandomAccessRange& rng, Compare comp_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::pop_heap(boost::begin(rng), boost::end(rng), comp_pred); - return rng; -} - -/// \brief template function make_heap -/// -/// range-based version of the make_heap std algorithm -/// -/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept -/// \pre Compare is a model of the BinaryPredicateConcept -template<class RandomAccessRange> -inline RandomAccessRange& make_heap(RandomAccessRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::make_heap(boost::begin(rng), boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange> -inline const RandomAccessRange& make_heap(const RandomAccessRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::make_heap(boost::begin(rng), boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange, class Compare> -inline RandomAccessRange& make_heap(RandomAccessRange& rng, Compare comp_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::make_heap(boost::begin(rng), boost::end(rng), comp_pred); - return rng; -} - -/// \overload -template<class RandomAccessRange, class Compare> -inline const RandomAccessRange& make_heap(const RandomAccessRange& rng, Compare comp_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::make_heap(boost::begin(rng), boost::end(rng), comp_pred); - return rng; -} - -/// \brief template function sort_heap -/// -/// range-based version of the sort_heap std algorithm -/// -/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept -/// \pre Compare is a model of the BinaryPredicateConcept -template<class RandomAccessRange> -inline RandomAccessRange& sort_heap(RandomAccessRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::sort_heap(boost::begin(rng), boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange> -inline const RandomAccessRange& sort_heap(const RandomAccessRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::sort_heap(boost::begin(rng), boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange, class Compare> -inline RandomAccessRange& sort_heap(RandomAccessRange& rng, Compare comp_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::sort_heap(boost::begin(rng), boost::end(rng), comp_pred); - return rng; -} - -/// \overload -template<class RandomAccessRange, class Compare> -inline const RandomAccessRange& sort_heap(const RandomAccessRange& rng, Compare comp_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::sort_heap(boost::begin(rng), boost::end(rng), comp_pred); - return rng; -} - - } // namespace range - using range::push_heap; - using range::pop_heap; - using range::make_heap; - using range::sort_heap; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/inplace_merge.hpp b/contrib/restricted/boost/boost/range/algorithm/inplace_merge.hpp deleted file mode 100644 index dfadbaa6f1..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/inplace_merge.hpp +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 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_ALGORITHM_INPLACE_MERGE_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_INPLACE_MERGE_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function inplace_merge -/// -/// range-based version of the inplace_merge std algorithm -/// -/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template<class BidirectionalRange> -inline BidirectionalRange& inplace_merge(BidirectionalRange& rng, - BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type middle) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> )); - std::inplace_merge(boost::begin(rng), middle, boost::end(rng)); - return rng; -} - -/// \overload -template<class BidirectionalRange> -inline const BidirectionalRange& inplace_merge(const BidirectionalRange& rng, - BOOST_DEDUCED_TYPENAME boost::range_iterator<const BidirectionalRange>::type middle) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> )); - std::inplace_merge(boost::begin(rng), middle, boost::end(rng)); - return rng; -} - -/// \overload -template<class BidirectionalRange, class BinaryPredicate> -inline BidirectionalRange& inplace_merge(BidirectionalRange& rng, - BOOST_DEDUCED_TYPENAME boost::range_iterator<BidirectionalRange>::type middle, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> )); - std::inplace_merge(boost::begin(rng), middle, boost::end(rng), pred); - return rng; -} - -/// \overload -template<class BidirectionalRange, class BinaryPredicate> -inline const BidirectionalRange& inplace_merge(const BidirectionalRange& rng, - BOOST_DEDUCED_TYPENAME boost::range_iterator<const BidirectionalRange>::type middle, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> )); - std::inplace_merge(boost::begin(rng), middle, boost::end(rng), pred); - return rng; -} - - } // namespace range - using range::inplace_merge; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/lexicographical_compare.hpp b/contrib/restricted/boost/boost/range/algorithm/lexicographical_compare.hpp deleted file mode 100644 index c6e4bc8ef4..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/lexicographical_compare.hpp +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 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_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function lexicographic_compare -/// -/// range-based version of the lexicographic_compare std algorithm -/// -/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept -/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept -template<class SinglePassRange1, class SinglePassRange2> -inline bool lexicographical_compare(const SinglePassRange1& rng1, - const SinglePassRange2& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - return std::lexicographical_compare( - boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2)); -} - -/// \overload -template<class SinglePassRange1, class SinglePassRange2, - class BinaryPredicate> -inline bool lexicographical_compare(const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - return std::lexicographical_compare( - boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), pred); -} - - } // namespace range - using range::lexicographical_compare; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/lower_bound.hpp b/contrib/restricted/boost/boost/range/algorithm/lower_bound.hpp deleted file mode 100644 index cb5e639239..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/lower_bound.hpp +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 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_ALGORITHM_LOWER_BOUND_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_LOWER_BOUND_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/detail/range_return.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function lower_bound -/// -/// range-based version of the lower_bound std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -template< class ForwardRange, class Value > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<ForwardRange>, - BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type ->::type -lower_bound( ForwardRange& rng, Value val ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return std::lower_bound(boost::begin(rng), boost::end(rng), val); -} - -/// \overload -template< class ForwardRange, class Value > -inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type -lower_bound( const ForwardRange& rng, Value val ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::lower_bound(boost::begin(rng), boost::end(rng), val); -} - -/// \overload -template< class ForwardRange, class Value, class SortPredicate > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<ForwardRange>, - BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type ->::type -lower_bound( ForwardRange& rng, Value val, SortPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred); -} - -/// \overload -template< class ForwardRange, class Value, class SortPredicate > -inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type -lower_bound( const ForwardRange& rng, Value val, SortPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred); -} - -/// \overload -template< range_return_value re, class ForwardRange, class Value > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<ForwardRange>, - BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type ->::type -lower_bound( ForwardRange& rng, Value val ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return range_return<ForwardRange,re>:: - pack(std::lower_bound(boost::begin(rng), boost::end(rng), val), - rng); -} - -/// \overload -template< range_return_value re, class ForwardRange, class Value > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type -lower_bound( const ForwardRange& rng, Value val ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return range_return<const ForwardRange,re>:: - pack(std::lower_bound(boost::begin(rng), boost::end(rng), val), - rng); -} - -/// \overload -template< range_return_value re, class ForwardRange, class Value, class SortPredicate > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<ForwardRange>, - BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type ->::type -lower_bound( ForwardRange& rng, Value val, SortPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return range_return<ForwardRange,re>:: - pack(std::lower_bound(boost::begin(rng), boost::end(rng), val, pred), - rng); -} - -/// \overload -template< range_return_value re, class ForwardRange, class Value, class SortPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type -lower_bound( const ForwardRange& rng, Value val, SortPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return range_return<const ForwardRange,re>:: - pack(std::lower_bound(boost::begin(rng), boost::end(rng), val, pred), - rng); -} - - } // namespace range - using range::lower_bound; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/max_element.hpp b/contrib/restricted/boost/boost/range/algorithm/max_element.hpp deleted file mode 100644 index a0c1ffd8a0..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/max_element.hpp +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 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_ALGORITHM_MAX_ELEMENT_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_MAX_ELEMENT_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/detail/range_return.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function max_element -/// -/// range-based version of the max_element std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template<class ForwardRange> -inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type -max_element(ForwardRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return std::max_element(boost::begin(rng), boost::end(rng)); -} - -/// \overload -template<class ForwardRange> -inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type -max_element(const ForwardRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::max_element(boost::begin(rng), boost::end(rng)); -} - -/// \overload -template<class ForwardRange, class BinaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type -max_element(ForwardRange& rng, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return std::max_element(boost::begin(rng), boost::end(rng), pred); -} - -/// \overload -template<class ForwardRange, class BinaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type -max_element(const ForwardRange& rng, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::max_element(boost::begin(rng), boost::end(rng), pred); -} - -// range_return overloads - -/// \overload -template<range_return_value re, class ForwardRange> -inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type -max_element(ForwardRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return range_return<ForwardRange,re>::pack( - std::max_element(boost::begin(rng), boost::end(rng)), - rng); -} - -/// \overload -template<range_return_value re, class ForwardRange> -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type -max_element(const ForwardRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return range_return<const ForwardRange,re>::pack( - std::max_element(boost::begin(rng), boost::end(rng)), - rng); -} - -/// \overload -template<range_return_value re, class ForwardRange, class BinaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type -max_element(ForwardRange& rng, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return range_return<ForwardRange,re>::pack( - std::max_element(boost::begin(rng), boost::end(rng), pred), - rng); -} - -/// \overload -template<range_return_value re, class ForwardRange, class BinaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type -max_element(const ForwardRange& rng, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return range_return<const ForwardRange,re>::pack( - std::max_element(boost::begin(rng), boost::end(rng), pred), - rng); -} - - } // namespace range - using range::max_element; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/merge.hpp b/contrib/restricted/boost/boost/range/algorithm/merge.hpp deleted file mode 100644 index c81b8c7847..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/merge.hpp +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 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_ALGORITHM_MERGE_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_MERGE_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function merge -/// -/// range-based version of the merge std algorithm -/// -/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept -/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -/// -template<class SinglePassRange1, class SinglePassRange2, - class OutputIterator> -inline OutputIterator merge(const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - OutputIterator out) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - return std::merge(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), out); -} - -/// \overload -template<class SinglePassRange1, class SinglePassRange2, - class OutputIterator, class BinaryPredicate> -inline OutputIterator merge(const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - OutputIterator out, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - return std::merge(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), out, pred); -} - - } // namespace range - using range::merge; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/min_element.hpp b/contrib/restricted/boost/boost/range/algorithm/min_element.hpp deleted file mode 100644 index c966b1e522..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/min_element.hpp +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 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_ALGORITHM_MIN_ELEMENT_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_MIN_ELEMENT_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/detail/range_return.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function min_element -/// -/// range-based version of the min_element std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template<class ForwardRange> -inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type -min_element(ForwardRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return std::min_element(boost::begin(rng), boost::end(rng)); -} - -/// \overload -template<class ForwardRange> -inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type -min_element(const ForwardRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::min_element(boost::begin(rng), boost::end(rng)); -} - -/// \overload -template<class ForwardRange, class BinaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type -min_element(ForwardRange& rng, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return std::min_element(boost::begin(rng), boost::end(rng), pred); -} - -/// \overload -template<class ForwardRange, class BinaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type -min_element(const ForwardRange& rng, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::min_element(boost::begin(rng), boost::end(rng), pred); -} - -// range_return overloads - -/// \overload -template<range_return_value re, class ForwardRange> -inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type -min_element(ForwardRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return range_return<ForwardRange,re>::pack( - std::min_element(boost::begin(rng), boost::end(rng)), - rng); -} - -/// \overload -template<range_return_value re, class ForwardRange> -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type -min_element(const ForwardRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return range_return<const ForwardRange,re>::pack( - std::min_element(boost::begin(rng), boost::end(rng)), - rng); -} - -/// \overload -template<range_return_value re, class ForwardRange, class BinaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type -min_element(ForwardRange& rng, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return range_return<ForwardRange,re>::pack( - std::min_element(boost::begin(rng), boost::end(rng), pred), - rng); -} - -/// \overload -template<range_return_value re, class ForwardRange, class BinaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type -min_element(const ForwardRange& rng, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return range_return<const ForwardRange,re>::pack( - std::min_element(boost::begin(rng), boost::end(rng), pred), - rng); -} - - } // namespace range - using range::min_element; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/mismatch.hpp b/contrib/restricted/boost/boost/range/algorithm/mismatch.hpp deleted file mode 100644 index 2819c333fe..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/mismatch.hpp +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright 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_ALGORITHM_MISMATCH_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_MISMATCH_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/difference_type.hpp> -#include <algorithm> - -namespace boost -{ - namespace range_detail - { - template< class SinglePassTraversalReadableIterator1, - class SinglePassTraversalReadableIterator2 > - inline std::pair<SinglePassTraversalReadableIterator1, - SinglePassTraversalReadableIterator2> - mismatch_impl(SinglePassTraversalReadableIterator1 first1, - SinglePassTraversalReadableIterator1 last1, - SinglePassTraversalReadableIterator2 first2, - SinglePassTraversalReadableIterator2 last2) - { - while (first1 != last1 && first2 != last2 && *first1 == *first2) - { - ++first1; - ++first2; - } - return std::pair<SinglePassTraversalReadableIterator1, - SinglePassTraversalReadableIterator2>(first1, first2); - } - - template< class SinglePassTraversalReadableIterator1, - class SinglePassTraversalReadableIterator2, - class BinaryPredicate > - inline std::pair<SinglePassTraversalReadableIterator1, - SinglePassTraversalReadableIterator2> - mismatch_impl(SinglePassTraversalReadableIterator1 first1, - SinglePassTraversalReadableIterator1 last1, - SinglePassTraversalReadableIterator2 first2, - SinglePassTraversalReadableIterator2 last2, - BinaryPredicate pred) - { - while (first1 != last1 && first2 != last2 && pred(*first1, *first2)) - { - ++first1; - ++first2; - } - return std::pair<SinglePassTraversalReadableIterator1, - SinglePassTraversalReadableIterator2>(first1, first2); - } - } // namespace range_detail - - namespace range - { -/// \brief template function mismatch -/// -/// range-based version of the mismatch std algorithm -/// -/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept -/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template< class SinglePassRange1, class SinglePassRange2 > -inline std::pair< - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type, - BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type > -mismatch(SinglePassRange1& rng1, const SinglePassRange2 & rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - - return ::boost::range_detail::mismatch_impl( - ::boost::begin(rng1), ::boost::end(rng1), - ::boost::begin(rng2), ::boost::end(rng2)); -} - -/// \overload -template< class SinglePassRange1, class SinglePassRange2 > -inline std::pair< - BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type, - BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type > -mismatch(const SinglePassRange1& rng1, const SinglePassRange2& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - - return ::boost::range_detail::mismatch_impl( - ::boost::begin(rng1), ::boost::end(rng1), - ::boost::begin(rng2), ::boost::end(rng2)); -} - -/// \overload -template< class SinglePassRange1, class SinglePassRange2 > -inline std::pair< - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type, - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type > -mismatch(SinglePassRange1& rng1, SinglePassRange2 & rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> )); - - return ::boost::range_detail::mismatch_impl( - ::boost::begin(rng1), ::boost::end(rng1), - ::boost::begin(rng2), ::boost::end(rng2)); -} - -/// \overload -template< class SinglePassRange1, class SinglePassRange2 > -inline std::pair< - BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type, - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type > -mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> )); - - return ::boost::range_detail::mismatch_impl( - ::boost::begin(rng1), ::boost::end(rng1), - ::boost::begin(rng2), ::boost::end(rng2)); -} - - -/// \overload -template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate > -inline std::pair< - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type, - BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type > -mismatch(SinglePassRange1& rng1, const SinglePassRange2& rng2, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - - return ::boost::range_detail::mismatch_impl( - ::boost::begin(rng1), ::boost::end(rng1), - ::boost::begin(rng2), ::boost::end(rng2), pred); -} - -/// \overload -template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate > -inline std::pair< - BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type, - BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type > -mismatch(const SinglePassRange1& rng1, const SinglePassRange2& rng2, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - - return ::boost::range_detail::mismatch_impl( - ::boost::begin(rng1), ::boost::end(rng1), - ::boost::begin(rng2), ::boost::end(rng2), pred); -} - -/// \overload -template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate > -inline std::pair< - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type, - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type > -mismatch(SinglePassRange1& rng1, SinglePassRange2& rng2, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> )); - - return ::boost::range_detail::mismatch_impl( - ::boost::begin(rng1), ::boost::end(rng1), - ::boost::begin(rng2), ::boost::end(rng2), pred); -} - -/// \overload -template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate > -inline std::pair< - BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type, - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type > -mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> )); - - return ::boost::range_detail::mismatch_impl( - ::boost::begin(rng1), ::boost::end(rng1), - ::boost::begin(rng2), ::boost::end(rng2), pred); -} - - } // namespace range - using range::mismatch; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/nth_element.hpp b/contrib/restricted/boost/boost/range/algorithm/nth_element.hpp deleted file mode 100644 index a605595c02..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/nth_element.hpp +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 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_ALGORITHM_NTH_ELEMENT_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_NTH_ELEMENT_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function nth_element -/// -/// range-based version of the nth_element std algorithm -/// -/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template<class RandomAccessRange> -inline RandomAccessRange& nth_element(RandomAccessRange& rng, - BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type nth) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::nth_element(boost::begin(rng), nth, boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange> -inline const RandomAccessRange& nth_element(const RandomAccessRange& rng, - BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type nth) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::nth_element(boost::begin(rng), nth, boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange, class BinaryPredicate> -inline RandomAccessRange& nth_element(RandomAccessRange& rng, - BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type nth, - BinaryPredicate sort_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::nth_element(boost::begin(rng), nth, boost::end(rng), sort_pred); - return rng; -} - -/// \overload -template<class RandomAccessRange, class BinaryPredicate> -inline const RandomAccessRange& nth_element(const RandomAccessRange& rng, - BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type nth, - BinaryPredicate sort_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::nth_element(boost::begin(rng), nth, boost::end(rng), sort_pred); - return rng; -} - - } // namespace range - using range::nth_element; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/partial_sort.hpp b/contrib/restricted/boost/boost/range/algorithm/partial_sort.hpp deleted file mode 100644 index d7044cd683..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/partial_sort.hpp +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 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_ALGORITHM_PARTIAL_SORT_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_PARTIAL_SORT_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function partial_sort -/// -/// range-based version of the partial_sort std algorithm -/// -/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template<class RandomAccessRange> -inline RandomAccessRange& partial_sort(RandomAccessRange& rng, - BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type middle) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::partial_sort(boost::begin(rng), middle, boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange> -inline const RandomAccessRange& partial_sort(const RandomAccessRange& rng, - BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type middle) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::partial_sort(boost::begin(rng), middle, boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange, class BinaryPredicate> -inline RandomAccessRange& partial_sort(RandomAccessRange& rng, - BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type middle, - BinaryPredicate sort_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::partial_sort(boost::begin(rng), middle, boost::end(rng), - sort_pred); - return rng; -} - -/// \overload -template<class RandomAccessRange, class BinaryPredicate> -inline const RandomAccessRange& partial_sort(const RandomAccessRange& rng, - BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type middle, - BinaryPredicate sort_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::partial_sort(boost::begin(rng), middle, boost::end(rng), - sort_pred); - return rng; -} - - } // namespace range - using range::partial_sort; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/partial_sort_copy.hpp b/contrib/restricted/boost/boost/range/algorithm/partial_sort_copy.hpp deleted file mode 100644 index 912938904b..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/partial_sort_copy.hpp +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 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_ALGORITHM_PARTIAL_SORT_COPY_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_PARTIAL_SORT_COPY_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/value_type.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function partial_sort_copy -/// -/// range-based version of the partial_sort_copy std algorithm -/// -/// \pre SinglePassRange is a model of the SinglePassRangeConcept -/// \pre RandomAccessRange is a model of the Mutable_RandomAccessRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template<class SinglePassRange, class RandomAccessRange> -inline BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type -partial_sort_copy(const SinglePassRange& rng1, RandomAccessRange& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<const SinglePassRange>)); - - return std::partial_sort_copy(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2)); -} - -/// \overload -template<class SinglePassRange, class RandomAccessRange> -inline BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type -partial_sort_copy(const SinglePassRange& rng1, const RandomAccessRange& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<const SinglePassRange>)); - - return std::partial_sort_copy(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2)); -} - -/// \overload -template<class SinglePassRange, class RandomAccessRange, - class BinaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type -partial_sort_copy(const SinglePassRange& rng1, RandomAccessRange& rng2, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<const SinglePassRange>)); - - return std::partial_sort_copy(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), pred); -} - -/// \overload -template<class SinglePassRange, class RandomAccessRange, - class BinaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type -partial_sort_copy(const SinglePassRange& rng1, const RandomAccessRange& rng2, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<const SinglePassRange>)); - - return std::partial_sort_copy(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), pred); -} - - } // namespace range - using range::partial_sort_copy; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/partition.hpp b/contrib/restricted/boost/boost/range/algorithm/partition.hpp deleted file mode 100644 index b814a2489e..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/partition.hpp +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 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_ALGORITHM_PARTITION__HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_PARTITION__HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/detail/range_return.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function partition -/// -/// range-based version of the partition std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -template<class ForwardRange, class UnaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type -partition(ForwardRange& rng, UnaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return std::partition(boost::begin(rng),boost::end(rng),pred); -} - -/// \overload -template<class ForwardRange, class UnaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type -partition(const ForwardRange& rng, UnaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::partition(boost::begin(rng),boost::end(rng),pred); -} - -// range_return overloads - -/// \overload -template< range_return_value re, class ForwardRange, - class UnaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type -partition(ForwardRange& rng, UnaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return boost::range_return<ForwardRange,re>:: - pack(std::partition(boost::begin(rng), boost::end(rng), pred), rng); -} - -/// \overload -template< range_return_value re, class ForwardRange, - class UnaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type -partition(const ForwardRange& rng, UnaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return boost::range_return<const ForwardRange,re>:: - pack(std::partition(boost::begin(rng), boost::end(rng), pred), rng); -} - - } // namespace range - using range::partition; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/permutation.hpp b/contrib/restricted/boost/boost/range/algorithm/permutation.hpp deleted file mode 100644 index 75388cc876..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/permutation.hpp +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 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_ALGORITHM_PERMUTATION_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_PERMUTATION_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function next_permutation -/// -/// range-based version of the next_permutation std algorithm -/// -/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept -/// \pre Compare is a model of the BinaryPredicateConcept -template<class BidirectionalRange> -inline bool next_permutation(BidirectionalRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> )); - return std::next_permutation(boost::begin(rng), boost::end(rng)); -} - -/// \overload -template<class BidirectionalRange> -inline bool next_permutation(const BidirectionalRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> )); - return std::next_permutation(boost::begin(rng), boost::end(rng)); -} - -/// \overload -template<class BidirectionalRange, class Compare> -inline bool next_permutation(BidirectionalRange& rng, Compare comp_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> )); - return std::next_permutation(boost::begin(rng), boost::end(rng), - comp_pred); -} - -/// \overload -template<class BidirectionalRange, class Compare> -inline bool next_permutation(const BidirectionalRange& rng, - Compare comp_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> )); - return std::next_permutation(boost::begin(rng), boost::end(rng), - comp_pred); -} - -/// \brief template function prev_permutation -/// -/// range-based version of the prev_permutation std algorithm -/// -/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept -/// \pre Compare is a model of the BinaryPredicateConcept -template<class BidirectionalRange> -inline bool prev_permutation(BidirectionalRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> )); - return std::prev_permutation(boost::begin(rng), boost::end(rng)); -} - -/// \overload -template<class BidirectionalRange> -inline bool prev_permutation(const BidirectionalRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> )); - return std::prev_permutation(boost::begin(rng), boost::end(rng)); -} - -/// \overload -template<class BidirectionalRange, class Compare> -inline bool prev_permutation(BidirectionalRange& rng, Compare comp_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> )); - return std::prev_permutation(boost::begin(rng), boost::end(rng), - comp_pred); -} - -/// \overload -template<class BidirectionalRange, class Compare> -inline bool prev_permutation(const BidirectionalRange& rng, - Compare comp_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> )); - return std::prev_permutation(boost::begin(rng), boost::end(rng), - comp_pred); -} - - } // namespace range - using range::next_permutation; - using range::prev_permutation; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/random_shuffle.hpp b/contrib/restricted/boost/boost/range/algorithm/random_shuffle.hpp deleted file mode 100644 index 33e98e04be..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/random_shuffle.hpp +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 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_ALGORITHM_RANDOM_SHUFFLE_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_RANDOM_SHUFFLE_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> -#ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE -#include <cstdlib> -#endif - -namespace boost -{ - namespace range - { - - namespace detail - { -#ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE - -// wrap std::rand as UniformRandomBitGenerator -struct wrap_rand -{ - typedef unsigned int result_type; - - static BOOST_CONSTEXPR result_type (min)() - { - return 0; - } - - static BOOST_CONSTEXPR result_type (max)() - { - return RAND_MAX; - } - - result_type operator()() - { - return std::rand(); - } -}; - -template< class RandomIt > -inline void random_shuffle(RandomIt first, RandomIt last) -{ - std::shuffle(first, last, wrap_rand()); -} - -// wrap Generator as UniformRandomBitGenerator -template< class Generator > -struct wrap_generator -{ - typedef unsigned int result_type; - static const int max_arg = ((0u - 1u) >> 2) + 1; - Generator& g; - - wrap_generator(Generator& gen) : g(gen) {} - - static BOOST_CONSTEXPR result_type (min)() - { - return 0; - } - - static BOOST_CONSTEXPR result_type (max)() - { - return max_arg - 1; - } - - result_type operator()() - { - return static_cast<result_type>(g(max_arg)); - } -}; - -template< class RandomIt, class Generator > -inline void random_shuffle(RandomIt first, RandomIt last, Generator& gen) -{ - std::shuffle(first, last, wrap_generator< Generator >(gen)); -} - -#else - -using std::random_shuffle; - -#endif - } // namespace detail - -/// \brief template function random_shuffle -/// -/// range-based version of the random_shuffle std algorithm -/// -/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept -/// \pre Generator is a model of the UnaryFunctionConcept -template<class RandomAccessRange> -inline RandomAccessRange& random_shuffle(RandomAccessRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - detail::random_shuffle(boost::begin(rng), boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange> -inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - detail::random_shuffle(boost::begin(rng), boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange, class Generator> -inline RandomAccessRange& random_shuffle(RandomAccessRange& rng, Generator& gen) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - detail::random_shuffle(boost::begin(rng), boost::end(rng), gen); - return rng; -} - -/// \overload -template<class RandomAccessRange, class Generator> -inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng, Generator& gen) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - detail::random_shuffle(boost::begin(rng), boost::end(rng), gen); - return rng; -} - - } // namespace range - using range::random_shuffle; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/remove.hpp b/contrib/restricted/boost/boost/range/algorithm/remove.hpp deleted file mode 100644 index 699a7cdb6f..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/remove.hpp +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 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_ALGORITHM_REMOVE_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_REMOVE_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/detail/range_return.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function remove -/// -/// range-based version of the remove std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -template< class ForwardRange, class Value > -inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type -remove(ForwardRange& rng, const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return std::remove(boost::begin(rng),boost::end(rng),val); -} - -/// \overload -template< class ForwardRange, class Value > -inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type -remove(const ForwardRange& rng, const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::remove(boost::begin(rng),boost::end(rng),val); -} - -// range_return overloads - -/// \overload -template< range_return_value re, class ForwardRange, class Value > -inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type -remove(ForwardRange& rng, const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return range_return<ForwardRange,re>::pack( - std::remove(boost::begin(rng), boost::end(rng), val), - rng); -} - -/// \overload -template< range_return_value re, class ForwardRange, class Value > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type -remove(const ForwardRange& rng, const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return range_return<const ForwardRange,re>::pack( - std::remove(boost::begin(rng), boost::end(rng), val), - rng); -} - - } // namespace range - using range::remove; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/remove_copy.hpp b/contrib/restricted/boost/boost/range/algorithm/remove_copy.hpp deleted file mode 100644 index b65747ed95..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/remove_copy.hpp +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 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_ALGORITHM_REMOVE_COPY_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_REMOVE_COPY_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function remove_copy -/// -/// range-based version of the remove_copy std algorithm -/// -/// \pre SinglePassRange is a model of the SinglePassRangeConcept -/// \pre OutputIterator is a model of the OutputIteratorConcept -/// \pre Value is a model of the EqualityComparableConcept -/// \pre Objects of type Value can be compared for equality with objects of -/// InputIterator's value type. -template< class SinglePassRange, class OutputIterator, class Value > -inline OutputIterator -remove_copy(const SinglePassRange& rng, OutputIterator out_it, const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> )); - return std::remove_copy(boost::begin(rng), boost::end(rng), out_it, val); -} - - } // namespace range - using range::remove_copy; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/remove_copy_if.hpp b/contrib/restricted/boost/boost/range/algorithm/remove_copy_if.hpp deleted file mode 100644 index 8d9c37befc..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/remove_copy_if.hpp +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 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_ALGORITHM_REMOVE_COPY_IF_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_REMOVE_COPY_IF_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - /// \brief template function remove_copy_if - /// - /// range-based version of the remove_copy_if std algorithm - /// - /// \pre SinglePassRange is a model of the SinglePassRangeConcept - /// \pre OutputIterator is a model of the OutputIteratorConcept - /// \pre Predicate is a model of the PredicateConcept - /// \pre InputIterator's value type is convertible to Predicate's argument type - /// \pre out_it is not an iterator in the range rng - template< class SinglePassRange, class OutputIterator, class Predicate > - inline OutputIterator - remove_copy_if(const SinglePassRange& rng, OutputIterator out_it, Predicate pred) - { - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> )); - return std::remove_copy_if(boost::begin(rng), boost::end(rng), out_it, pred); - } -} - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/remove_if.hpp b/contrib/restricted/boost/boost/range/algorithm/remove_if.hpp deleted file mode 100644 index a965df0d6f..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/remove_if.hpp +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 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_ALGORITHM_REMOVE_IF_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_REMOVE_IF_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/detail/range_return.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function remove_if -/// -/// range-based version of the remove_if std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -/// \pre UnaryPredicate is a model of the UnaryPredicateConcept -template< class ForwardRange, class UnaryPredicate > -inline BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type -remove_if(ForwardRange& rng, UnaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return std::remove_if(boost::begin(rng), boost::end(rng), pred); -} - -/// \overload -template< class ForwardRange, class UnaryPredicate > -inline BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type -remove_if(const ForwardRange& rng, UnaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::remove_if(boost::begin(rng), boost::end(rng), pred); -} - -// range_return overloads - -/// \overload -template< range_return_value re, class ForwardRange, class UnaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type -remove_if(ForwardRange& rng, UnaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return range_return<ForwardRange,re>::pack( - std::remove_if(boost::begin(rng), boost::end(rng), pred), - rng); -} - -/// \overload -template< range_return_value re, class ForwardRange, class UnaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type -remove_if(const ForwardRange& rng, UnaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return range_return<const ForwardRange,re>::pack( - std::remove_if(boost::begin(rng), boost::end(rng), pred), - rng); -} - - } // namespace range - using range::remove_if; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/replace.hpp b/contrib/restricted/boost/boost/range/algorithm/replace.hpp deleted file mode 100644 index 44d3e4ca34..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/replace.hpp +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 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_ALGORITHM_REPLACE_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_REPLACE_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function replace -/// -/// range-based version of the replace std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -template< class ForwardRange, class Value > -inline ForwardRange& -replace(ForwardRange& rng, const Value& what, - const Value& with_what) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - std::replace(boost::begin(rng), boost::end(rng), what, with_what); - return rng; -} - -/// \overload -template< class ForwardRange, class Value > -inline const ForwardRange& -replace(const ForwardRange& rng, const Value& what, - const Value& with_what) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - std::replace(boost::begin(rng), boost::end(rng), what, with_what); - return rng; -} - - } // namespace range - using range::replace; -} // namespace boost; - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/replace_copy.hpp b/contrib/restricted/boost/boost/range/algorithm/replace_copy.hpp deleted file mode 100644 index 0c02005a19..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/replace_copy.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 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_ALGORITHM_REPLACE_COPY_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_REPLACE_COPY_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function replace_copy -/// -/// range-based version of the replace_copy std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -template< class ForwardRange, class OutputIterator, class Value > -inline OutputIterator -replace_copy(const ForwardRange& rng, OutputIterator out_it, const Value& what, - const Value& with_what) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::replace_copy(boost::begin(rng), boost::end(rng), out_it, - what, with_what); -} - - } // namespace range - using range::replace_copy; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/replace_copy_if.hpp b/contrib/restricted/boost/boost/range/algorithm/replace_copy_if.hpp deleted file mode 100644 index d313151208..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/replace_copy_if.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 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_ALGORITHM_REPLACE_COPY_IF_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_REPLACE_COPY_IF_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function replace_copy_if -/// -/// range-based version of the replace_copy_if std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -/// \pre Predicate is a model of the PredicateConcept -/// \pre Value is convertible to Predicate's argument type -/// \pre Value is Assignable -/// \pre Value is convertible to a type in OutputIterator's set of value types. -template< class ForwardRange, class OutputIterator, class Predicate, class Value > -inline OutputIterator -replace_copy_if(const ForwardRange& rng, OutputIterator out_it, Predicate pred, - const Value& with_what) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::replace_copy_if(boost::begin(rng), boost::end(rng), out_it, - pred, with_what); -} - - } // namespace range - using range::replace_copy_if; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/replace_if.hpp b/contrib/restricted/boost/boost/range/algorithm/replace_if.hpp deleted file mode 100644 index 93d5a1f7f3..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/replace_if.hpp +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 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_ALGORITHM_REPLACE_IF_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_REPLACE_IF_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function replace_if -/// -/// range-based version of the replace_if std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -/// \pre UnaryPredicate is a model of the UnaryPredicateConcept -template< class ForwardRange, class UnaryPredicate, class Value > -inline ForwardRange& - replace_if(ForwardRange& rng, UnaryPredicate pred, - const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - std::replace_if(boost::begin(rng), boost::end(rng), pred, val); - return rng; -} - -/// \overload -template< class ForwardRange, class UnaryPredicate, class Value > -inline const ForwardRange& - replace_if(const ForwardRange& rng, UnaryPredicate pred, - const Value& val) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - std::replace_if(boost::begin(rng), boost::end(rng), pred, val); - return rng; -} - - } // namespace range - using range::replace_if; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/reverse.hpp b/contrib/restricted/boost/boost/range/algorithm/reverse.hpp deleted file mode 100644 index 20a7eb1823..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/reverse.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 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_ALGORITHM_REVERSE_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_REVERSE_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/detail/range_return.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function reverse -/// -/// range-based version of the reverse std algorithm -/// -/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept -template<class BidirectionalRange> -inline BidirectionalRange& reverse(BidirectionalRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> )); - std::reverse(boost::begin(rng), boost::end(rng)); - return rng; -} - -/// \overload -template<class BidirectionalRange> -inline const BidirectionalRange& reverse(const BidirectionalRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> )); - std::reverse(boost::begin(rng), boost::end(rng)); - return rng; -} - - } // namespace range - using range::reverse; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/reverse_copy.hpp b/contrib/restricted/boost/boost/range/algorithm/reverse_copy.hpp deleted file mode 100644 index f1990ada13..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/reverse_copy.hpp +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 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_ALGORITHM_REVERSE_COPY_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_REVERSE_COPY_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/iterator/iterator_concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function reverse_copy -/// -/// range-based version of the reverse_copy std algorithm -/// -/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept -template<class BidirectionalRange, class OutputIterator> -inline OutputIterator reverse_copy(const BidirectionalRange& rng, OutputIterator out) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> )); - return std::reverse_copy(boost::begin(rng), boost::end(rng), out); -} - - } // namespace range - using range::reverse_copy; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/rotate.hpp b/contrib/restricted/boost/boost/range/algorithm/rotate.hpp deleted file mode 100644 index ca4b223914..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/rotate.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 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_ALGORITHM_ROTATE_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_ROTATE_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function rotate -/// -/// range-based version of the rotate std algorithm -/// -/// \pre Rng meets the requirements for a Forward range -template<class ForwardRange> -inline ForwardRange& rotate(ForwardRange& rng, - BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type middle) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - std::rotate(boost::begin(rng), middle, boost::end(rng)); - return rng; -} - -/// \overload -template<class ForwardRange> -inline const ForwardRange& rotate(const ForwardRange& rng, - BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type middle) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - std::rotate(boost::begin(rng), middle, boost::end(rng)); - return rng; -} - - } // namespace range - using range::rotate; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/rotate_copy.hpp b/contrib/restricted/boost/boost/range/algorithm/rotate_copy.hpp deleted file mode 100644 index 0409ac5275..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/rotate_copy.hpp +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 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_ALGORITHM_ROTATE_COPY_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_ROTATE_COPY_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/iterator.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - - /// \brief template function rotate - /// - /// range-based version of the rotate std algorithm - /// - /// \pre Rng meets the requirements for a Forward range - template<typename ForwardRange, typename OutputIterator> - inline OutputIterator rotate_copy( - const ForwardRange& rng, - BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type middle, - OutputIterator target - ) - { - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::rotate_copy(boost::begin(rng), middle, boost::end(rng), target); - } - - } // namespace range - using range::rotate_copy; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/search.hpp b/contrib/restricted/boost/boost/range/algorithm/search.hpp deleted file mode 100644 index 28cc6e6216..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/search.hpp +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 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_ALGORITHM_SEARCH_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_SEARCH_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/detail/range_return.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function search -/// -/// range-based version of the search std algorithm -/// -/// \pre ForwardRange1 is a model of the ForwardRangeConcept -/// \pre ForwardRange2 is a model of the ForwardRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template< class ForwardRange1, class ForwardRange2 > -inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange1>::type -search(ForwardRange1& rng1, const ForwardRange2& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - return std::search(boost::begin(rng1),boost::end(rng1), - boost::begin(rng2),boost::end(rng2)); -} - -/// \overload -template< class ForwardRange1, class ForwardRange2 > -inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type -search(const ForwardRange1& rng1, const ForwardRange2& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - return std::search(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2)); -} - -/// \overload -template< class ForwardRange1, class ForwardRange2, class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange1>::type -search(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - return std::search(boost::begin(rng1),boost::end(rng1), - boost::begin(rng2),boost::end(rng2),pred); -} - -/// \overload -template< class ForwardRange1, class ForwardRange2, class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type -search(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - return std::search(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), pred); -} - -// range_return overloads - -/// \overload -template< range_return_value re, class ForwardRange1, class ForwardRange2 > -inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type -search(ForwardRange1& rng1, const ForwardRange2& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - return range_return<ForwardRange1,re>:: - pack(std::search(boost::begin(rng1),boost::end(rng1), - boost::begin(rng2),boost::end(rng2)), - rng1); -} - -/// \overload -template< range_return_value re, class ForwardRange1, class ForwardRange2 > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type -search(const ForwardRange1& rng1, const ForwardRange2& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - return range_return<const ForwardRange1,re>:: - pack(std::search(boost::begin(rng1),boost::end(rng1), - boost::begin(rng2),boost::end(rng2)), - rng1); -} - -/// \overload -template< range_return_value re, class ForwardRange1, class ForwardRange2, - class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type -search(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - return range_return<ForwardRange1,re>:: - pack(std::search(boost::begin(rng1),boost::end(rng1), - boost::begin(rng2),boost::end(rng2),pred), - rng1); -} - -/// \overload -template< range_return_value re, class ForwardRange1, class ForwardRange2, - class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type -search(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> )); - return range_return<const ForwardRange1,re>:: - pack(std::search(boost::begin(rng1),boost::end(rng1), - boost::begin(rng2),boost::end(rng2),pred), - rng1); -} - - } // namespace range - using range::search; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/search_n.hpp b/contrib/restricted/boost/boost/range/algorithm/search_n.hpp deleted file mode 100644 index ccfb27ae53..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/search_n.hpp +++ /dev/null @@ -1,360 +0,0 @@ -// Copyright 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_ALGORITHM_SEARCH_N_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_SEARCH_N_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/detail/range_return.hpp> -#include <boost/range/value_type.hpp> -#include <iterator> -#include <algorithm> - -namespace boost -{ - -namespace range_detail -{ - // Rationale: search_n is implemented rather than delegate to - // the standard library implementation because some standard - // library implementations are broken eg. MSVC. - - // search_n forward iterator version - template<typename ForwardIterator, typename Integer, typename Value> - inline ForwardIterator - search_n_impl(ForwardIterator first, ForwardIterator last, Integer count, - const Value& value, std::forward_iterator_tag) - { - first = std::find(first, last, value); - while (first != last) - { - typename std::iterator_traits<ForwardIterator>::difference_type n = count; - ForwardIterator i = first; - ++i; - while (i != last && n != 1 && *i==value) - { - ++i; - --n; - } - if (n == 1) - return first; - if (i == last) - return last; - first = std::find(++i, last, value); - } - return last; - } - - // search_n random-access iterator version - template<typename RandomAccessIterator, typename Integer, typename Value> - inline RandomAccessIterator - search_n_impl(RandomAccessIterator first, RandomAccessIterator last, - Integer count, const Value& value, - std::random_access_iterator_tag) - { - typedef typename std::iterator_traits<RandomAccessIterator>::difference_type difference_t; - - difference_t tail_size = last - first; - const difference_t pattern_size = count; - - if (tail_size < pattern_size) - return last; - - const difference_t skip_offset = pattern_size - 1; - RandomAccessIterator look_ahead = first + skip_offset; - tail_size -= pattern_size; - - while (1) - { - // look_ahead here is pointing to the last element of the - // next possible match - while (!(*look_ahead == value)) // skip loop... - { - if (tail_size < pattern_size) - return last; // no match - look_ahead += pattern_size; - tail_size -= pattern_size; - } - difference_t remainder = skip_offset; - for (RandomAccessIterator back_track = look_ahead - 1; - *back_track == value; --back_track) - { - if (--remainder == 0) - { - return look_ahead - skip_offset; // matched - } - } - if (remainder > tail_size) - return last; // no match - look_ahead += remainder; - tail_size -= remainder; - } - - return last; - } - - // search_n for forward iterators using a binary predicate - // to determine a match - template<typename ForwardIterator, typename Integer, typename Value, - typename BinaryPredicate> - inline ForwardIterator - search_n_pred_impl(ForwardIterator first, ForwardIterator last, - Integer count, const Value& value, - BinaryPredicate pred, std::forward_iterator_tag) - { - typedef typename std::iterator_traits<ForwardIterator>::difference_type difference_t; - - while (first != last && !static_cast<bool>(pred(*first, value))) - ++first; - - while (first != last) - { - difference_t n = count; - ForwardIterator i = first; - ++i; - while (i != last && n != 1 && static_cast<bool>(pred(*i, value))) - { - ++i; - --n; - } - if (n == 1) - return first; - if (i == last) - return last; - first = ++i; - while (first != last && !static_cast<bool>(pred(*first, value))) - ++first; - } - return last; - } - - // search_n for random-access iterators using a binary predicate - // to determine a match - template<typename RandomAccessIterator, typename Integer, - typename Value, typename BinaryPredicate> - inline RandomAccessIterator - search_n_pred_impl(RandomAccessIterator first, RandomAccessIterator last, - Integer count, const Value& value, - BinaryPredicate pred, std::random_access_iterator_tag) - { - typedef typename std::iterator_traits<RandomAccessIterator>::difference_type difference_t; - - difference_t tail_size = last - first; - const difference_t pattern_size = count; - - if (tail_size < pattern_size) - return last; - - const difference_t skip_offset = pattern_size - 1; - RandomAccessIterator look_ahead = first + skip_offset; - tail_size -= pattern_size; - - while (1) - { - // look_ahead points to the last element of the next - // possible match - while (!static_cast<bool>(pred(*look_ahead, value))) // skip loop - { - if (tail_size < pattern_size) - return last; // no match - look_ahead += pattern_size; - tail_size -= pattern_size; - } - difference_t remainder = skip_offset; - for (RandomAccessIterator back_track = look_ahead - 1; - pred(*back_track, value); --back_track) - { - if (--remainder == 0) - return look_ahead -= skip_offset; // success - } - if (remainder > tail_size) - { - return last; // no match - } - look_ahead += remainder; - tail_size -= remainder; - } - } - - template<typename ForwardIterator, typename Integer, typename Value> - inline ForwardIterator - search_n_impl(ForwardIterator first, ForwardIterator last, - Integer count, const Value& value) - { - BOOST_RANGE_CONCEPT_ASSERT((ForwardIteratorConcept<ForwardIterator>)); - BOOST_RANGE_CONCEPT_ASSERT((EqualityComparableConcept<Value>)); - BOOST_RANGE_CONCEPT_ASSERT((EqualityComparableConcept<typename std::iterator_traits<ForwardIterator>::value_type>)); - //BOOST_RANGE_CONCEPT_ASSERT((EqualityComparableConcept2<typename std::iterator_traits<ForwardIterator>::value_type, Value>)); - - typedef typename std::iterator_traits<ForwardIterator>::iterator_category cat_t; - - if (count <= 0) - return first; - if (count == 1) - return std::find(first, last, value); - return range_detail::search_n_impl(first, last, count, value, cat_t()); - } - - template<typename ForwardIterator, typename Integer, typename Value, - typename BinaryPredicate> - inline ForwardIterator - search_n_pred_impl(ForwardIterator first, ForwardIterator last, - Integer count, const Value& value, - BinaryPredicate pred) - { - BOOST_RANGE_CONCEPT_ASSERT((ForwardIteratorConcept<ForwardIterator>)); - BOOST_RANGE_CONCEPT_ASSERT(( - BinaryPredicateConcept< - BinaryPredicate, - typename std::iterator_traits<ForwardIterator>::value_type, - Value> - )); - - typedef typename std::iterator_traits<ForwardIterator>::iterator_category cat_t; - - if (count <= 0) - return first; - if (count == 1) - { - while (first != last && !static_cast<bool>(pred(*first, value))) - ++first; - return first; - } - return range_detail::search_n_pred_impl(first, last, count, - value, pred, cat_t()); - } -} // namespace range_detail - -namespace range { - -/// \brief template function search -/// -/// range-based version of the search std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -/// \pre Integer is an integral type -/// \pre Value is a model of the EqualityComparableConcept -/// \pre ForwardRange's value type is a model of the EqualityComparableConcept -/// \pre Object's of ForwardRange's value type can be compared for equality with Objects of type Value -template< class ForwardRange, class Integer, class Value > -inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type -search_n(ForwardRange& rng, Integer count, const Value& value) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>)); - return range_detail::search_n_impl(boost::begin(rng),boost::end(rng), count, value); -} - -/// \overload -template< class ForwardRange, class Integer, class Value > -inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type -search_n(const ForwardRange& rng, Integer count, const Value& value) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<const ForwardRange>)); - return range_detail::search_n_impl(boost::begin(rng), boost::end(rng), count, value); -} - -/// \overload -template< class ForwardRange, class Integer, class Value, - class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type -search_n(ForwardRange& rng, Integer count, const Value& value, - BinaryPredicate binary_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>)); - BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate, - BOOST_DEDUCED_TYPENAME range_value<ForwardRange>::type, const Value&>)); - return range_detail::search_n_pred_impl(boost::begin(rng), boost::end(rng), - count, value, binary_pred); -} - -/// \overload -template< class ForwardRange, class Integer, class Value, - class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type -search_n(const ForwardRange& rng, Integer count, const Value& value, - BinaryPredicate binary_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<const ForwardRange>)); - BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate, - BOOST_DEDUCED_TYPENAME range_value<const ForwardRange>::type, const Value&>)); - return range_detail::search_n_pred_impl(boost::begin(rng), boost::end(rng), - count, value, binary_pred); -} - -// range_return overloads - -/// \overload -template< range_return_value re, class ForwardRange, class Integer, - class Value > -inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type -search_n(ForwardRange& rng, Integer count, const Value& value) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>)); - return range_return<ForwardRange,re>:: - pack(range_detail::search_n_impl(boost::begin(rng),boost::end(rng), - count, value), - rng); -} - -/// \overload -template< range_return_value re, class ForwardRange, class Integer, - class Value > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type -search_n(const ForwardRange& rng, Integer count, const Value& value) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<const ForwardRange>)); - return range_return<const ForwardRange,re>:: - pack(range_detail::search_n_impl(boost::begin(rng), boost::end(rng), - count, value), - rng); -} - -/// \overload -template< range_return_value re, class ForwardRange, class Integer, - class Value, class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type -search_n(ForwardRange& rng, Integer count, const Value& value, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>)); - BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate, - BOOST_DEDUCED_TYPENAME range_value<ForwardRange>::type, - const Value&>)); - return range_return<ForwardRange,re>:: - pack(range_detail::search_n_pred_impl(boost::begin(rng), - boost::end(rng), - count, value, pred), - rng); -} - -/// \overload -template< range_return_value re, class ForwardRange, class Integer, - class Value, class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type -search_n(const ForwardRange& rng, Integer count, const Value& value, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<const ForwardRange>)); - BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate, - BOOST_DEDUCED_TYPENAME range_value<const ForwardRange>::type, - const Value&>)); - return range_return<const ForwardRange,re>:: - pack(range_detail::search_n_pred_impl(boost::begin(rng), - boost::end(rng), - count, value, pred), - rng); -} - - } // namespace range - using range::search_n; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/set_algorithm.hpp b/contrib/restricted/boost/boost/range/algorithm/set_algorithm.hpp deleted file mode 100644 index 82ef8ecc15..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/set_algorithm.hpp +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright 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_ALGORITHM_SET_ALGORITHM_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_SET_ALGORITHM_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function includes -/// -/// range-based version of the includes std algorithm -/// -/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept -/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template<class SinglePassRange1, class SinglePassRange2> -inline bool includes(const SinglePassRange1& rng1, - const SinglePassRange2& rng2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - return std::includes(boost::begin(rng1),boost::end(rng1), - boost::begin(rng2),boost::end(rng2)); -} - -/// \overload -template<class SinglePassRange1, class SinglePassRange2, - class BinaryPredicate> -inline bool includes(const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - return std::includes(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), pred); -} - -/// \brief template function set_union -/// -/// range-based version of the set_union std algorithm -/// -/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept -/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template<class SinglePassRange1, class SinglePassRange2, - class OutputIterator> -inline OutputIterator set_union(const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - OutputIterator out) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - return std::set_union(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), out); -} - -/// \overload -template<class SinglePassRange1, class SinglePassRange2, - class OutputIterator, class BinaryPredicate> -inline OutputIterator set_union(const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - OutputIterator out, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - return std::set_union(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), out, pred); -} - -/// \brief template function set_intersection -/// -/// range-based version of the set_intersection std algorithm -/// -/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept -/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template<class SinglePassRange1, class SinglePassRange2, - class OutputIterator> -inline OutputIterator set_intersection(const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - OutputIterator out) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - return std::set_intersection(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), out); -} - -/// \overload -template<class SinglePassRange1, class SinglePassRange2, - class OutputIterator, class BinaryPredicate> -inline OutputIterator set_intersection(const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - OutputIterator out, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - return std::set_intersection(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), - out, pred); -} - -/// \brief template function set_difference -/// -/// range-based version of the set_difference std algorithm -/// -/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept -/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template<class SinglePassRange1, class SinglePassRange2, - class OutputIterator> -inline OutputIterator set_difference(const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - OutputIterator out) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - return std::set_difference(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), out); -} - -/// \overload -template<class SinglePassRange1, class SinglePassRange2, - class OutputIterator, class BinaryPredicate> -inline OutputIterator set_difference(const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - OutputIterator out, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - return std::set_difference( - boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), out, pred); -} - -/// \brief template function set_symmetric_difference -/// -/// range-based version of the set_symmetric_difference std algorithm -/// -/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept -/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template<class SinglePassRange1, class SinglePassRange2, - class OutputIterator> -inline OutputIterator -set_symmetric_difference(const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - OutputIterator out) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - return std::set_symmetric_difference(boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), out); -} - -/// \overload -template<class SinglePassRange1, class SinglePassRange2, - class OutputIterator, class BinaryPredicate> -inline OutputIterator -set_symmetric_difference(const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - OutputIterator out, - BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - return std::set_symmetric_difference( - boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), out, pred); -} - - } // namespace range - using range::includes; - using range::set_union; - using range::set_intersection; - using range::set_difference; - using range::set_symmetric_difference; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/sort.hpp b/contrib/restricted/boost/boost/range/algorithm/sort.hpp deleted file mode 100644 index 45eecde7f8..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/sort.hpp +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 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_ALGORITHM_SORT_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_SORT_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function sort -/// -/// range-based version of the sort std algorithm -/// -/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template<class RandomAccessRange> -inline RandomAccessRange& sort(RandomAccessRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::sort(boost::begin(rng), boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange> -inline const RandomAccessRange& sort(const RandomAccessRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::sort(boost::begin(rng), boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange, class BinaryPredicate> -inline RandomAccessRange& sort(RandomAccessRange& rng, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::sort(boost::begin(rng), boost::end(rng), pred); - return rng; -} - -/// \overload -template<class RandomAccessRange, class BinaryPredicate> -inline const RandomAccessRange& sort(const RandomAccessRange& rng, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::sort(boost::begin(rng), boost::end(rng), pred); - return rng; -} - - } // namespace range - using range::sort; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/stable_partition.hpp b/contrib/restricted/boost/boost/range/algorithm/stable_partition.hpp deleted file mode 100644 index 24febfc885..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/stable_partition.hpp +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 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_ALGORITHM_STABLE_PARTITION_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_STABLE_PARTITION_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/detail/range_return.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function stable_partition -/// -/// range-based version of the stable_partition std algorithm -/// -/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept -/// \pre UnaryPredicate is a model of the UnaryPredicateConcept -template<class BidirectionalRange, class UnaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type -stable_partition(BidirectionalRange& rng, UnaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> )); - return std::stable_partition(boost::begin(rng), boost::end(rng), pred); -} - -/// \overload -template<class BidirectionalRange, class UnaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_iterator<const BidirectionalRange>::type -stable_partition(const BidirectionalRange& rng, UnaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> )); - return std::stable_partition(boost::begin(rng),boost::end(rng),pred); -} - -// range_return overloads -template<range_return_value re, class BidirectionalRange, class UnaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_return<BidirectionalRange,re>::type -stable_partition(BidirectionalRange& rng, UnaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> )); - return range_return<BidirectionalRange,re>::pack( - std::stable_partition(boost::begin(rng), boost::end(rng), pred), - rng); -} - -/// \overload -template<range_return_value re, class BidirectionalRange, class UnaryPredicate> -inline BOOST_DEDUCED_TYPENAME range_return<const BidirectionalRange,re>::type -stable_partition(const BidirectionalRange& rng, UnaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> )); - return range_return<const BidirectionalRange,re>::pack( - std::stable_partition(boost::begin(rng),boost::end(rng),pred), - rng); -} - - } // namespace range - using range::stable_partition; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/stable_sort.hpp b/contrib/restricted/boost/boost/range/algorithm/stable_sort.hpp deleted file mode 100644 index d18da4de0f..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/stable_sort.hpp +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 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_ALGORITHM_STABLE_SORT_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_STABLE_SORT_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function stable_sort -/// -/// range-based version of the stable_sort std algorithm -/// -/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template<class RandomAccessRange> -inline RandomAccessRange& stable_sort(RandomAccessRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::stable_sort(boost::begin(rng), boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange> -inline const RandomAccessRange& stable_sort(const RandomAccessRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::stable_sort(boost::begin(rng), boost::end(rng)); - return rng; -} - -/// \overload -template<class RandomAccessRange, class BinaryPredicate> -inline RandomAccessRange& stable_sort(RandomAccessRange& rng, BinaryPredicate sort_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> )); - std::stable_sort(boost::begin(rng), boost::end(rng), sort_pred); - return rng; -} - -/// \overload -template<class RandomAccessRange, class BinaryPredicate> -inline const RandomAccessRange& stable_sort(const RandomAccessRange& rng, BinaryPredicate sort_pred) -{ - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> )); - std::stable_sort(boost::begin(rng), boost::end(rng), sort_pred); - return rng; -} - - } // namespace range - using range::stable_sort; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/swap_ranges.hpp b/contrib/restricted/boost/boost/range/algorithm/swap_ranges.hpp deleted file mode 100644 index 52b0162e0e..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/swap_ranges.hpp +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 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_ALGORITHM_SWAP_RANGES_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_SWAP_RANGES_HPP_INCLUDED - -#include <boost/assert.hpp> -#include <boost/concept_check.hpp> -#include <boost/iterator/iterator_categories.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/iterator.hpp> -#include <algorithm> - -namespace boost -{ - namespace range_detail - { - template<class Iterator1, class Iterator2> - void swap_ranges_impl(Iterator1 it1, Iterator1 last1, - Iterator2 it2, Iterator2 last2, - single_pass_traversal_tag, - single_pass_traversal_tag) - { - ignore_unused_variable_warning(last2); - for (; it1 != last1; ++it1, ++it2) - { - BOOST_ASSERT( it2 != last2 ); - std::iter_swap(it1, it2); - } - } - - template<class Iterator1, class Iterator2> - void swap_ranges_impl(Iterator1 it1, Iterator1 last1, - Iterator2 it2, Iterator2 last2, - random_access_traversal_tag, - random_access_traversal_tag) - { - ignore_unused_variable_warning(last2); - BOOST_ASSERT( last2 - it2 >= last1 - it1 ); - std::swap_ranges(it1, last1, it2); - } - - template<class Iterator1, class Iterator2> - void swap_ranges_impl(Iterator1 first1, Iterator1 last1, - Iterator2 first2, Iterator2 last2) - { - swap_ranges_impl(first1, last1, first2, last2, - BOOST_DEDUCED_TYPENAME iterator_traversal<Iterator1>::type(), - BOOST_DEDUCED_TYPENAME iterator_traversal<Iterator2>::type()); - } - } // namespace range_detail - - namespace range - { - -/// \brief template function swap_ranges -/// -/// range-based version of the swap_ranges std algorithm -/// -/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept -/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept -template< class SinglePassRange1, class SinglePassRange2 > -inline SinglePassRange2& -swap_ranges(SinglePassRange1& range1, SinglePassRange2& range2) -{ - BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange1>)); - BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange2>)); - - boost::range_detail::swap_ranges_impl( - boost::begin(range1), boost::end(range1), - boost::begin(range2), boost::end(range2)); - - return range2; -} - -/// \overload -template< class SinglePassRange1, class SinglePassRange2 > -inline SinglePassRange2& -swap_ranges(const SinglePassRange1& range1, SinglePassRange2& range2) -{ - BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<const SinglePassRange1>)); - BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange2>)); - - boost::range_detail::swap_ranges_impl( - boost::begin(range1), boost::end(range1), - boost::begin(range2), boost::end(range2)); - - return range2; -} - -/// \overload -template< class SinglePassRange1, class SinglePassRange2 > -inline const SinglePassRange2& -swap_ranges(SinglePassRange1& range1, const SinglePassRange2& range2) -{ - BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange1>)); - BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<const SinglePassRange2>)); - - boost::range_detail::swap_ranges_impl( - boost::begin(range1), boost::end(range1), - boost::begin(range2), boost::end(range2)); - - return range2; -} - -/// \overload -template< class SinglePassRange1, class SinglePassRange2 > -inline const SinglePassRange2& -swap_ranges(const SinglePassRange1& range1, const SinglePassRange2& range2) -{ - BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<const SinglePassRange1>)); - BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<const SinglePassRange2>)); - - boost::range_detail::swap_ranges_impl( - boost::begin(range1), boost::end(range1), - boost::begin(range2), boost::end(range2)); - - return range2; -} - - } // namespace range - using range::swap_ranges; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/transform.hpp b/contrib/restricted/boost/boost/range/algorithm/transform.hpp deleted file mode 100644 index ade147a94c..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/transform.hpp +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 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_ALGORITHM_TRANSFORM_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_TRANSFORM_HPP_INCLUDED - -#include <boost/assert.hpp> -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - - /// \brief template function transform - /// - /// range-based version of the transform std algorithm - /// - /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept - /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept - /// \pre OutputIterator is a model of the OutputIteratorConcept - /// \pre UnaryOperation is a model of the UnaryFunctionConcept - /// \pre BinaryOperation is a model of the BinaryFunctionConcept - template< class SinglePassRange1, - class OutputIterator, - class UnaryOperation > - inline OutputIterator - transform(const SinglePassRange1& rng, - OutputIterator out, - UnaryOperation fun) - { - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - return std::transform(boost::begin(rng),boost::end(rng),out,fun); - } - - } // namespace range - - namespace range_detail - { - template< class SinglePassTraversalReadableIterator1, - class SinglePassTraversalReadableIterator2, - class OutputIterator, - class BinaryFunction > - inline OutputIterator - transform_impl(SinglePassTraversalReadableIterator1 first1, - SinglePassTraversalReadableIterator1 last1, - SinglePassTraversalReadableIterator2 first2, - SinglePassTraversalReadableIterator2 last2, - OutputIterator out, - BinaryFunction fn) - { - for (; first1 != last1 && first2 != last2; ++first1, ++first2) - { - *out = fn(*first1, *first2); - ++out; - } - return out; - } - } - - namespace range - { - - /// \overload - template< class SinglePassRange1, - class SinglePassRange2, - class OutputIterator, - class BinaryOperation > - inline OutputIterator - transform(const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - OutputIterator out, - BinaryOperation fun) - { - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - return boost::range_detail::transform_impl( - boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), boost::end(rng2), - out, fun); - } - - } // namespace range - using range::transform; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/unique.hpp b/contrib/restricted/boost/boost/range/algorithm/unique.hpp deleted file mode 100644 index 8017a837ce..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/unique.hpp +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 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_ALGORITHM_UNIQUE_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_UNIQUE_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/detail/range_return.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function unique -/// -/// range-based version of the unique std algorithm -/// -/// \pre Rng meets the requirements for a Forward range -template< range_return_value re, class ForwardRange > -inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type -unique( ForwardRange& rng ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return range_return<ForwardRange,re>:: - pack( std::unique( boost::begin(rng), - boost::end(rng)), rng ); -} - -/// \overload -template< range_return_value re, class ForwardRange > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type -unique( const ForwardRange& rng ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return range_return<const ForwardRange,re>:: - pack( std::unique( boost::begin(rng), - boost::end(rng)), rng ); -} -/// \overload -template< range_return_value re, class ForwardRange, class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type -unique( ForwardRange& rng, BinaryPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return range_return<ForwardRange,re>:: - pack(std::unique(boost::begin(rng), boost::end(rng), pred), - rng); -} -/// \overload -template< range_return_value re, class ForwardRange, class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type -unique( const ForwardRange& rng, BinaryPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return range_return<const ForwardRange,re>:: - pack(std::unique(boost::begin(rng), boost::end(rng), pred), - rng); -} - -/// \overload -template< class ForwardRange > -inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange, return_begin_found>::type -unique( ForwardRange& rng ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return ::boost::range::unique<return_begin_found>(rng); -} -/// \overload -template< class ForwardRange > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange, return_begin_found>::type -unique( const ForwardRange& rng ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return ::boost::range::unique<return_begin_found>(rng); -} -/// \overload -template< class ForwardRange, class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange, return_begin_found>::type -unique( ForwardRange& rng, BinaryPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return ::boost::range::unique<return_begin_found>(rng, pred); -} -/// \overload -template< class ForwardRange, class BinaryPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange, return_begin_found>::type -unique( const ForwardRange& rng, BinaryPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return ::boost::range::unique<return_begin_found>(rng, pred); -} - - } // namespace range - using range::unique; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/unique_copy.hpp b/contrib/restricted/boost/boost/range/algorithm/unique_copy.hpp deleted file mode 100644 index 0682d747ea..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/unique_copy.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 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_ALGORITHM_UNIQUE_COPY_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_UNIQUE_COPY_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function unique_copy -/// -/// range-based version of the unique_copy std algorithm -/// -/// \pre SinglePassRange is a model of the SinglePassRangeConcept -/// \pre OutputIterator is a model of the OutputIteratorConcept -/// \pre BinaryPredicate is a model of the BinaryPredicateConcept -template< class SinglePassRange, class OutputIterator > -inline OutputIterator -unique_copy( const SinglePassRange& rng, OutputIterator out_it ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> )); - return std::unique_copy(boost::begin(rng), boost::end(rng), out_it); -} -/// \overload -template< class SinglePassRange, class OutputIterator, class BinaryPredicate > -inline OutputIterator -unique_copy( const SinglePassRange& rng, OutputIterator out_it, - BinaryPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> )); - return std::unique_copy(boost::begin(rng), boost::end(rng), out_it, pred); -} - - } // namespace range - using range::unique_copy; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm/upper_bound.hpp b/contrib/restricted/boost/boost/range/algorithm/upper_bound.hpp deleted file mode 100644 index c8acbc66a7..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm/upper_bound.hpp +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 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_ALGORITHM_UPPER_BOUND_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_UPPER_BOUND_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/detail/range_return.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function upper_bound -/// -/// range-based version of the upper_bound std algorithm -/// -/// \pre ForwardRange is a model of the ForwardRangeConcept -template< class ForwardRange, class Value > -inline -BOOST_DEDUCED_TYPENAME disable_if< - is_const<ForwardRange>, - BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type ->::type -upper_bound( ForwardRange& rng, Value val ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return std::upper_bound(boost::begin(rng), boost::end(rng), val); -} - -/// \overload -template< class ForwardRange, class Value > -BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type -upper_bound( const ForwardRange& rng, Value val ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::upper_bound(boost::begin(rng), boost::end(rng), val); -} - -/// \overload -template< class ForwardRange, class Value, class SortPredicate > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<ForwardRange>, - BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type ->::type -upper_bound( ForwardRange& rng, Value val, SortPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred); -} - -/// \overload -template< class ForwardRange, class Value, class SortPredicate > -inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type -upper_bound( const ForwardRange& rng, Value val, SortPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred); -} - -/// \overload -template< range_return_value re, class ForwardRange, class Value > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<ForwardRange>, - BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type ->::type -upper_bound( ForwardRange& rng, Value val ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return range_return<ForwardRange,re>:: - pack(std::upper_bound(boost::begin(rng), boost::end(rng), val), - rng); -} - -/// \overload -template< range_return_value re, class ForwardRange, class Value > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type -upper_bound( const ForwardRange& rng, Value val ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return range_return<const ForwardRange,re>:: - pack(std::upper_bound(boost::begin(rng), boost::end(rng), val), - rng); -} - -/// \overload -template< range_return_value re, class ForwardRange, class Value, - class SortPredicate > -inline BOOST_DEDUCED_TYPENAME disable_if< - is_const<ForwardRange>, - BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type ->::type -upper_bound( ForwardRange& rng, Value val, SortPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - return range_return<ForwardRange,re>:: - pack(std::upper_bound(boost::begin(rng), boost::end(rng), val, pred), - rng); -} - -/// \overload -template< range_return_value re, class ForwardRange, class Value, - class SortPredicate > -inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type -upper_bound( const ForwardRange& rng, Value val, SortPredicate pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - return range_return<const ForwardRange,re>:: - pack(std::upper_bound(boost::begin(rng), boost::end(rng), val, pred), - rng); -} - - } // namespace range - using range::upper_bound; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm_ext.hpp b/contrib/restricted/boost/boost/range/algorithm_ext.hpp deleted file mode 100644 index 783d38a6f2..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm_ext.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 2007. 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) -// -// Copyright Thorsten Ottosen 2006. 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_ALGORITHM_EXT_HPP -#define BOOST_RANGE_ALGORITHM_EXT_HPP - -#include <boost/range/algorithm_ext/copy_n.hpp> -#include <boost/range/algorithm_ext/for_each.hpp> -#include <boost/range/algorithm_ext/is_sorted.hpp> -#include <boost/range/algorithm_ext/iota.hpp> -#include <boost/range/algorithm_ext/overwrite.hpp> -#include <boost/range/algorithm_ext/push_back.hpp> -#include <boost/range/algorithm_ext/push_front.hpp> -#include <boost/range/algorithm_ext/insert.hpp> -#include <boost/range/algorithm_ext/erase.hpp> - -#endif diff --git a/contrib/restricted/boost/boost/range/algorithm_ext/copy_n.hpp b/contrib/restricted/boost/boost/range/algorithm_ext/copy_n.hpp deleted file mode 100644 index f8554417c5..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm_ext/copy_n.hpp +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 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_ALGORITHM_COPY_N_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_COPY_N_HPP_INCLUDED - -#include <boost/assert.hpp> -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/distance.hpp> -#include <boost/range/iterator.hpp> -#include <boost/range/iterator_range.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function copy -/// -/// range-based version of the copy std algorithm -/// -/// \pre SinglePassRange is a model of the SinglePassRangeConcept -/// \pre OutputIterator is a model of the OutputIteratorConcept -/// \pre 0 <= n <= distance(rng) -template< class SinglePassRange, class Size, class OutputIterator > -inline OutputIterator copy_n(const SinglePassRange& rng, Size n, OutputIterator out) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> )); - BOOST_ASSERT( n <= static_cast<Size>(::boost::distance(rng)) ); - BOOST_ASSERT( n >= static_cast<Size>(0) ); - - BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange>::type source = ::boost::begin(rng); - - for (Size i = 0; i < n; ++i, ++out, ++source) - *out = *source; - - return out; -} - - } // namespace range - using ::boost::range::copy_n; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm_ext/erase.hpp b/contrib/restricted/boost/boost/range/algorithm_ext/erase.hpp deleted file mode 100644 index 107d32b56b..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm_ext/erase.hpp +++ /dev/null @@ -1,61 +0,0 @@ -// Boost.Range library -// -// Copyright 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_ALGORITHM_EXT_ERASE_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_EXT_ERASE_HPP_INCLUDED - -#include <boost/range/config.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/difference_type.hpp> -#include <boost/range/iterator_range_core.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/assert.hpp> - -namespace boost -{ - namespace range - { - -template< class Container > -inline Container& erase( Container& on, - iterator_range<BOOST_DEDUCED_TYPENAME Container::iterator> to_erase ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> )); - on.erase( boost::begin(to_erase), boost::end(to_erase) ); - return on; -} - -template< class Container, class T > -inline Container& remove_erase( Container& on, const T& val ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> )); - on.erase( - std::remove(boost::begin(on), boost::end(on), val), - boost::end(on)); - return on; -} - -template< class Container, class Pred > -inline Container& remove_erase_if( Container& on, Pred pred ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> )); - on.erase( - std::remove_if(boost::begin(on), boost::end(on), pred), - boost::end(on)); - return on; -} - - } // namespace range - using range::erase; - using range::remove_erase; - using range::remove_erase_if; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm_ext/for_each.hpp b/contrib/restricted/boost/boost/range/algorithm_ext/for_each.hpp deleted file mode 100644 index a470e2b774..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm_ext/for_each.hpp +++ /dev/null @@ -1,86 +0,0 @@ -// Boost.Range library -// -// Copyright 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_ALGORITHM_EXT_FOR_EACH_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_EXT_FOR_EACH_HPP_INCLUDED - -#include <boost/range/config.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/difference_type.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/assert.hpp> - -namespace boost -{ - namespace range_detail - { - template<class InputIterator1, class InputIterator2, class Fn2> - inline Fn2 for_each_impl(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Fn2 fn) - { - for (; first1 != last1 && first2 != last2; ++first1, ++first2) - { - fn(*first1, *first2); - } - return fn; - } - } - - namespace range - { - template<class SinglePassRange1, class SinglePassRange2, class Fn2> - inline Fn2 for_each(const SinglePassRange1& rng1, const SinglePassRange2& rng2, Fn2 fn) - { - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - - return ::boost::range_detail::for_each_impl( - ::boost::begin(rng1), ::boost::end(rng1), - ::boost::begin(rng2), ::boost::end(rng2), fn); - } - - template<class SinglePassRange1, class SinglePassRange2, class Fn2> - inline Fn2 for_each(const SinglePassRange1& rng1, SinglePassRange2& rng2, Fn2 fn) - { - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> )); - - return ::boost::range_detail::for_each_impl( - ::boost::begin(rng1), ::boost::end(rng1), - ::boost::begin(rng2), ::boost::end(rng2), fn); - } - - template<class SinglePassRange1, class SinglePassRange2, class Fn2> - inline Fn2 for_each(SinglePassRange1& rng1, const SinglePassRange2& rng2, Fn2 fn) - { - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - - return ::boost::range_detail::for_each_impl( - ::boost::begin(rng1), ::boost::end(rng1), - ::boost::begin(rng2), ::boost::end(rng2), fn); - } - - template<class SinglePassRange1, class SinglePassRange2, class Fn2> - inline Fn2 for_each(SinglePassRange1& rng1, SinglePassRange2& rng2, Fn2 fn) - { - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> )); - - return ::boost::range_detail::for_each_impl( - ::boost::begin(rng1), ::boost::end(rng1), - ::boost::begin(rng2), ::boost::end(rng2), fn); - } - } // namespace range - using range::for_each; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm_ext/insert.hpp b/contrib/restricted/boost/boost/range/algorithm_ext/insert.hpp deleted file mode 100644 index 51f1b8e579..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm_ext/insert.hpp +++ /dev/null @@ -1,49 +0,0 @@ -// Boost.Range library -// -// Copyright 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_ALGORITHM_EXT_INSERT_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_EXT_INSERT_HPP_INCLUDED - -#include <boost/range/config.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/difference_type.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/assert.hpp> - -namespace boost -{ - namespace range - { - -template< class Container, class Range > -inline Container& insert( Container& on, - BOOST_DEDUCED_TYPENAME Container::iterator before, - const Range& from ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Range> )); - on.insert( before, boost::begin(from), boost::end(from) ); - return on; -} - -template< class Container, class Range > -inline Container& insert( Container& on, const Range& from ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Range> )); - on.insert(boost::begin(from), boost::end(from)); - return on; -} - - } // namespace range - using range::insert; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm_ext/iota.hpp b/contrib/restricted/boost/boost/range/algorithm_ext/iota.hpp deleted file mode 100644 index f7af44621e..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm_ext/iota.hpp +++ /dev/null @@ -1,54 +0,0 @@ -// Boost.Range library -// -// Copyright 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_ALGORITHM_EXT_IOTA_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_EXT_IOTA_HPP_INCLUDED - -#include <boost/range/config.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/iterator.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> - -namespace boost -{ - namespace range - { - -template< class ForwardRange, class Value > -inline ForwardRange& iota( ForwardRange& rng, Value x ) -{ - BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> )); - typedef BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type iterator_t; - - iterator_t last_target = ::boost::end(rng); - for (iterator_t target = ::boost::begin(rng); target != last_target; ++target, ++x) - *target = x; - - return rng; -} - -template< class ForwardRange, class Value > -inline const ForwardRange& iota( const ForwardRange& rng, Value x ) -{ - BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); - typedef BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type iterator_t; - - iterator_t last_target = ::boost::end(rng); - for (iterator_t target = ::boost::begin(rng); target != last_target; ++target, ++x) - *target = x; - - return rng; -} - - } // namespace range - using range::iota; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm_ext/is_sorted.hpp b/contrib/restricted/boost/boost/range/algorithm_ext/is_sorted.hpp deleted file mode 100644 index 3d00729217..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm_ext/is_sorted.hpp +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright Bryce Lelbach 2010 -// Copyright 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_ALGORITHM_EXT_IS_SORTED_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_EXT_IS_SORTED_HPP_INCLUDED - -#include <boost/concept_check.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/value_type.hpp> -#include <boost/detail/is_sorted.hpp> -#include <algorithm> - -namespace boost -{ - namespace range - { - -/// \brief template function is_sorted -/// -/// range-based version of the is_sorted std algorithm -/// -/// \pre SinglePassRange is a model of the SinglePassRangeConcept -template<class SinglePassRange> -inline bool is_sorted(const SinglePassRange& rng) -{ - BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<const SinglePassRange>)); - BOOST_RANGE_CONCEPT_ASSERT((LessThanComparableConcept<BOOST_DEDUCED_TYPENAME - range_value<const SinglePassRange>::type>)); - return ::boost::detail::is_sorted(boost::begin(rng), boost::end(rng)); -} - -/// \overload -template<class SinglePassRange, class BinaryPredicate> -inline bool is_sorted(const SinglePassRange& rng, BinaryPredicate pred) -{ - BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<const SinglePassRange>)); - BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate, - BOOST_DEDUCED_TYPENAME range_value<const SinglePassRange>::type, - BOOST_DEDUCED_TYPENAME range_value<const SinglePassRange>::type>)); - return ::boost::detail::is_sorted(boost::begin(rng), boost::end(rng), pred); -} - - } // namespace range - -using range::is_sorted; - -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm_ext/overwrite.hpp b/contrib/restricted/boost/boost/range/algorithm_ext/overwrite.hpp deleted file mode 100644 index f84f6eaca0..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm_ext/overwrite.hpp +++ /dev/null @@ -1,84 +0,0 @@ -// Boost.Range library -// -// Copyright 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_ALGORITHM_EXT_OVERWRITE_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_EXT_OVERWRITE_HPP_INCLUDED - -#include <boost/range/config.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/difference_type.hpp> -#include <boost/range/iterator.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/assert.hpp> - -namespace boost -{ - namespace range - { - -template< class SinglePassRange1, class SinglePassRange2 > -inline void overwrite( const SinglePassRange1& from, SinglePassRange2& to ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> )); - - BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type - i = boost::begin(from), e = boost::end(from); - - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type - out = boost::begin(to); - -#ifndef NDEBUG - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type - last_out = boost::end(to); -#endif - - for( ; i != e; ++out, ++i ) - { -#ifndef NDEBUG - BOOST_ASSERT( out != last_out - && "out of bounds in boost::overwrite()" ); -#endif - *out = *i; - } -} - -template< class SinglePassRange1, class SinglePassRange2 > -inline void overwrite( const SinglePassRange1& from, const SinglePassRange2& to ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> )); - - BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type - i = boost::begin(from), e = boost::end(from); - - BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type - out = boost::begin(to); - -#ifndef NDEBUG - BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type - last_out = boost::end(to); -#endif - - for( ; i != e; ++out, ++i ) - { -#ifndef NDEBUG - BOOST_ASSERT( out != last_out - && "out of bounds in boost::overwrite()" ); -#endif - *out = *i; - } -} - - } // namespace range - using range::overwrite; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm_ext/push_back.hpp b/contrib/restricted/boost/boost/range/algorithm_ext/push_back.hpp deleted file mode 100644 index 6fb9b9bf42..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm_ext/push_back.hpp +++ /dev/null @@ -1,41 +0,0 @@ -// Boost.Range library -// -// Copyright 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_ALGORITHM_EXT_PUSH_BACK_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_EXT_PUSH_BACK_HPP_INCLUDED - -#include <boost/range/config.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/difference_type.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/detail/implementation_help.hpp> -#include <boost/assert.hpp> - -namespace boost -{ - namespace range - { - -template< class Container, class Range > -inline Container& push_back( Container& on, const Range& from ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Container> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const Range> )); - BOOST_ASSERT_MSG(!range_detail::is_same_object(on, from), - "cannot copy from a container to itself"); - on.insert( on.end(), boost::begin(from), boost::end(from) ); - return on; -} - - } // namespace range - using range::push_back; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/algorithm_ext/push_front.hpp b/contrib/restricted/boost/boost/range/algorithm_ext/push_front.hpp deleted file mode 100644 index e893098070..0000000000 --- a/contrib/restricted/boost/boost/range/algorithm_ext/push_front.hpp +++ /dev/null @@ -1,41 +0,0 @@ -// Boost.Range library -// -// Copyright 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_ALGORITHM_EXT_PUSH_FRONT_HPP_INCLUDED -#define BOOST_RANGE_ALGORITHM_EXT_PUSH_FRONT_HPP_INCLUDED - -#include <boost/range/config.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/difference_type.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/detail/implementation_help.hpp> -#include <boost/assert.hpp> - -namespace boost -{ - namespace range - { - -template< class Container, class Range > -inline Container& push_front( Container& on, const Range& from ) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Container> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const Range> )); - BOOST_ASSERT_MSG(!range_detail::is_same_object(on, from), - "cannot copy from a container to itself"); - on.insert( on.begin(), boost::begin(from), boost::end(from) ); - return on; -} - - } // namespace range - using range::push_front; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/any_range.hpp b/contrib/restricted/boost/boost/range/any_range.hpp deleted file mode 100644 index 1cb599624b..0000000000 --- a/contrib/restricted/boost/boost/range/any_range.hpp +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright Neil Groves 2010. 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_ANY_RANGE_HPP_INCLUDED -#define BOOST_RANGE_ANY_RANGE_HPP_INCLUDED - -#include <boost/config.hpp> -#include <boost/iterator/iterator_categories.hpp> -#include <boost/iterator/iterator_traits.hpp> -#include <boost/iterator/iterator_facade.hpp> -#include <boost/iterator/iterator_adaptor.hpp> -#include <boost/range/detail/any_iterator.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/reference.hpp> -#include <boost/range/value_type.hpp> -#include <boost/range/iterator_range_core.hpp> - -namespace boost -{ - namespace range_detail - { - // If T is use_default, return the result of Default, otherwise - // return T. - // - // This is an implementation artifact used to pick intelligent default - // values when the user specified boost::use_default as a template - // parameter. - template< - class T, - class Default - > - struct any_range_default_help - : mpl::eval_if< - is_same<T, use_default> - , Default - , mpl::identity<T> - > - { - }; - - template< - class WrappedRange - , class Value - , class Reference - > - struct any_range_value_type - { -# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY - typedef typename any_range_default_help< - Value - , mpl::eval_if< - is_same<Reference, use_default> - , range_value< - typename remove_const<WrappedRange> - ::type> - , remove_reference<Reference> - > - >::type type; -# else - typedef typename any_range_default_help< - Value - , range_value< - typename remove_const<WrappedRange> - ::type> - >::type type; -# endif - }; - - template< - class Value - , class Traversal - , class Reference = Value& - , class Difference = std::ptrdiff_t - , class Buffer = use_default - > - class any_range - : public iterator_range< - any_iterator< - Value - , Traversal - , Reference - , Difference - , typename any_range_default_help< - Buffer - , mpl::identity<any_iterator_default_buffer> - >::type - > - > - { - typedef iterator_range< - any_iterator< - Value - , Traversal - , Reference - , Difference - , typename any_range_default_help< - Buffer - , mpl::identity<any_iterator_default_buffer> - >::type - > - > base_type; - - struct enabler {}; - struct disabler {}; - public: - any_range() - { - } - - any_range(const any_range& other) - : base_type(other) - { - } - - template<class WrappedRange> - any_range(WrappedRange& wrapped_range) - : base_type(boost::begin(wrapped_range), - boost::end(wrapped_range)) - { - } - - template<class WrappedRange> - any_range(const WrappedRange& wrapped_range) - : base_type(boost::begin(wrapped_range), - boost::end(wrapped_range)) - { - } - - template< - class OtherValue - , class OtherTraversal - , class OtherReference - , class OtherDifference - > - any_range(const any_range< - OtherValue - , OtherTraversal - , OtherReference - , OtherDifference - , Buffer - >& other) - : base_type(boost::begin(other), boost::end(other)) - { - } - - template<class Iterator> - any_range(Iterator first, Iterator last) - : base_type(first, last) - { - } - }; - - template< - class WrappedRange - , class Value = use_default - , class Traversal = use_default - , class Reference = use_default - , class Difference = use_default - , class Buffer = use_default - > - struct any_range_type_generator - { - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<WrappedRange> )); - typedef any_range< - typename any_range_value_type< - WrappedRange - , Value - , typename any_range_default_help< - Reference - , range_reference<WrappedRange> - >::type - >::type - , typename any_range_default_help< - Traversal - , iterator_traversal< - typename range_iterator<WrappedRange>::type - > - >::type - , typename any_range_default_help< - Reference - , range_reference<WrappedRange> - >::type - , typename any_range_default_help< - Difference - , range_difference<WrappedRange> - >::type - , typename any_range_default_help< - Buffer - , mpl::identity<any_iterator_default_buffer> - >::type - > type; - }; - } // namespace range_detail - - using range_detail::any_range; - using range_detail::any_range_type_generator; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/as_array.hpp b/contrib/restricted/boost/boost/range/as_array.hpp deleted file mode 100644 index 69a158075d..0000000000 --- a/contrib/restricted/boost/boost/range/as_array.hpp +++ /dev/null @@ -1,45 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2006. 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_AS_ARRAY_HPP -#define BOOST_RANGE_AS_ARRAY_HPP - -#if defined(_MSC_VER) -# pragma once -#endif - -#include <boost/range/iterator_range.hpp> -#include <boost/range/detail/str_types.hpp> - -namespace boost -{ - - template< class R > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<R>::type > - as_array( R& r ) - { - return boost::make_iterator_range( r ); - } - -#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - template< class Range > - inline boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type > - as_array( const Range& r ) - { - return boost::make_iterator_range( r ); - } - -#endif - -} - -#endif - diff --git a/contrib/restricted/boost/boost/range/atl.hpp b/contrib/restricted/boost/boost/range/atl.hpp deleted file mode 100644 index e6500e5831..0000000000 --- a/contrib/restricted/boost/boost/range/atl.hpp +++ /dev/null @@ -1,724 +0,0 @@ -#ifndef BOOST_RANGE_ATL_HPP -#define BOOST_RANGE_ATL_HPP - - - - -// Boost.Range ATL Extension -// -// Copyright Shunsuke Sogame 2005-2006. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - - - - -// config -// - - -#include <atldef.h> // _ATL_VER - - -#if !defined(BOOST_RANGE_ATL_NO_COLLECTIONS) - #if (_ATL_VER < 0x0700) - #define BOOST_RANGE_ATL_NO_COLLECTIONS - #endif -#endif - - -#if !defined(BOOST_RANGE_ATL_HAS_OLD_CSIMPLE_XXX) - #if (_ATL_VER < 0x0700) // dubious - #define BOOST_RANGE_ATL_HAS_OLD_CSIMPLE_XXX - #endif -#endif - - -// forward declarations -// - - -#include <basetyps.h> // IID - - -namespace ATL { - - -#if !defined(BOOST_RANGE_ATL_NO_COLLECTIONS) - - - // arrays - // - template< class E, class ETraits > - class CAtlArray; - - template< class E > - class CAutoPtrArray; - - template< class I, const IID *piid > - class CInterfaceArray; - - - // lists - // - template< class E, class ETraits > - class CAtlList; - - template< class E > - class CAutoPtrList; - - template< class E, class Allocator > - class CHeapPtrList; - - template< class I, const IID *piid > - class CInterfaceList; - - - // maps - // - template< class K, class V, class KTraits, class VTraits > - class CAtlMap; - - template< class K, class V, class KTraits, class VTraits > - class CRBTree; - - template< class K, class V, class KTraits, class VTraits > - class CRBMap; - - template< class K, class V, class KTraits, class VTraits > - class CRBMultiMap; - - - // strings - // -#if !defined(BOOST_RANGE_ATL_HAS_OLD_CSIMPLESTRING) - template< class BaseType, bool t_bMFCDLL > - class CSimpleStringT; -#else - template< class BaseType > - class CSimpleStringT; -#endif - - template< class BaseType, class StringTraits > - class CStringT; - - template< class StringType, int t_nChars > - class CFixedStringT; - - template< class BaseType, const int t_nSize > - class CStaticString; - - -#endif // !defined(BOOST_RANGE_ATL_NO_COLLECTIONS) - - - // simples - // -#if !defined(BOOST_RANGE_ATL_HAS_OLD_CSIMPLE_XXX) - - template< class T, class TEqual > - class CSimpleArray; - - template< class TKey, class TVal, class TEqual > - class CSimpleMap; - -#else - - template< class T > - class CSimpleArray; - - template< class T > - class CSimpleValArray; - - template< class TKey, class TVal > - class CSimpleMap; - -#endif // !defined(BOOST_RANGE_ATL_HAS_OLD_CSIMPLE_XXX) - - - // pointers - // - template< class E > - class CAutoPtr; - - template< class T > - class CComPtr; - - template< class T, const IID *piid > - class CComQIPtr; - - template< class E, class Allocator > - class CHeapPtr; - - template< class T > - class CAdapt; - - -} // namespace ATL - - - - -// indirect_iterator customizations -// - - -#include <boost/mpl/identity.hpp> -#include <boost/pointee.hpp> - - -namespace boost { - - - template< class E > - struct pointee< ATL::CAutoPtr<E> > : - mpl::identity<E> - { }; - - template< class T > - struct pointee< ATL::CComPtr<T> > : - mpl::identity<T> - { }; - - template< class T, const IID *piid > - struct pointee< ATL::CComQIPtr<T, piid> > : - mpl::identity<T> - { }; - - template< class E, class Allocator > - struct pointee< ATL::CHeapPtr<E, Allocator> > : - mpl::identity<E> - { }; - - template< class T > - struct pointee< ATL::CAdapt<T> > : - pointee<T> - { }; - - -} // namespace boost - - - - -// extended customizations -// - - -#include <boost/iterator/indirect_iterator.hpp> -#include <boost/iterator/zip_iterator.hpp> -#include <boost/range/detail/microsoft.hpp> -#include <boost/tuple/tuple.hpp> -#include <atlbase.h> // CComBSTR - - -namespace boost { namespace range_detail_microsoft { - - -#if !defined(BOOST_RANGE_ATL_NO_COLLECTIONS) - - - // arrays - // - - struct atl_array_functions : - array_functions - { - template< class Iterator, class X > - Iterator end(X& x) // redefine - { - return x.GetData() + x.GetCount(); // no 'GetSize()' - } - }; - - - template< class E, class ETraits > - struct customization< ATL::CAtlArray<E, ETraits> > : - atl_array_functions - { - template< class X > - struct meta - { - typedef E val_t; - - typedef val_t *mutable_iterator; - typedef val_t const *const_iterator; - }; - }; - - - template< class E > - struct customization< ATL::CAutoPtrArray<E> > : - atl_array_functions - { - template< class X > - struct meta - { - // ATL::CAutoPtr/CHeapPtr is no assignable. - typedef ATL::CAutoPtr<E> val_t; - typedef val_t *miter_t; - typedef val_t const *citer_t; - - typedef indirect_iterator<miter_t> mutable_iterator; - typedef indirect_iterator<citer_t> const_iterator; - }; - }; - - - template< class I, const IID *piid > - struct customization< ATL::CInterfaceArray<I, piid> > : - atl_array_functions - { - template< class X > - struct meta - { - typedef ATL::CComQIPtr<I, piid> val_t; - - typedef val_t *mutable_iterator; - typedef val_t const *const_iterator; - }; - }; - - - template< class E, class ETraits > - struct customization< ATL::CAtlList<E, ETraits> > : - list_functions - { - template< class X > - struct meta - { - typedef E val_t; - - typedef list_iterator<X, val_t> mutable_iterator; - typedef list_iterator<X const, val_t const> const_iterator; - }; - }; - - - struct indirected_list_functions - { - template< class Iterator, class X > - Iterator begin(X& x) - { - typedef typename Iterator::base_type base_t; // == list_iterator - return Iterator(base_t(x, x.GetHeadPosition())); - } - - template< class Iterator, class X > - Iterator end(X& x) - { - typedef typename Iterator::base_type base_t; - return Iterator(base_t(x, POSITION(0))); - } - }; - - - template< class E > - struct customization< ATL::CAutoPtrList<E> > : - indirected_list_functions - { - template< class X > - struct meta - { - typedef ATL::CAutoPtr<E> val_t; - typedef list_iterator<X, val_t> miter_t; - typedef list_iterator<X const, val_t const> citer_t; - - typedef indirect_iterator<miter_t> mutable_iterator; - typedef indirect_iterator<citer_t> const_iterator; - }; - }; - - - template< class E, class Allocator > - struct customization< ATL::CHeapPtrList<E, Allocator> > : - indirected_list_functions - { - template< class X > - struct meta - { - typedef ATL::CHeapPtr<E, Allocator> val_t; - typedef list_iterator<X, val_t> miter_t; - typedef list_iterator<X const, val_t const> citer_t; - - typedef indirect_iterator<miter_t> mutable_iterator; - typedef indirect_iterator<citer_t> const_iterator; - }; - }; - - - template< class I, const IID *piid > - struct customization< ATL::CInterfaceList<I, piid> > : - list_functions - { - template< class X > - struct meta - { - typedef ATL::CComQIPtr<I, piid> val_t; - - typedef list_iterator<X, val_t> mutable_iterator; - typedef list_iterator<X const, val_t const> const_iterator; - }; - }; - - - // maps - // - - struct atl_rb_tree_tag - { }; - - template< > - struct customization< atl_rb_tree_tag > : - indirected_list_functions - { - template< class X > - struct meta - { - typedef typename X::CPair val_t; - - typedef list_iterator<X, val_t *, val_t *> miter_t; - typedef list_iterator<X const, val_t const *, val_t const *> citer_t; - - typedef indirect_iterator<miter_t> mutable_iterator; - typedef indirect_iterator<citer_t> const_iterator; - }; - }; - - - template< class K, class V, class KTraits, class VTraits > - struct customization< ATL::CAtlMap<K, V, KTraits, VTraits> > : - customization< atl_rb_tree_tag > - { - template< class Iterator, class X > - Iterator begin(X& x) // redefine - { - typedef typename Iterator::base_type base_t; // == list_iterator - return Iterator(base_t(x, x.GetStartPosition())); // no 'GetHeadPosition' - } - }; - - - // strings - // - - struct atl_string_tag - { }; - - template< > - struct customization< atl_string_tag > - { - template< class X > - struct meta - { - typedef typename X::PXSTR mutable_iterator; - typedef typename X::PCXSTR const_iterator; - }; - - template< class Iterator, class X > - typename mutable_<Iterator, X>::type begin(X& x) - { - return x.GetBuffer(0); - } - - template< class Iterator, class X > - Iterator begin(X const& x) - { - return x.GetString(); - } - - template< class Iterator, class X > - Iterator end(X& x) - { - return begin<Iterator>(x) + x.GetLength(); - } - }; - - - template< class BaseType, const int t_nSize > - struct customization< ATL::CStaticString<BaseType, t_nSize> > - { - template< class X > - struct meta - { - typedef BaseType const *mutable_iterator; - typedef mutable_iterator const_iterator; - }; - - template< class Iterator, class X > - Iterator begin(X const& x) - { - return x; - } - - template< class Iterator, class X > - Iterator end(X const& x) - { - return begin<Iterator>(x) + X::GetLength(); - } - }; - - -#endif // !defined(BOOST_RANGE_ATL_NO_COLLECTIONS) - - - template< > - struct customization< ATL::CComBSTR > - { - template< class X > - struct meta - { - typedef OLECHAR *mutable_iterator; - typedef OLECHAR const *const_iterator; - }; - - template< class Iterator, class X > - Iterator begin(X& x) - { - return x.operator BSTR(); - } - - template< class Iterator, class X > - Iterator end(X& x) - { - return begin<Iterator>(x) + x.Length(); - } - }; - - - // simples - // - -#if !defined(BOOST_RANGE_ATL_HAS_OLD_CSIMPLE_XXX) - template< class T, class TEqual > - struct customization< ATL::CSimpleArray<T, TEqual> > : -#else - template< class T > - struct customization< ATL::CSimpleArray<T> > : -#endif - array_functions - { - template< class X > - struct meta - { - typedef T val_t; - - typedef val_t *mutable_iterator; - typedef val_t const *const_iterator; - }; - }; - - -#if defined(BOOST_RANGE_ATL_HAS_OLD_CSIMPLE_XXX) - - template< class T > - struct customization< ATL::CSimpleValArray<T> > : - array_functions - { - template< class X > - struct meta - { - typedef T val_t; - - typedef val_t *mutable_iterator; - typedef val_t const *const_iterator; - }; - }; - -#endif // defined(BOOST_RANGE_ATL_HAS_OLD_CSIMPLE_XXX) - - -#if !defined(BOOST_RANGE_ATL_HAS_OLD_CSIMPLE_XXX) - template< class TKey, class TVal, class TEqual > - struct customization< ATL::CSimpleMap<TKey, TVal, TEqual> > -#else - template< class TKey, class TVal > - struct customization< ATL::CSimpleMap<TKey, TVal> > -#endif - { - template< class X > - struct meta - { - typedef TKey k_val_t; - typedef k_val_t *k_miter_t; - typedef k_val_t const *k_citer_t; - - typedef TVal v_val_t; - typedef v_val_t *v_miter_t; - typedef v_val_t const *v_citer_t; - - // Topic: - // 'std::pair' can't contain references - // because of reference to reference problem. - - typedef zip_iterator< tuple<k_miter_t, v_miter_t> > mutable_iterator; - typedef zip_iterator< tuple<k_citer_t, v_citer_t> > const_iterator; - }; - - template< class Iterator, class X > - Iterator begin(X& x) - { - return Iterator(boost::make_tuple(x.m_aKey, x.m_aVal)); - } - - template< class Iterator, class X > - Iterator end(X& x) - { - return Iterator(boost::make_tuple(x.m_aKey + x.GetSize(), x.m_aVal + x.GetSize())); - } - }; - - -} } // namespace boost::range_detail_microsoft - - - - -// range customizations -// - - -#if !defined(BOOST_RANGE_ATL_NO_COLLECTIONS) - - - // arrays - // - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - (ATL, BOOST_PP_NIL), CAtlArray, 2 - ) - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - (ATL, BOOST_PP_NIL), CAutoPtrArray, 1 - ) - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - (ATL, BOOST_PP_NIL), CInterfaceArray, (class)(const IID *) - ) - - - // lists - // - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - (ATL, BOOST_PP_NIL), CAtlList, 2 - ) - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - (ATL, BOOST_PP_NIL), CAutoPtrList, 1 - ) - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - (ATL, BOOST_PP_NIL), CHeapPtrList, 2 - ) - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - (ATL, BOOST_PP_NIL), CInterfaceList, (class)(const IID *) - ) - - - //maps - // - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - (ATL, BOOST_PP_NIL), CAtlMap, 4 - ) - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::atl_rb_tree_tag, - (ATL, BOOST_PP_NIL), CRBTree, 4 - ) - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::atl_rb_tree_tag, - (ATL, BOOST_PP_NIL), CRBMap, 4 - ) - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::atl_rb_tree_tag, - (ATL, BOOST_PP_NIL), CRBMultiMap, 4 - ) - - - // strings - // - #if !defined(BOOST_RANGE_ATL_HAS_OLD_CSIMPLESTRING) - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::atl_string_tag, - (ATL, BOOST_PP_NIL), CSimpleStringT, (class)(bool) - ) - #else - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::atl_string_tag, - (ATL, BOOST_PP_NIL), CSimpleStringT, 1 - ) - #endif - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::atl_string_tag, - (ATL, BOOST_PP_NIL), CStringT, 2 - ) - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::atl_string_tag, - (ATL, BOOST_PP_NIL), CFixedStringT, (class)(int) - ) - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - (ATL, BOOST_PP_NIL), CStaticString, (class)(const int) - ) - - -#endif // !defined(BOOST_RANGE_ATL_NO_COLLECTIONS) - - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - (ATL, BOOST_PP_NIL), CComBSTR -) - - -// simples -// -#if !defined(BOOST_RANGE_ATL_HAS_OLD_CSIMPLE_XXX) - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - (ATL, BOOST_PP_NIL), CSimpleArray, 2 - ) - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - (ATL, BOOST_PP_NIL), CSimpleMap, 3 - ) - -#else - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - (ATL, BOOST_PP_NIL), CSimpleArray, 1 - ) - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - (ATL, BOOST_PP_NIL), CSimpleMap, 2 - ) - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - (ATL, BOOST_PP_NIL), CSimpleValArray, 1 - ) - -#endif // !defined(BOOST_RANGE_ATL_HAS_OLD_CSIMPLE_XXX) - - - - -#endif diff --git a/contrib/restricted/boost/boost/range/combine.hpp b/contrib/restricted/boost/boost/range/combine.hpp deleted file mode 100644 index 26cef9ad73..0000000000 --- a/contrib/restricted/boost/boost/range/combine.hpp +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright Neil Groves 2010. 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_COMBINE_HPP -#define BOOST_RANGE_COMBINE_HPP - -#include <boost/config.hpp> -#include <boost/range/iterator_range_core.hpp> -#include <boost/iterator/zip_iterator.hpp> - -namespace boost -{ - namespace range - { - -template<typename IterTuple> -class combined_range - : public iterator_range<zip_iterator<IterTuple> > -{ - typedef iterator_range<zip_iterator<IterTuple> > base; -public: - combined_range(IterTuple first, IterTuple last) - : base(first, last) - { - } -}; - - } // namespace range -} // namespace boost - -#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) || \ - defined(BOOST_NO_CXX11_DECLTYPE) || \ - defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || \ - defined(BOOST_NO_CXX11_RVALUE_REFERENCES) -# include <boost/range/detail/combine_cxx03.hpp> -#else -# include <boost/range/detail/combine_cxx11.hpp> -#endif - -#endif diff --git a/contrib/restricted/boost/boost/range/detail/any_iterator.hpp b/contrib/restricted/boost/boost/range/detail/any_iterator.hpp deleted file mode 100644 index 044237c595..0000000000 --- a/contrib/restricted/boost/boost/range/detail/any_iterator.hpp +++ /dev/null @@ -1,589 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 2010. 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_ANY_ITERATOR_HPP_INCLUDED -#define BOOST_RANGE_DETAIL_ANY_ITERATOR_HPP_INCLUDED - -#include <boost/mpl/and.hpp> -#include <boost/mpl/or.hpp> -#include <boost/mpl/not.hpp> -#include <boost/iterator/iterator_facade.hpp> -#include <boost/type_traits/is_const.hpp> -#include <boost/type_traits/is_reference.hpp> -#include <boost/type_traits/remove_reference.hpp> -#include <boost/range/detail/any_iterator_buffer.hpp> -#include <boost/range/detail/any_iterator_interface.hpp> -#include <boost/range/detail/any_iterator_wrapper.hpp> -#include <boost/utility/enable_if.hpp> - -namespace boost -{ - namespace range_detail - { - // metafunction to determine if T is a const reference - template<class T> - struct is_const_reference - { - typedef typename mpl::and_< - typename is_reference<T>::type, - typename is_const< - typename remove_reference<T>::type - >::type - >::type type; - }; - - // metafunction to determine if T is a mutable reference - template<class T> - struct is_mutable_reference - { - typedef typename mpl::and_< - typename is_reference<T>::type, - typename mpl::not_< - typename is_const< - typename remove_reference<T>::type - >::type - >::type - >::type type; - }; - - // metafunction to evaluate if a source 'reference' can be - // converted to a target 'reference' as a value. - // - // This is true, when the target reference type is actually - // not a reference, and the source reference is convertible - // to the target type. - template<class SourceReference, class TargetReference> - struct is_convertible_to_value_as_reference - { - typedef typename mpl::and_< - typename mpl::not_< - typename is_reference<TargetReference>::type - >::type - , typename is_convertible< - SourceReference - , TargetReference - >::type - >::type type; - }; - - template< - class Value - , class Traversal - , class Reference - , class Difference - , class Buffer = any_iterator_default_buffer - > - class any_iterator; - - // metafunction to determine if SomeIterator is an - // any_iterator. - // - // This is the general implementation which evaluates to false. - template<class SomeIterator> - struct is_any_iterator - : mpl::bool_<false> - { - }; - - // specialization of is_any_iterator to return true for - // any_iterator classes regardless of template parameters. - template< - class Value - , class Traversal - , class Reference - , class Difference - , class Buffer - > - struct is_any_iterator< - any_iterator< - Value - , Traversal - , Reference - , Difference - , Buffer - > - > - : mpl::bool_<true> - { - }; - } // namespace range_detail - - namespace iterators - { - namespace detail - { - // Rationale: - // These are specialized since the iterator_facade versions lack - // the requisite typedefs to allow wrapping to determine the types - // if a user copy constructs from a postfix increment. - - template< - class Value - , class Traversal - , class Reference - , class Difference - , class Buffer - > - class postfix_increment_proxy< - range_detail::any_iterator< - Value - , Traversal - , Reference - , Difference - , Buffer - > - > - { - typedef range_detail::any_iterator< - Value - , Traversal - , Reference - , Difference - , Buffer - > any_iterator_type; - - public: - typedef Value value_type; - typedef typename std::iterator_traits<any_iterator_type>::iterator_category iterator_category; - typedef Difference difference_type; - typedef typename iterator_pointer<any_iterator_type>::type pointer; - typedef Reference reference; - - explicit postfix_increment_proxy(any_iterator_type const& x) - : stored_value(*x) - {} - - value_type& - operator*() const - { - return this->stored_value; - } - private: - mutable value_type stored_value; - }; - - template< - class Value - , class Traversal - , class Reference - , class Difference - , class Buffer - > - class writable_postfix_increment_proxy< - range_detail::any_iterator< - Value - , Traversal - , Reference - , Difference - , Buffer - > - > - { - typedef range_detail::any_iterator< - Value - , Traversal - , Reference - , Difference - , Buffer - > any_iterator_type; - public: - typedef Value value_type; - typedef typename std::iterator_traits<any_iterator_type>::iterator_category iterator_category; - typedef Difference difference_type; - typedef typename iterator_pointer<any_iterator_type>::type pointer; - typedef Reference reference; - - explicit writable_postfix_increment_proxy(any_iterator_type const& x) - : stored_value(*x) - , stored_iterator(x) - {} - - // Dereferencing must return a proxy so that both *r++ = o and - // value_type(*r++) can work. In this case, *r is the same as - // *r++, and the conversion operator below is used to ensure - // readability. - writable_postfix_increment_proxy const& - operator*() const - { - return *this; - } - - // Provides readability of *r++ - operator value_type&() const - { - return stored_value; - } - - // Provides writability of *r++ - template <class T> - T const& operator=(T const& x) const - { - *this->stored_iterator = x; - return x; - } - - // This overload just in case only non-const objects are writable - template <class T> - T& operator=(T& x) const - { - *this->stored_iterator = x; - return x; - } - - // Provides X(r++) - operator any_iterator_type const&() const - { - return stored_iterator; - } - - private: - mutable value_type stored_value; - any_iterator_type stored_iterator; - }; - - } //namespace detail - } //namespace iterators - - namespace range_detail - { - template< - class Value - , class Traversal - , class Reference - , class Difference - , class Buffer - > - class any_iterator - : public iterator_facade< - any_iterator< - Value - , Traversal - , Reference - , Difference - , Buffer - > - , Value - , Traversal - , Reference - , Difference - > - { - template< - class OtherValue - , class OtherTraversal - , class OtherReference - , class OtherDifference - , class OtherBuffer - > - friend class any_iterator; - - struct enabler {}; - struct disabler {}; - - typedef typename any_iterator_interface_type_generator< - Traversal - , Reference - , Difference - , Buffer - >::type abstract_base_type; - - typedef iterator_facade< - any_iterator< - Value - , Traversal - , Reference - , Difference - , Buffer - > - , Value - , Traversal - , Reference - , Difference - > base_type; - - typedef Buffer buffer_type; - - public: - typedef typename base_type::value_type value_type; - typedef typename base_type::reference reference; - typedef typename base_type::difference_type difference_type; - - // Default constructor - any_iterator() - : m_impl(0) {} - - // Simple copy construction without conversion - any_iterator(const any_iterator& other) - : base_type(other) - , m_impl(other.m_impl - ? other.m_impl->clone(m_buffer) - : 0) - { - } - - // Simple assignment operator without conversion - any_iterator& operator=(const any_iterator& other) - { - if (this != &other) - { - if (m_impl) - m_impl->~abstract_base_type(); - m_buffer.deallocate(); - m_impl = 0; - if (other.m_impl) - m_impl = other.m_impl->clone(m_buffer); - } - return *this; - } - - // Implicit conversion from another any_iterator where the - // conversion is from a non-const reference to a const reference - template< - class OtherValue - , class OtherTraversal - , class OtherReference - , class OtherDifference - > - any_iterator(const any_iterator< - OtherValue, - OtherTraversal, - OtherReference, - OtherDifference, - Buffer - >& other, - typename ::boost::enable_if< - typename mpl::and_< - typename is_mutable_reference<OtherReference>::type, - typename is_const_reference<Reference>::type - >::type, - enabler - >::type* = 0 - ) - : m_impl(other.m_impl - ? other.m_impl->clone_const_ref(m_buffer) - : 0 - ) - { - } - - // Implicit conversion from another any_iterator where the - // reference types of the source and the target are references - // that are either both const, or both non-const. - template< - class OtherValue - , class OtherTraversal - , class OtherReference - , class OtherDifference - > - any_iterator(const any_iterator< - OtherValue - , OtherTraversal - , OtherReference - , OtherDifference - , Buffer - >& other, - typename ::boost::enable_if< - typename mpl::or_< - typename mpl::and_< - typename is_mutable_reference<OtherReference>::type, - typename is_mutable_reference<Reference>::type - >::type, - typename mpl::and_< - typename is_const_reference<OtherReference>::type, - typename is_const_reference<Reference>::type - >::type - >::type, - enabler - >::type* = 0 - ) - : m_impl(other.m_impl - ? other.m_impl->clone(m_buffer) - : 0 - ) - { - } - - // Implicit conversion to an any_iterator that uses a value for - // the reference type. - template< - class OtherValue - , class OtherTraversal - , class OtherReference - , class OtherDifference - > - any_iterator(const any_iterator< - OtherValue - , OtherTraversal - , OtherReference - , OtherDifference - , Buffer - >& other, - typename ::boost::enable_if< - typename is_convertible_to_value_as_reference< - OtherReference - , Reference - >::type, - enabler - >::type* = 0 - ) - : m_impl(other.m_impl - ? other.m_impl->clone_reference_as_value(m_buffer) - : 0 - ) - { - } - - any_iterator clone() const - { - any_iterator result; - if (m_impl) - result.m_impl = m_impl->clone(result.m_buffer); - return result; - } - - any_iterator< - Value - , Traversal - , typename abstract_base_type::const_reference - , Difference - , Buffer - > - clone_const_ref() const - { - typedef any_iterator< - Value - , Traversal - , typename abstract_base_type::const_reference - , Difference - , Buffer - > result_type; - - result_type result; - - if (m_impl) - result.m_impl = m_impl->clone_const_ref(result.m_buffer); - - return result; - } - - // implicit conversion and construction from type-erasure-compatible - // iterators - template<class WrappedIterator> - explicit any_iterator( - const WrappedIterator& wrapped_iterator, - typename disable_if< - typename is_any_iterator<WrappedIterator>::type - , disabler - >::type* = 0 - ) - { - typedef typename any_iterator_wrapper_type_generator< - WrappedIterator - , Traversal - , Reference - , Difference - , Buffer - >::type wrapper_type; - - void* ptr = m_buffer.allocate(sizeof(wrapper_type)); - m_impl = new(ptr) wrapper_type(wrapped_iterator); - } - - ~any_iterator() - { - // manually run the destructor, the deallocation is automatically - // handled by the any_iterator_small_buffer base class. - if (m_impl) - m_impl->~abstract_base_type(); - } - - private: - friend class ::boost::iterator_core_access; - - Reference dereference() const - { - BOOST_ASSERT( m_impl ); - return m_impl->dereference(); - } - - bool equal(const any_iterator& other) const - { - return (m_impl == other.m_impl) - || (m_impl && other.m_impl && m_impl->equal(*other.m_impl)); - } - - void increment() - { - BOOST_ASSERT( m_impl ); - m_impl->increment(); - } - - void decrement() - { - BOOST_ASSERT( m_impl ); - m_impl->decrement(); - } - - Difference distance_to(const any_iterator& other) const - { - return m_impl && other.m_impl - ? m_impl->distance_to(*other.m_impl) - : 0; - } - - void advance(Difference offset) - { - BOOST_ASSERT( m_impl ); - m_impl->advance(offset); - } - - any_iterator& swap(any_iterator& other) - { - BOOST_ASSERT( this != &other ); - // grab a temporary copy of the other iterator - any_iterator tmp(other); - - // deallocate the other iterator, taking care to obey the - // class-invariants in-case of exceptions later - if (other.m_impl) - { - other.m_impl->~abstract_base_type(); - other.m_buffer.deallocate(); - other.m_impl = 0; - } - - // If this is a non-null iterator then we need to put - // a clone of this iterators implementation into the other - // iterator. - // We can't just swap because of the small buffer optimization. - if (m_impl) - { - other.m_impl = m_impl->clone(other.m_buffer); - m_impl->~abstract_base_type(); - m_buffer.deallocate(); - m_impl = 0; - } - - // assign to this instance a clone of the temporarily held - // tmp which represents the input other parameter at the - // start of execution of this function. - if (tmp.m_impl) - m_impl = tmp.m_impl->clone(m_buffer); - - return *this; - } - - buffer_type m_buffer; - abstract_base_type* m_impl; - }; - - } // namespace range_detail -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/detail/any_iterator_buffer.hpp b/contrib/restricted/boost/boost/range/detail/any_iterator_buffer.hpp deleted file mode 100644 index d40f670b64..0000000000 --- a/contrib/restricted/boost/boost/range/detail/any_iterator_buffer.hpp +++ /dev/null @@ -1,117 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 2010. 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_ANY_ITERATOR_BUFFER_HPP_INCLUDED -#define BOOST_RANGE_DETAIL_ANY_ITERATOR_BUFFER_HPP_INCLUDED - -#include <boost/array.hpp> -#include <boost/assert.hpp> -#include <boost/static_assert.hpp> -#include <boost/noncopyable.hpp> - -namespace boost -{ - template<std::size_t StackBufferSize> - class any_iterator_buffer - : noncopyable - { - BOOST_STATIC_ASSERT(( StackBufferSize > 0 )); - public: - any_iterator_buffer() - : m_ptr() - { - } - - ~any_iterator_buffer() - { - delete [] m_ptr; - } - - void* allocate(std::size_t bytes) - { - BOOST_ASSERT( !m_ptr ); - if (bytes <= StackBufferSize) - return m_buffer.data(); - - m_ptr = new char[bytes]; - return m_ptr; - } - - void deallocate() - { - delete [] m_ptr; - m_ptr = 0; - } - - private: - // Rationale: - // Do not use inheritance from noncopyable because this causes - // the concepts to erroneous detect the derived any_iterator - // as noncopyable. - any_iterator_buffer(const any_iterator_buffer&); - void operator=(const any_iterator_buffer&); - - char* m_ptr; - boost::array<char, StackBufferSize> m_buffer; - }; - - class any_iterator_heap_only_buffer - : noncopyable - { - public: - any_iterator_heap_only_buffer() - : m_ptr() - { - } - - ~any_iterator_heap_only_buffer() - { - delete [] m_ptr; - } - - void* allocate(std::size_t bytes) - { - BOOST_ASSERT( !m_ptr ); - m_ptr = new char[bytes]; - return m_ptr; - } - - void deallocate() - { - delete [] m_ptr; - m_ptr = 0; - } - - private: - char* m_ptr; - }; - - template<std::size_t StackBufferSize> - class any_iterator_stack_only_buffer - { - BOOST_STATIC_ASSERT(( StackBufferSize > 0 )); - public: - void* allocate([[maybe_unused]] std::size_t bytes) - { - BOOST_ASSERT( bytes <= m_buffer.size() ); - return m_buffer.data(); - } - - void deallocate() - { - } - - private: - boost::array<char, StackBufferSize> m_buffer; - }; - - typedef any_iterator_buffer<64> any_iterator_default_buffer; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/detail/any_iterator_interface.hpp b/contrib/restricted/boost/boost/range/detail/any_iterator_interface.hpp deleted file mode 100644 index cd567146f2..0000000000 --- a/contrib/restricted/boost/boost/range/detail/any_iterator_interface.hpp +++ /dev/null @@ -1,277 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 2010. 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_ANY_ITERATOR_INTERFACE_HPP_INCLUDED -#define BOOST_RANGE_DETAIL_ANY_ITERATOR_INTERFACE_HPP_INCLUDED - -#include <boost/range/detail/any_iterator_buffer.hpp> -#include <boost/iterator/iterator_categories.hpp> -#include <boost/type_traits/add_const.hpp> -#include <boost/type_traits/add_reference.hpp> -#include <boost/type_traits/is_reference.hpp> -#include <boost/type_traits/remove_const.hpp> -#include <boost/type_traits/remove_reference.hpp> - -namespace boost -{ - namespace range_detail - { - template<class T> - struct const_reference_type_generator - { - typedef typename mpl::if_< - typename is_reference<T>::type, - typename add_const< - typename remove_reference<T>::type - >::type&, - T - >::type type; - }; - - template<class T> - struct mutable_reference_type_generator - { - typedef typename mpl::if_< - typename mpl::and_< - typename is_const<T>::type, - typename mpl::not_<typename is_reference<T>::type>::type - >::type, - T, - typename add_reference<T>::type - >::type type; - }; - - template< - class Reference - , class Buffer - > - struct any_incrementable_iterator_interface - { - typedef typename mutable_reference_type_generator< - Reference - >::type reference; - - typedef typename const_reference_type_generator< - Reference - >::type const_reference; - - typedef typename remove_const< - typename remove_reference<Reference>::type - >::type reference_as_value_type; - - typedef Buffer buffer_type; - - virtual ~any_incrementable_iterator_interface() {} - - virtual any_incrementable_iterator_interface* - clone(buffer_type& buffer) const = 0; - - virtual any_incrementable_iterator_interface<const_reference, Buffer>* - clone_const_ref(buffer_type& buffer) const = 0; - - virtual any_incrementable_iterator_interface<reference_as_value_type, Buffer>* - clone_reference_as_value(buffer_type& buffer) const = 0; - - virtual void increment() = 0; - }; - - template< - class Reference - , class Buffer - > - struct any_single_pass_iterator_interface - : any_incrementable_iterator_interface<Reference, Buffer> - { - typedef typename any_incrementable_iterator_interface<Reference, Buffer>::reference reference; - typedef typename any_incrementable_iterator_interface<Reference, Buffer>::const_reference const_reference; - typedef typename any_incrementable_iterator_interface<Reference, Buffer>::buffer_type buffer_type; - typedef typename any_incrementable_iterator_interface<Reference, Buffer>::reference_as_value_type reference_as_value_type; - - virtual any_single_pass_iterator_interface* - clone(buffer_type& buffer) const = 0; - - virtual any_single_pass_iterator_interface<const_reference, Buffer>* - clone_const_ref(buffer_type& buffer) const = 0; - - virtual any_single_pass_iterator_interface<reference_as_value_type, Buffer>* - clone_reference_as_value(buffer_type& buffer) const = 0; - - virtual reference dereference() const = 0; - - virtual bool equal(const any_single_pass_iterator_interface& other) const = 0; - }; - - template< - class Reference - , class Buffer - > - struct any_forward_iterator_interface - : any_single_pass_iterator_interface<Reference, Buffer> - { - typedef typename any_single_pass_iterator_interface<Reference, Buffer>::reference reference; - typedef typename any_single_pass_iterator_interface<Reference, Buffer>::const_reference const_reference; - typedef typename any_single_pass_iterator_interface<Reference, Buffer>::buffer_type buffer_type; - typedef typename any_single_pass_iterator_interface<Reference, Buffer>::reference_as_value_type reference_as_value_type; - - virtual any_forward_iterator_interface* - clone(buffer_type& buffer) const = 0; - - virtual any_forward_iterator_interface<const_reference, Buffer>* - clone_const_ref(buffer_type& buffer) const = 0; - - virtual any_forward_iterator_interface<reference_as_value_type, Buffer>* - clone_reference_as_value(buffer_type& buffer) const = 0; - }; - - template< - class Reference - , class Buffer - > - struct any_bidirectional_iterator_interface - : any_forward_iterator_interface<Reference, Buffer> - { - typedef typename any_forward_iterator_interface<Reference, Buffer>::reference reference; - typedef typename any_forward_iterator_interface<Reference, Buffer>::const_reference const_reference; - typedef typename any_forward_iterator_interface<Reference, Buffer>::buffer_type buffer_type; - typedef typename any_forward_iterator_interface<Reference, Buffer>::reference_as_value_type reference_as_value_type; - - virtual any_bidirectional_iterator_interface* - clone(buffer_type& buffer) const = 0; - - virtual any_bidirectional_iterator_interface<const_reference, Buffer>* - clone_const_ref(buffer_type& buffer) const = 0; - - virtual any_bidirectional_iterator_interface<reference_as_value_type, Buffer>* - clone_reference_as_value(buffer_type& buffer) const = 0; - - virtual void decrement() = 0; - }; - - template< - class Reference - , class Difference - , class Buffer - > - struct any_random_access_iterator_interface - : any_bidirectional_iterator_interface< - Reference - , Buffer - > - { - typedef typename any_bidirectional_iterator_interface<Reference, Buffer>::reference reference; - typedef typename any_bidirectional_iterator_interface<Reference, Buffer>::const_reference const_reference; - typedef typename any_bidirectional_iterator_interface<Reference, Buffer>::buffer_type buffer_type; - typedef typename any_bidirectional_iterator_interface<Reference, Buffer>::reference_as_value_type reference_as_value_type; - typedef Difference difference_type; - - virtual any_random_access_iterator_interface* - clone(buffer_type& buffer) const = 0; - - virtual any_random_access_iterator_interface<const_reference, Difference, Buffer>* - clone_const_ref(buffer_type& buffer) const = 0; - - virtual any_random_access_iterator_interface<reference_as_value_type, Difference, Buffer>* - clone_reference_as_value(buffer_type& buffer) const = 0; - - virtual void advance(Difference offset) = 0; - - virtual Difference distance_to(const any_random_access_iterator_interface& other) const = 0; - }; - - template< - class Traversal - , class Reference - , class Difference - , class Buffer - > - struct any_iterator_interface_type_generator; - - template< - class Reference - , class Difference - , class Buffer - > - struct any_iterator_interface_type_generator< - incrementable_traversal_tag - , Reference - , Difference - , Buffer - > - { - typedef any_incrementable_iterator_interface<Reference, Buffer> type; - }; - - template< - class Reference - , class Difference - , class Buffer - > - struct any_iterator_interface_type_generator< - single_pass_traversal_tag - , Reference - , Difference - , Buffer - > - { - typedef any_single_pass_iterator_interface<Reference, Buffer> type; - }; - - template< - class Reference - , class Difference - , class Buffer - > - struct any_iterator_interface_type_generator< - forward_traversal_tag - , Reference - , Difference - , Buffer - > - { - typedef any_forward_iterator_interface<Reference, Buffer> type; - }; - - template< - class Reference - , class Difference - , class Buffer - > - struct any_iterator_interface_type_generator< - bidirectional_traversal_tag - , Reference - , Difference - , Buffer - > - { - typedef any_bidirectional_iterator_interface<Reference, Buffer> type; - }; - - template< - class Reference - , class Difference - , class Buffer - > - struct any_iterator_interface_type_generator< - random_access_traversal_tag - , Reference - , Difference - , Buffer - > - { - typedef any_random_access_iterator_interface< - Reference - , Difference - , Buffer - > type; - }; - - } // namespace range_detail -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/detail/any_iterator_wrapper.hpp b/contrib/restricted/boost/boost/range/detail/any_iterator_wrapper.hpp deleted file mode 100644 index c542d39a2f..0000000000 --- a/contrib/restricted/boost/boost/range/detail/any_iterator_wrapper.hpp +++ /dev/null @@ -1,640 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 2010. 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_ANY_ITERATOR_WRAPPER_HPP_INCLUDED -#define BOOST_RANGE_DETAIL_ANY_ITERATOR_WRAPPER_HPP_INCLUDED - -#include <boost/cast.hpp> -#include <boost/range/config.hpp> -#include <boost/range/detail/any_iterator_interface.hpp> -#include <boost/range/concepts.hpp> - -namespace boost -{ - namespace range_detail - { - template<typename TargetT, typename SourceT> - TargetT& polymorphic_ref_downcast(SourceT& source) - { -#ifdef BOOST_NO_RTTI - return static_cast<TargetT&>(source); -#else - return *boost::polymorphic_downcast<TargetT*>(&source); -#endif - } - - template<class Reference, class T> - Reference dereference_cast(T& x) - { - return static_cast<Reference>(x); - } - template<class Reference, class T> - Reference dereference_cast(const T& x) - { - return static_cast<Reference>(const_cast<T&>(x)); - } - - template< - class WrappedIterator - , class Reference - , class Buffer - > - class any_incrementable_iterator_wrapper - : public any_incrementable_iterator_interface< - Reference - , Buffer - > - { - BOOST_RANGE_CONCEPT_ASSERT(( IncrementableIteratorConcept<WrappedIterator> )); - public: - typedef WrappedIterator wrapped_type; - - BOOST_STATIC_ASSERT(( is_convertible< - typename iterator_reference<WrappedIterator>::type - , Reference - >::value )); - - any_incrementable_iterator_wrapper() - : m_it() - {} - - explicit any_incrementable_iterator_wrapper(wrapped_type it) - : m_it(it) - {} - - // any_incrementable_iterator implementation - virtual any_incrementable_iterator_wrapper* clone( - typename any_incrementable_iterator_wrapper::buffer_type& buffer - ) const - { - return new (buffer.allocate(sizeof(*this))) - any_incrementable_iterator_wrapper(m_it); - } - - virtual any_incrementable_iterator_wrapper< - WrappedIterator - , typename any_incrementable_iterator_wrapper::const_reference - , Buffer - >* clone_const_ref( - typename any_incrementable_iterator_wrapper::buffer_type& buffer - ) const - { - typedef any_incrementable_iterator_wrapper< - WrappedIterator - , typename any_incrementable_iterator_wrapper::const_reference - , Buffer - > result_type; - - return new (buffer.allocate(sizeof(result_type))) - result_type(m_it); - } - - virtual any_incrementable_iterator_wrapper< - WrappedIterator - , typename any_incrementable_iterator_wrapper::reference_as_value_type - , Buffer - >* clone_reference_as_value( - typename any_incrementable_iterator_wrapper::buffer_type& buffer - ) const - { - typedef any_incrementable_iterator_wrapper< - WrappedIterator - , typename any_incrementable_iterator_wrapper::reference_as_value_type - , Buffer - > result_type; - - return new (buffer.allocate(sizeof(result_type))) - result_type(m_it); - } - - virtual void increment() - { - ++m_it; - } - - private: - wrapped_type m_it; - }; - - template< - class WrappedIterator - , class Reference - , class Buffer - > - class any_single_pass_iterator_wrapper - : public any_single_pass_iterator_interface< - Reference - , Buffer - > - { - struct disabler {}; - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassIteratorConcept<WrappedIterator> )); - typedef any_single_pass_iterator_interface< - Reference, - Buffer - > base_type; - - public: - typedef typename base_type::reference reference; - - any_single_pass_iterator_wrapper() - : m_it() - {} - - explicit any_single_pass_iterator_wrapper(const WrappedIterator& it) - : m_it(it) - {} - // any_single_pass_iterator_interface<Reference> implementation - virtual any_single_pass_iterator_wrapper* clone( - typename any_single_pass_iterator_wrapper::buffer_type& buffer - ) const - { - return new (buffer.allocate(sizeof(*this))) - any_single_pass_iterator_wrapper(m_it); - } - - virtual any_single_pass_iterator_wrapper< - WrappedIterator - , typename any_single_pass_iterator_wrapper::const_reference - , Buffer - >* clone_const_ref( - typename any_single_pass_iterator_wrapper::buffer_type& buffer - ) const - { - typedef any_single_pass_iterator_wrapper< - WrappedIterator - , typename any_single_pass_iterator_wrapper::const_reference - , Buffer - > result_type; - - return new (buffer.allocate(sizeof(result_type))) - result_type(m_it); - } - - virtual any_single_pass_iterator_wrapper< - WrappedIterator - , typename any_single_pass_iterator_wrapper::reference_as_value_type - , Buffer - >* clone_reference_as_value( - typename any_single_pass_iterator_wrapper::buffer_type& buffer - ) const - { - typedef any_single_pass_iterator_wrapper< - WrappedIterator - , typename any_single_pass_iterator_wrapper::reference_as_value_type - , Buffer - > result_type; - - return new (buffer.allocate(sizeof(result_type))) - result_type(m_it); - } - - virtual void increment() - { - ++m_it; - } - - virtual bool equal(const any_single_pass_iterator_interface<Reference, Buffer>& other) const - { - return m_it == range_detail::polymorphic_ref_downcast<const any_single_pass_iterator_wrapper>(other).m_it; - } - - virtual reference dereference() const - { - return dereference_cast<reference>(*m_it); - } - - private: - WrappedIterator m_it; - }; - - template< - class WrappedIterator - , class Reference - , class Buffer - > - class any_forward_iterator_wrapper - : public any_forward_iterator_interface< - Reference - , Buffer - > - { - BOOST_RANGE_CONCEPT_ASSERT(( ForwardIteratorConcept<WrappedIterator> )); - typedef any_forward_iterator_interface< - Reference, - Buffer - > base_type; - - public: - typedef typename base_type::reference reference; - - any_forward_iterator_wrapper() - : m_it() - {} - - explicit any_forward_iterator_wrapper(const WrappedIterator& it) - : m_it(it) - {} - - // any_forward_iterator_interface<Reference> implementation - virtual any_forward_iterator_wrapper* clone( - typename any_forward_iterator_wrapper::buffer_type& buffer - ) const - { - return new (buffer.allocate(sizeof(*this))) - any_forward_iterator_wrapper(m_it); - } - - virtual any_forward_iterator_wrapper< - WrappedIterator - , typename any_forward_iterator_wrapper::const_reference - , Buffer - >* clone_const_ref( - typename any_forward_iterator_wrapper::buffer_type& buffer - ) const - { - typedef any_forward_iterator_wrapper< - WrappedIterator - , typename any_forward_iterator_wrapper::const_reference - , Buffer - > result_type; - - return new (buffer.allocate(sizeof(result_type))) - result_type(m_it); - } - - virtual any_forward_iterator_wrapper< - WrappedIterator - , typename any_forward_iterator_wrapper::reference_as_value_type - , Buffer - >* clone_reference_as_value( - typename any_forward_iterator_wrapper::buffer_type& buffer - ) const - { - typedef any_forward_iterator_wrapper< - WrappedIterator - , typename any_forward_iterator_wrapper::reference_as_value_type - , Buffer - > result_type; - - return new (buffer.allocate(sizeof(result_type))) - result_type(m_it); - } - - virtual void increment() - { - ++m_it; - } - - virtual bool equal(const any_single_pass_iterator_interface<Reference, Buffer>& other) const - { - return m_it == range_detail::polymorphic_ref_downcast<const any_forward_iterator_wrapper>(other).m_it; - } - - virtual reference dereference() const - { - return dereference_cast<reference>(*m_it); - } - private: - WrappedIterator m_it; - }; - - template< - class WrappedIterator - , class Reference - , class Buffer - > - class any_bidirectional_iterator_wrapper - : public any_bidirectional_iterator_interface< - Reference - , Buffer - > - { - BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalIteratorConcept<WrappedIterator> )); - typedef any_bidirectional_iterator_interface< - Reference, - Buffer - > base_type; - - public: - typedef typename base_type::reference reference; - - any_bidirectional_iterator_wrapper() - : m_it() - { - } - - explicit any_bidirectional_iterator_wrapper(const WrappedIterator& it) - : m_it(it) - { - } - - virtual any_bidirectional_iterator_wrapper* clone( - typename any_bidirectional_iterator_wrapper::buffer_type& buffer - ) const - { - return new (buffer.allocate(sizeof(*this))) - any_bidirectional_iterator_wrapper(*this); - } - - virtual any_bidirectional_iterator_wrapper< - WrappedIterator - , typename any_bidirectional_iterator_wrapper::const_reference - , Buffer - >* clone_const_ref( - typename any_bidirectional_iterator_wrapper::buffer_type& buffer - ) const - { - typedef any_bidirectional_iterator_wrapper< - WrappedIterator - , typename any_bidirectional_iterator_wrapper::const_reference - , Buffer - > result_type; - - return new (buffer.allocate(sizeof(result_type))) - result_type(m_it); - } - - virtual any_bidirectional_iterator_wrapper< - WrappedIterator - , typename any_bidirectional_iterator_wrapper::reference_as_value_type - , Buffer - >* clone_reference_as_value( - typename any_bidirectional_iterator_wrapper::buffer_type& buffer - ) const - { - typedef any_bidirectional_iterator_wrapper< - WrappedIterator - , typename any_bidirectional_iterator_wrapper::reference_as_value_type - , Buffer - > result_type; - - return new (buffer.allocate(sizeof(result_type))) - result_type(m_it); - } - - virtual void increment() - { - ++m_it; - } - - virtual void decrement() - { - --m_it; - } - - virtual bool equal(const any_single_pass_iterator_interface<Reference, Buffer>& other) const - { - return m_it == range_detail::polymorphic_ref_downcast<const any_bidirectional_iterator_wrapper>(other).m_it; - } - - virtual reference dereference() const - { - return dereference_cast<reference>(*m_it); - } - - private: - WrappedIterator m_it; - }; - - template< - class WrappedIterator - , class Reference - , class Difference - , class Buffer - > - class any_random_access_iterator_wrapper - : public any_random_access_iterator_interface< - Reference - , Difference - , Buffer - > - { - BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessIteratorConcept<WrappedIterator> )); - typedef any_random_access_iterator_interface< - Reference, - Difference, - Buffer - > base_type; - - public: - typedef typename base_type::reference reference; - typedef Difference difference_type; - - any_random_access_iterator_wrapper() - : m_it() - { - } - - explicit any_random_access_iterator_wrapper(const WrappedIterator& other) - : m_it(other) - { - } - - virtual any_random_access_iterator_wrapper* clone( - typename any_random_access_iterator_wrapper::buffer_type& buffer - ) const - { - return new (buffer.allocate(sizeof(*this))) - any_random_access_iterator_wrapper(*this); - } - - virtual any_random_access_iterator_wrapper< - WrappedIterator - , typename any_random_access_iterator_wrapper::const_reference - , Difference - , Buffer - >* clone_const_ref( - typename any_random_access_iterator_wrapper::buffer_type& buffer - ) const - { - typedef any_random_access_iterator_wrapper< - WrappedIterator - , typename any_random_access_iterator_wrapper::const_reference - , Difference - , Buffer - > result_type; - - return new (buffer.allocate(sizeof(result_type))) - result_type(m_it); - } - - virtual any_random_access_iterator_wrapper< - WrappedIterator - , typename any_random_access_iterator_wrapper::reference_as_value_type - , Difference - , Buffer - >* clone_reference_as_value( - typename any_random_access_iterator_wrapper::buffer_type& buffer - ) const - { - typedef any_random_access_iterator_wrapper< - WrappedIterator - , typename any_random_access_iterator_wrapper::reference_as_value_type - , Difference - , Buffer - > result_type; - - return new (buffer.allocate(sizeof(result_type))) - result_type(m_it); - } - - virtual void increment() - { - ++m_it; - } - - virtual bool equal(const any_single_pass_iterator_interface<Reference, Buffer>& other) const - { - return m_it == range_detail::polymorphic_ref_downcast<const any_random_access_iterator_wrapper>(other).m_it; - } - - virtual void decrement() - { - --m_it; - } - - virtual void advance(Difference offset) - { - m_it += offset; - } - - virtual reference dereference() const - { - return dereference_cast<reference>(*m_it); - } - - virtual Difference distance_to(const any_random_access_iterator_interface<Reference, Difference, Buffer>& other) const - { - return range_detail::polymorphic_ref_downcast<const any_random_access_iterator_wrapper>(other).m_it - m_it; - } - - private: - WrappedIterator m_it; - }; - - template< - class WrappedIterator - , class Traversal - , class Reference - , class Difference - , class Buffer - > - struct any_iterator_wrapper_type_generator; - - template< - class WrappedIterator - , class Reference - , class Difference - , class Buffer - > - struct any_iterator_wrapper_type_generator< - WrappedIterator - , incrementable_traversal_tag - , Reference - , Difference - , Buffer - > - { - typedef any_incrementable_iterator_wrapper< - WrappedIterator - , Reference - , Buffer - > type; - }; - - template< - class WrappedIterator - , class Reference - , class Difference - , class Buffer - > - struct any_iterator_wrapper_type_generator< - WrappedIterator - , single_pass_traversal_tag - , Reference - , Difference - , Buffer - > - { - typedef any_single_pass_iterator_wrapper< - WrappedIterator - , Reference - , Buffer - > type; - }; - - template< - class WrappedIterator - , class Reference - , class Difference - , class Buffer - > - struct any_iterator_wrapper_type_generator< - WrappedIterator - , forward_traversal_tag - , Reference - , Difference - , Buffer - > - { - typedef any_forward_iterator_wrapper< - WrappedIterator - , Reference - , Buffer - > type; - }; - - template< - class WrappedIterator - , class Reference - , class Difference - , class Buffer - > - struct any_iterator_wrapper_type_generator< - WrappedIterator - , bidirectional_traversal_tag - , Reference - , Difference - , Buffer - > - { - typedef any_bidirectional_iterator_wrapper< - WrappedIterator - , Reference - , Buffer - > type; - }; - - template< - class WrappedIterator - , class Reference - , class Difference - , class Buffer - > - struct any_iterator_wrapper_type_generator< - WrappedIterator - , random_access_traversal_tag - , Reference - , Difference - , Buffer - > - { - typedef any_random_access_iterator_wrapper< - WrappedIterator - , Reference - , Difference - , Buffer - > type; - }; - - } // namespace range_detail -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/detail/collection_traits.hpp b/contrib/restricted/boost/boost/range/detail/collection_traits.hpp deleted file mode 100644 index 823c0afc95..0000000000 --- a/contrib/restricted/boost/boost/range/detail/collection_traits.hpp +++ /dev/null @@ -1,265 +0,0 @@ -// Boost string_algo library collection_traits.hpp header file -------------// - -// Copyright Pavol Droba 2002-2003. 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) - -// (C) Copyright Thorsten Ottosen 2002-2003. 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) - -// (C) Copyright Jeremy Siek 2001. 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) - -// Original idea of container traits was proposed by Jeremy Siek and -// Thorsten Ottosen. This implementation is lightweighted version -// of container_traits adapter for usage with string_algo library - -#ifndef BOOST_RANGE_STRING_COLLECTION_TRAITS_HPP -#define BOOST_RANGE_STRING_COLLECTION_TRAITS_HPP - -#include <boost/type_traits/is_array.hpp> -#include <boost/type_traits/is_pointer.hpp> -#include <boost/mpl/eval_if.hpp> - -// Implementation -#include <boost/range/detail/collection_traits_detail.hpp> - -/*! \file - Defines collection_traits class and related free-standing functions. - This facility is used to unify the access to different types of collections. - It allows the algorithms in the library to work with STL collections, c-style - array, null-terminated c-strings (and more) using the same interface. -*/ - -namespace boost { - namespace algorithm { - -// collection_traits template class -----------------------------------------// - - //! collection_traits class - /*! - Collection traits provide uniform access to different types of - collections. This functionality allows to write generic algorithms - which work with several different kinds of collections. - - Currently following collection types are supported: - - containers with STL compatible container interface ( see ContainerConcept ) - ( i.e. \c std::vector<>, \c std::list<>, \c std::string<> ... ) - - c-style array - ( \c char[10], \c int[15] ... ) - - null-terminated c-strings - ( \c char*, \c wchar_T* ) - - std::pair of iterators - ( i.e \c std::pair<vector<int>::iterator,vector<int>::iterator> ) - - Collection traits provide an external collection interface operations. - All are accessible using free-standing functions. - - The following operations are supported: - - \c size() - - \c empty() - - \c begin() - - \c end() - - Container traits have somewhat limited functionality on compilers not - supporting partial template specialization and partial template ordering. - */ - template< typename T > - struct collection_traits - { - private: - typedef typename ::boost::mpl::eval_if< - ::boost::algorithm::detail::is_pair<T>, - detail::pair_container_traits_selector<T>, - typename ::boost::mpl::eval_if< - ::boost::is_array<T>, - detail::array_container_traits_selector<T>, - typename ::boost::mpl::eval_if< - ::boost::is_pointer<T>, - detail::pointer_container_traits_selector<T>, - detail::default_container_traits_selector<T> - > - > - >::type container_helper_type; - public: - //! Function type - typedef container_helper_type function_type; - //! Value type - typedef typename - container_helper_type::value_type value_type; - //! Size type - typedef typename - container_helper_type::size_type size_type; - //! Iterator type - typedef typename - container_helper_type::iterator iterator; - //! Const iterator type - typedef typename - container_helper_type::const_iterator const_iterator; - //! Result iterator type ( iterator of const_iterator, depending on the constness of the container ) - typedef typename - container_helper_type::result_iterator result_iterator; - //! Difference type - typedef typename - container_helper_type::difference_type difference_type; - - }; // 'collection_traits' - -// collection_traits metafunctions -----------------------------------------// - - //! Container value_type trait - /*! - Extract the type of elements contained in a container - */ - template< typename C > - struct value_type_of - { - typedef typename collection_traits<C>::value_type type; - }; - - //! Container difference trait - /*! - Extract the container's difference type - */ - template< typename C > - struct difference_type_of - { - typedef typename collection_traits<C>::difference_type type; - }; - - //! Container iterator trait - /*! - Extract the container's iterator type - */ - template< typename C > - struct iterator_of - { - typedef typename collection_traits<C>::iterator type; - }; - - //! Container const_iterator trait - /*! - Extract the container's const_iterator type - */ - template< typename C > - struct const_iterator_of - { - typedef typename collection_traits<C>::const_iterator type; - }; - - - //! Container result_iterator - /*! - Extract the container's result_iterator type. This type maps to \c C::iterator - for mutable container and \c C::const_iterator for const containers. - */ - template< typename C > - struct result_iterator_of - { - typedef typename collection_traits<C>::result_iterator type; - }; - -// collection_traits related functions -----------------------------------------// - - //! Free-standing size() function - /*! - Get the size of the container. Uses collection_traits. - */ - template< typename C > - inline typename collection_traits<C>::size_type - size( const C& c ) - { - return collection_traits<C>::function_type::size( c ); - } - - //! Free-standing empty() function - /*! - Check whether the container is empty. Uses container traits. - */ - template< typename C > - inline bool empty( const C& c ) - { - return collection_traits<C>::function_type::empty( c ); - } - -#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - //! Free-standing begin() function - /*! - Get the begin iterator of the container. Uses collection_traits. - */ - template< typename C > - inline typename collection_traits<C>::iterator - begin( C& c ) - { - return collection_traits<C>::function_type::begin( c ); - } - - //! Free-standing begin() function - /*! - \overload - */ - template< typename C > - inline typename collection_traits<C>::const_iterator - begin( const C& c ) - { - return collection_traits<C>::function_type::begin( c ); - } - - //! Free-standing end() function - /*! - Get the begin iterator of the container. Uses collection_traits. - */ - template< typename C > - inline typename collection_traits<C>::iterator - end( C& c ) - { - return collection_traits<C>::function_type::end( c ); - } - - //! Free-standing end() function - /*! - \overload - */ - template< typename C > - inline typename collection_traits<C>::const_iterator - end( const C& c ) - { - return collection_traits<C>::function_type::end( c ); - } - -#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - //! Free-standing begin() function - /*! - \overload - */ - template< typename C > - inline typename collection_traits<C>::result_iterator - begin( C& c ) - { - return collection_traits<C>::function_type::begin( c ); - } - - //! Free-standing end() function - /*! - \overload - */ - template< typename C > - inline typename collection_traits<C>::result_iterator - end( C& c ) - { - return collection_traits<C>::function_type::end( c ); - } - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - } // namespace algorithm -} // namespace boost - -#endif // BOOST_STRING_COLLECTION_TRAITS_HPP diff --git a/contrib/restricted/boost/boost/range/detail/collection_traits_detail.hpp b/contrib/restricted/boost/boost/range/detail/collection_traits_detail.hpp deleted file mode 100644 index 15459974ef..0000000000 --- a/contrib/restricted/boost/boost/range/detail/collection_traits_detail.hpp +++ /dev/null @@ -1,502 +0,0 @@ -// Boost string_algo library collection_traits.hpp header file -----------------------// - -// Copyright Pavol Droba 2002-2003. 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) - -// See http://www.boost.org for updates, documentation, and revision history. - -#ifndef BOOST_RANGE_STRING_DETAIL_COLLECTION_TRAITS_HPP -#define BOOST_RANGE_STRING_DETAIL_COLLECTION_TRAITS_HPP - -#include <cstddef> -#include <string> -#include <boost/type_traits/is_array.hpp> -#include <boost/type_traits/is_pointer.hpp> -#include <boost/type_traits/is_const.hpp> -#include <boost/type_traits/is_convertible.hpp> -#include <boost/type_traits/remove_pointer.hpp> -#include <boost/type_traits/remove_cv.hpp> -#include <boost/mpl/eval_if.hpp> -#include <boost/mpl/identity.hpp> -#include <boost/mpl/vector.hpp> -#include <boost/mpl/fold.hpp> -#include <boost/detail/iterator.hpp> - -// Container traits implementation --------------------------------------------------------- - -namespace boost { - namespace algorithm { - namespace detail { - -// Default collection traits ----------------------------------------------------------------- - - // Default collection helper - /* - Wraps std::container compliant containers - */ - template< typename ContainerT > - struct default_container_traits - { - typedef typename ContainerT::value_type value_type; - typedef typename ContainerT::iterator iterator; - typedef typename ContainerT::const_iterator const_iterator; - typedef typename - ::boost::mpl::if_< ::boost::is_const<ContainerT>, - const_iterator, - iterator - >::type result_iterator; - typedef typename ContainerT::difference_type difference_type; - typedef typename ContainerT::size_type size_type; - - // static operations - template< typename C > - static size_type size( const C& c ) - { - return c.size(); - } - - template< typename C > - static bool empty( const C& c ) - { - return c.empty(); - } - -#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - template< typename C > - static iterator begin( C& c ) - { - return c.begin(); - } - - template< typename C > - static const_iterator begin( const C& c ) - { - return c.begin(); - } - - template< typename C > - static iterator end( C& c ) - { - return c.end(); - } - - template< typename C > - static const_iterator end( const C& c ) - { - return c.end(); - } - -#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - template< typename C > - static result_iterator begin( C& c ) - { - return c.begin(); - } - - template< typename C > - static result_iterator end( C& c ) - { - return c.end(); - } - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - }; - - template<typename T> - struct default_container_traits_selector - { - typedef default_container_traits<T> type; - }; - -// Pair container traits --------------------------------------------------------------------- - - typedef double yes_type; - typedef char no_type; - - // pair selector - template< typename T, typename U > - yes_type is_pair_impl( const std::pair<T,U>* ); - no_type is_pair_impl( ... ); - - template<typename T> struct is_pair - { - private: - static T* t; - public: - BOOST_STATIC_CONSTANT( bool, value= - sizeof(is_pair_impl(t))==sizeof(yes_type) ); - }; - - // pair helper - template< typename PairT > - struct pair_container_traits - { - typedef typename PairT::first_type element_type; - - typedef typename ::boost::detail:: - iterator_traits<element_type>::value_type value_type; - typedef std::size_t size_type; - typedef typename ::boost::detail:: - iterator_traits<element_type>::difference_type difference_type; - - typedef element_type iterator; - typedef element_type const_iterator; - typedef element_type result_iterator; - - // static operations - template< typename P > - static size_type size( const P& p ) - { - difference_type diff = std::distance( p.first, p.second ); - if ( diff < 0 ) - return 0; - else - return diff; - } - - template< typename P > - static bool empty( const P& p ) - { - return p.first==p.second; - } - - template< typename P > - static const_iterator begin( const P& p ) - { - return p.first; - } - - template< typename P > - static const_iterator end( const P& p ) - { - return p.second; - } - }; // 'pair_container_helper' - - template<typename T> - struct pair_container_traits_selector - { - typedef pair_container_traits<T> type; - }; - -// Array container traits --------------------------------------------------------------- - - // array traits ( partial specialization ) - template< typename T > - struct array_traits; - - template< typename T, std::size_t sz > - struct array_traits<T[sz]> - { - // typedef - typedef T* iterator; - typedef const T* const_iterator; - typedef T value_type; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - - // size of the array ( static ); - BOOST_STATIC_CONSTANT( size_type, array_size = sz ); - }; - - - // array length resolving - /* - Lenght of string contained in a static array could - be different from the size of the array. - For string processing we need the length without - terminating 0. - - Therefore, the length is calculated for char and wchar_t - using char_traits, rather then simply returning - the array size. - */ - template< typename T > - struct array_length_selector - { - template< typename TraitsT > - struct array_length - { - typedef typename - TraitsT::size_type size_type; - - BOOST_STATIC_CONSTANT( - size_type, - array_size=TraitsT::array_size ); - - template< typename A > - static size_type length( const A& ) - { - return array_size; - } - - template< typename A > - static bool empty( const A& ) - { - return array_size==0; - } - }; - }; - - // specialization for char - template<> - struct array_length_selector<char> - { - template< typename TraitsT > - struct array_length - { - typedef typename - TraitsT::size_type size_type; - - template< typename A > - static size_type length( const A& a ) - { - if ( a==0 ) - return 0; - else - return std::char_traits<char>::length(a); - } - - template< typename A > - static bool empty( const A& a ) - { - return a==0 || a[0]==0; - } - }; - }; - - // specialization for wchar_t - template<> - struct array_length_selector<wchar_t> - { - template< typename TraitsT > - struct array_length - { - typedef typename - TraitsT::size_type size_type; - - template< typename A > - static size_type length( const A& a ) - { - if ( a==0 ) - return 0; - else - return std::char_traits<wchar_t>::length(a); - } - - template< typename A > - static bool empty( const A& a ) - { - return a==0 || a[0]==0; - } - }; - }; - - template< typename T > - struct array_container_traits - { - private: - // resolve array traits - typedef array_traits<T> traits_type; - - public: - typedef typename - traits_type::value_type value_type; - typedef typename - traits_type::iterator iterator; - typedef typename - traits_type::const_iterator const_iterator; - typedef typename - traits_type::size_type size_type; - typedef typename - traits_type::difference_type difference_type; - - typedef typename - ::boost::mpl::if_< ::boost::is_const<T>, - const_iterator, - iterator - >::type result_iterator; - - private: - // resolve array size - typedef typename - ::boost::remove_cv<value_type>::type char_type; - typedef typename - array_length_selector<char_type>:: - BOOST_NESTED_TEMPLATE array_length<traits_type> array_length_type; - - public: - BOOST_STATIC_CONSTANT( size_type, array_size = traits_type::array_size ); - - // static operations - template< typename A > - static size_type size( const A& a ) - { - return array_length_type::length(a); - } - - template< typename A > - static bool empty( const A& a ) - { - return array_length_type::empty(a); - } - - -#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - template< typename A > - static iterator begin( A& a ) - { - return a; - } - - template< typename A > - static const_iterator begin( const A& a ) - { - return a; - } - - template< typename A > - static iterator end( A& a ) - { - return a+array_length_type::length(a); - } - - template< typename A > - static const_iterator end( const A& a ) - { - return a+array_length_type::length(a); - } - -#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - template< typename A > - static result_iterator begin( A& a ) - { - return a; - } - - template< typename A > - static result_iterator end( A& a ) - { - return a+array_length_type::length(a); - } - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - }; - - template<typename T> - struct array_container_traits_selector - { - typedef array_container_traits<T> type; - }; - -// Pointer container traits --------------------------------------------------------------- - - template<typename T> - struct pointer_container_traits - { - typedef typename - ::boost::remove_pointer<T>::type value_type; - - typedef typename - ::boost::remove_cv<value_type>::type char_type; - typedef ::std::char_traits<char_type> char_traits; - - typedef value_type* iterator; - typedef const value_type* const_iterator; - typedef std::ptrdiff_t difference_type; - typedef std::size_t size_type; - - typedef typename - ::boost::mpl::if_< ::boost::is_const<T>, - const_iterator, - iterator - >::type result_iterator; - - // static operations - template< typename P > - static size_type size( const P& p ) - { - if ( p==0 ) - return 0; - else - return char_traits::length(p); - } - - template< typename P > - static bool empty( const P& p ) - { - return p==0 || p[0]==0; - } - -#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - template< typename P > - static iterator begin( P& p ) - { - return p; - } - - template< typename P > - static const_iterator begin( const P& p ) - { - return p; - } - - template< typename P > - static iterator end( P& p ) - { - if ( p==0 ) - return p; - else - return p+char_traits::length(p); - } - - template< typename P > - static const_iterator end( const P& p ) - { - if ( p==0 ) - return p; - else - return p+char_traits::length(p); - } - -#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - template< typename P > - static result_iterator begin( P& p ) - { - return p; - } - - template< typename P > - static result_iterator end( P& p ) - { - if ( p==0 ) - return p; - else - return p+char_traits::length(p); - } - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - }; - - template<typename T> - struct pointer_container_traits_selector - { - typedef pointer_container_traits<T> type; - }; - - } // namespace detail - } // namespace algorithm -} // namespace boost - - -#endif // BOOST_STRING_DETAIL_COLLECTION_HPP diff --git a/contrib/restricted/boost/boost/range/detail/combine_cxx03.hpp b/contrib/restricted/boost/boost/range/detail/combine_cxx03.hpp deleted file mode 100644 index 47da6a6d6b..0000000000 --- a/contrib/restricted/boost/boost/range/detail/combine_cxx03.hpp +++ /dev/null @@ -1,131 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 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_COMBINE_CXX03_HPP -#define BOOST_RANGE_DETAIL_COMBINE_CXX03_HPP - -#ifndef BOOST_RANGE_MIN_COMBINE_ARGS -#define BOOST_RANGE_MIN_COMBINE_ARGS 2 -#endif - -#ifndef BOOST_RANGE_MAX_COMBINE_ARGS -#define BOOST_RANGE_MAX_COMBINE_ARGS 5 -#endif - -#include <boost/config.hpp> -#include <boost/iterator/zip_iterator.hpp> -#include <boost/preprocessor/arithmetic/dec.hpp> -#include <boost/preprocessor/arithmetic/div.hpp> -#include <boost/preprocessor/arithmetic/mul.hpp> -#include <boost/preprocessor/control.hpp> -#include <boost/preprocessor/control/while.hpp> -#include <boost/preprocessor/facilities/empty.hpp> -#include <boost/preprocessor/facilities/identity.hpp> -#include <boost/preprocessor/iteration/local.hpp> -#include <boost/preprocessor/punctuation/comma.hpp> -#include <boost/preprocessor/repetition.hpp> -#include <boost/preprocessor/tuple/elem.hpp> -#include <boost/range/iterator_range_core.hpp> -#include <boost/type_traits/remove_reference.hpp> -#include <boost/mpl/transform.hpp> -#include <boost/utility/result_of.hpp> - -#include <vector> -#include <list> - -namespace boost -{ - namespace range_detail - { - -template<typename F, typename T, int SIZE> -struct combined_result_impl; - -template<typename F, typename T> -struct combined_result - : combined_result_impl<F, T, tuples::length<T>::value> -{ -}; - -#define BOOST_RANGE_combined_element(z, n, data) \ - typename tuples::element<n, T>::type - -#define BOOST_RANGE_combined_result(z, n, data) \ - template<typename F, typename T> \ - struct combined_result_impl <F,T,n> \ - : result_of<F(BOOST_PP_ENUM(n, BOOST_RANGE_combined_element, ~))> \ - { \ - }; - -#define BOOST_PP_LOCAL_MACRO(n) BOOST_RANGE_combined_result(~,n,~) - -#define BOOST_PP_LOCAL_LIMITS (BOOST_RANGE_MIN_COMBINE_ARGS, \ - BOOST_RANGE_MAX_COMBINE_ARGS) -#include BOOST_PP_LOCAL_ITERATE() - -#define BOOST_RANGE_combined_get(z, n, data) get<n>(tuple) - -#define BOOST_RANGE_combined_unpack(z, n, data) \ - template<typename F, typename T> inline \ - typename combined_result<F,T>::type \ - unpack_(mpl::int_<n>, F f, const T& tuple) \ - { \ - return f(BOOST_PP_ENUM(n, BOOST_RANGE_combined_get, ~)); \ - } - -#define BOOST_PP_LOCAL_MACRO(n) BOOST_RANGE_combined_unpack(~,n,~) -#define BOOST_PP_LOCAL_LIMITS (BOOST_RANGE_MIN_COMBINE_ARGS, \ - BOOST_RANGE_MAX_COMBINE_ARGS) -#include BOOST_PP_LOCAL_ITERATE() - -} // namespace range_detail - -namespace range -{ - -#define BOOST_RANGE_combined_seq(z, n, data) boost::data(BOOST_PP_CAT(r,n)) - -#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES - -#include <boost/range/detail/combine_no_rvalue.hpp> - -#else // by using rvalue references we avoid requiring 2^n overloads. - -#include <boost/range/detail/combine_rvalue.hpp> - -#endif - -#define BOOST_PP_LOCAL_MACRO(n) BOOST_RANGE_combine(~,n,~) -#define BOOST_PP_LOCAL_LIMITS (BOOST_RANGE_MIN_COMBINE_ARGS, \ - BOOST_RANGE_MAX_COMBINE_ARGS) -#include BOOST_PP_LOCAL_ITERATE() - - } // namespace range - - using boost::range::combine; - -} // namespace boost - -#endif // include guard - -#undef BOOST_RANGE_combined_element -#undef BOOST_RANGE_combined_result -#undef BOOST_RANGE_combined_get -#undef BOOST_RANGE_combined_unpack -#undef BOOST_RANGE_combined_seq -#undef BOOST_RANGE_combined_exp_pred -#undef BOOST_RANGE_combined_exp_op -#undef BOOST_RANGE_combined_exp -#undef BOOST_RANGE_combined_bitset_pred -#undef BOOST_RANGE_combined_bitset_op -#undef BOOST_RANGE_combined_bitset -#undef BOOST_RANGE_combined_range_iterator -#undef BOOST_RANGE_combined_args -#undef BOOST_RANGE_combine_impl -#undef BOOST_RANGE_combine diff --git a/contrib/restricted/boost/boost/range/detail/combine_cxx11.hpp b/contrib/restricted/boost/boost/range/detail/combine_cxx11.hpp deleted file mode 100644 index a7fa5b1e94..0000000000 --- a/contrib/restricted/boost/boost/range/detail/combine_cxx11.hpp +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright Neil Groves 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_COMBINE_CXX11_HPP -#define BOOST_RANGE_DETAIL_COMBINE_CXX11_HPP - -#include <boost/range/iterator_range_core.hpp> -#include <boost/range/iterator.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/iterator/zip_iterator.hpp> - -#include <fstream> - -namespace boost -{ - namespace range - { - -template<typename... Ranges> -auto combine(Ranges&&... rngs) -> - combined_range<decltype(boost::make_tuple(boost::begin(rngs)...))> -{ - return combined_range<decltype(boost::make_tuple(boost::begin(rngs)...))>( - boost::make_tuple(boost::begin(rngs)...), - boost::make_tuple(boost::end(rngs)...)); -} - - } // namespace range - -using range::combine; - -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/detail/combine_no_rvalue.hpp b/contrib/restricted/boost/boost/range/detail/combine_no_rvalue.hpp deleted file mode 100644 index bdb3950dc4..0000000000 --- a/contrib/restricted/boost/boost/range/detail/combine_no_rvalue.hpp +++ /dev/null @@ -1,73 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 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/ -// -#define BOOST_RANGE_combined_exp_pred(d, data) BOOST_PP_TUPLE_ELEM(3, 0, data) - -#define BOOST_RANGE_combined_exp_op(d, data) \ - ( \ - BOOST_PP_DEC( \ - BOOST_PP_TUPLE_ELEM(3, 0, data) \ - ), \ - BOOST_PP_TUPLE_ELEM(3, 1, data), \ - BOOST_PP_MUL_D( \ - d, \ - BOOST_PP_TUPLE_ELEM(3, 2, data), \ - BOOST_PP_TUPLE_ELEM(3, 1, data) \ - ) \ - ) - -#define BOOST_RANGE_combined_exp(x, n) \ - BOOST_PP_TUPLE_ELEM(3, 2, \ - BOOST_PP_WHILE(BOOST_RANGE_combined_exp_pred, \ - BOOST_RANGE_combined_exp_op, (n, x, 1))) - -#define BOOST_RANGE_combined_bitset_pred(n, state) \ - BOOST_PP_TUPLE_ELEM(2,1,state) - -#define BOOST_RANGE_combined_bitset_op(d, state) \ - (BOOST_PP_DIV_D(d, BOOST_PP_TUPLE_ELEM(2,0,state), 2), \ - BOOST_PP_DEC(BOOST_PP_TUPLE_ELEM(2,1,state))) - -#define BOOST_RANGE_combined_bitset(i, n) \ -BOOST_PP_MOD(BOOST_PP_TUPLE_ELEM(2, 0, \ - BOOST_PP_WHILE(BOOST_RANGE_combined_bitset_pred, \ - BOOST_RANGE_combined_bitset_op, (i,n))), 2) - -#define BOOST_RANGE_combined_range_iterator(z, n, i) \ - typename range_iterator< \ - BOOST_PP_CAT(R,n) \ - BOOST_PP_IF( \ - BOOST_RANGE_combined_bitset(i,n), \ - BOOST_PP_IDENTITY(const), \ - BOOST_PP_EMPTY)() \ - >::type - -#define BOOST_RANGE_combined_args(z, n, i) \ - BOOST_PP_CAT(R, n) \ - BOOST_PP_IF(BOOST_RANGE_combined_bitset(i,n), const&, &) \ - BOOST_PP_CAT(r, n) - -#define BOOST_RANGE_combine_impl(z, i, n)\ - template<BOOST_PP_ENUM_PARAMS(n, typename R)> \ - inline range::combined_range< \ - boost::tuple<BOOST_PP_ENUM(n, BOOST_RANGE_combined_range_iterator, i)> \ - > \ - combine(BOOST_PP_ENUM(n, BOOST_RANGE_combined_args, i)) \ - { \ - typedef tuple< \ - BOOST_PP_ENUM(n, BOOST_RANGE_combined_range_iterator, i) \ - > rng_tuple_t; \ - return range::combined_range<rng_tuple_t>( \ - rng_tuple_t(BOOST_PP_ENUM(n, BOOST_RANGE_combined_seq, begin)), \ - rng_tuple_t(BOOST_PP_ENUM(n, BOOST_RANGE_combined_seq, end))); \ - } - - -#define BOOST_RANGE_combine(z, n, data) \ - BOOST_PP_REPEAT(BOOST_RANGE_combined_exp(2,n), BOOST_RANGE_combine_impl, n) diff --git a/contrib/restricted/boost/boost/range/detail/combine_rvalue.hpp b/contrib/restricted/boost/boost/range/detail/combine_rvalue.hpp deleted file mode 100644 index 2e323b75ad..0000000000 --- a/contrib/restricted/boost/boost/range/detail/combine_rvalue.hpp +++ /dev/null @@ -1,32 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 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/ -// -#define BOOST_RANGE_combined_args(z, n, i) \ - BOOST_PP_CAT(R, n)&& BOOST_PP_CAT(r, n) - -#define BOOST_RANGE_combined_range_iterator(z, n, i) \ - typename range_iterator< \ - typename remove_reference<BOOST_PP_CAT(R,n)>::type \ - >::type - - -#define BOOST_RANGE_combine(z, n, data) \ - template <BOOST_PP_ENUM_PARAMS(n, typename R)> \ - inline range::combined_range< \ - tuple<BOOST_PP_ENUM(n, BOOST_RANGE_combined_range_iterator, ~)> \ - > \ - combine(BOOST_PP_ENUM(n, BOOST_RANGE_combined_args, ~)) \ - { \ - typedef tuple< \ - BOOST_PP_ENUM(n, BOOST_RANGE_combined_range_iterator, ~) \ - > rng_tuple_t; \ - return range::combined_range<rng_tuple_t>( \ - rng_tuple_t(BOOST_PP_ENUM(n, BOOST_RANGE_combined_seq, begin)), \ - rng_tuple_t(BOOST_PP_ENUM(n, BOOST_RANGE_combined_seq, end))); \ - } diff --git a/contrib/restricted/boost/boost/range/detail/demote_iterator_traversal_tag.hpp b/contrib/restricted/boost/boost/range/detail/demote_iterator_traversal_tag.hpp deleted file mode 100644 index 6d65720a05..0000000000 --- a/contrib/restricted/boost/boost/range/detail/demote_iterator_traversal_tag.hpp +++ /dev/null @@ -1,91 +0,0 @@ -// Boost.Range library -// -// Copyright 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) -// -// Acknowledgements: -// aschoedl supplied a fix to supply the level of interoperability I had -// originally intended, but failed to implement. -// -// For more information, see http://www.boost.org/libs/range/ -// -#ifndef BOOST_RANGE_DETAIL_DEMOTE_ITERATOR_TRAVERSAL_TAG_HPP_INCLUDED -#define BOOST_RANGE_DETAIL_DEMOTE_ITERATOR_TRAVERSAL_TAG_HPP_INCLUDED - -#include <boost/iterator/iterator_categories.hpp> - -namespace boost -{ - namespace range_detail - { - -template<class IteratorTraversalTag1, class IteratorTraversalTag2> -struct inner_demote_iterator_traversal_tag -{ -}; - -#define BOOST_DEMOTE_TRAVERSAL_TAG( Tag1, Tag2, ResultTag ) \ -template<> struct inner_demote_iterator_traversal_tag< Tag1 , Tag2 > \ -{ \ - typedef ResultTag type; \ -}; - -BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, no_traversal_tag, no_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, incrementable_traversal_tag, no_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, single_pass_traversal_tag, no_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, forward_traversal_tag, no_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, bidirectional_traversal_tag, no_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, random_access_traversal_tag, no_traversal_tag ) - -BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, no_traversal_tag, no_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, incrementable_traversal_tag, incrementable_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, single_pass_traversal_tag, incrementable_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, forward_traversal_tag, incrementable_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, bidirectional_traversal_tag, incrementable_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, random_access_traversal_tag, incrementable_traversal_tag ) - -BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, no_traversal_tag, no_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, incrementable_traversal_tag, incrementable_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, single_pass_traversal_tag, single_pass_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, forward_traversal_tag, single_pass_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, bidirectional_traversal_tag, single_pass_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, random_access_traversal_tag, single_pass_traversal_tag ) - -BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, no_traversal_tag, no_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, incrementable_traversal_tag, incrementable_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, single_pass_traversal_tag, single_pass_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, forward_traversal_tag, forward_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, bidirectional_traversal_tag, forward_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, random_access_traversal_tag, forward_traversal_tag ) - -BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, no_traversal_tag, no_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, incrementable_traversal_tag, incrementable_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, single_pass_traversal_tag, single_pass_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, forward_traversal_tag, forward_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, bidirectional_traversal_tag, bidirectional_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, random_access_traversal_tag, bidirectional_traversal_tag ) - -BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, no_traversal_tag, no_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, incrementable_traversal_tag, incrementable_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, single_pass_traversal_tag, single_pass_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, forward_traversal_tag, forward_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, bidirectional_traversal_tag, bidirectional_traversal_tag ) -BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, random_access_traversal_tag, random_access_traversal_tag ) - -#undef BOOST_DEMOTE_TRAVERSAL_TAG - -template<class IteratorTraversalTag1, class IteratorTraversalTag2> -struct demote_iterator_traversal_tag - : inner_demote_iterator_traversal_tag< - typename boost::iterators::pure_traversal_tag< IteratorTraversalTag1 >::type, - typename boost::iterators::pure_traversal_tag< IteratorTraversalTag2 >::type - > -{ -}; - - } // namespace range_detail -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/detail/difference_type.hpp b/contrib/restricted/boost/boost/range/detail/difference_type.hpp deleted file mode 100644 index c6415160f1..0000000000 --- a/contrib/restricted/boost/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 <boost/range/detail/common.hpp> -#include <boost/iterator/iterator_traits.hpp> - -////////////////////////////////////////////////////////////////////////////// -// missing partial specialization workaround. -////////////////////////////////////////////////////////////////////////////// - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_difference_type_; - - template<> - struct range_difference_type_<std_container_> - { - template< typename C > - struct pts - { - typedef BOOST_DEDUCED_TYPENAME C::difference_type type; - }; - }; - - template<> - struct range_difference_type_<std_pair_> - { - 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_<array_> - { - template< typename A > - struct pts - { - typedef std::ptrdiff_t type; - }; - }; - - template<> - struct range_difference_type_<char_array_> - { - template< typename A > - struct pts - { - typedef std::ptrdiff_t type; - }; - }; - - template<> - struct range_difference_type_<char_ptr_> - { - template< typename S > - struct pts - { - typedef std::ptrdiff_t type; - }; - }; - - template<> - struct range_difference_type_<const_char_ptr_> - { - template< typename S > - struct pts - { - typedef std::ptrdiff_t type; - }; - }; - - template<> - struct range_difference_type_<wchar_t_ptr_> - { - template< typename S > - struct pts - { - typedef std::ptrdiff_t type; - }; - }; - - template<> - struct range_difference_type_<const_wchar_t_ptr_> - { - template< typename S > - struct pts - { - typedef std::ptrdiff_t type; - }; - }; - - } - - template< typename C > - class range_difference - { - typedef BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type c_type; - public: - typedef BOOST_RANGE_DEDUCED_TYPENAME range_detail::range_difference_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type; - }; - -} - -#endif - diff --git a/contrib/restricted/boost/boost/range/detail/empty.hpp b/contrib/restricted/boost/boost/range/detail/empty.hpp deleted file mode 100644 index b098705d16..0000000000 --- a/contrib/restricted/boost/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 <boost/range/detail/common.hpp> - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_empty; - - ////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_empty<std_container_> - { - template< typename C > - static bool fun( C& c ) - { - return c.empty(); - }; - }; - - ////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_empty<std_pair_> - { - template< typename P > - static bool fun( const P& p ) - { - return p.first == p.second; - } - }; - - ////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_empty<array_> - { - template< typename T, std::size_t sz > - static bool fun( T BOOST_ARRAY_REF[sz] ) - { - if( boost_range_array == 0 ) - return true; - return false; - } - }; - - ////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_empty<char_ptr_> - { - static bool fun( const char* s ) - { - return s == 0 || s[0] == 0; - } - }; - - template<> - struct range_empty<const_char_ptr_> - { - static bool fun( const char* s ) - { - return s == 0 || s[0] == 0; - } - }; - - template<> - struct range_empty<wchar_t_ptr_> - { - static bool fun( const wchar_t* s ) - { - return s == 0 || s[0] == 0; - } - }; - - template<> - struct range_empty<const_wchar_t_ptr_> - { - 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<C>::type >::fun( c ); - } - -} // namespace 'boost' - - -#endif diff --git a/contrib/restricted/boost/boost/range/detail/join_iterator.hpp b/contrib/restricted/boost/boost/range/detail/join_iterator.hpp deleted file mode 100644 index 1020ebf63e..0000000000 --- a/contrib/restricted/boost/boost/range/detail/join_iterator.hpp +++ /dev/null @@ -1,354 +0,0 @@ -// Boost.Range library -// -// Copyright 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) -// -// Acknowledgements: -// aschoedl contributed an improvement to the determination -// of the Reference type parameter. -// -// Leonid Gershanovich reported Trac ticket 7376 about the dereference operator -// requiring identical reference types due to using the ternary if. -// -// For more information, see http://www.boost.org/libs/range/ -// -#ifndef BOOST_RANGE_DETAIL_JOIN_ITERATOR_HPP_INCLUDED -#define BOOST_RANGE_DETAIL_JOIN_ITERATOR_HPP_INCLUDED - -#include <iterator> -#include <boost/assert.hpp> -#include <boost/iterator/iterator_traits.hpp> -#include <boost/iterator/iterator_facade.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/empty.hpp> -#include <boost/range/detail/demote_iterator_traversal_tag.hpp> -#include <boost/range/value_type.hpp> -#include <boost/type_traits/add_const.hpp> -#include <boost/type_traits/add_reference.hpp> -#include <boost/type_traits/remove_const.hpp> -#include <boost/type_traits/remove_reference.hpp> -#include <boost/next_prior.hpp> - -namespace boost -{ - namespace range_detail - { - -template<typename Iterator1, typename Iterator2> -struct join_iterator_link -{ -public: - join_iterator_link(Iterator1 last1, Iterator2 first2) - : last1(last1) - , first2(first2) - { - } - - Iterator1 last1; - Iterator2 first2; - -private: - join_iterator_link() /* = delete */ ; -}; - -class join_iterator_begin_tag {}; -class join_iterator_end_tag {}; - -template<typename Iterator1 - , typename Iterator2 - , typename Reference -> -class join_iterator_union -{ -public: - typedef Iterator1 iterator1_t; - typedef Iterator2 iterator2_t; - - join_iterator_union() {} - join_iterator_union(unsigned int /*selected*/, const iterator1_t& it1, const iterator2_t& it2) : m_it1(it1), m_it2(it2) {} - - iterator1_t& it1() { return m_it1; } - const iterator1_t& it1() const { return m_it1; } - - iterator2_t& it2() { return m_it2; } - const iterator2_t& it2() const { return m_it2; } - - Reference dereference(unsigned int selected) const - { - if (selected) - return *m_it2; - return *m_it1; - } - - bool equal(const join_iterator_union& other, unsigned int selected) const - { - return selected - ? m_it2 == other.m_it2 - : m_it1 == other.m_it1; - } - -private: - iterator1_t m_it1; - iterator2_t m_it2; -}; - -template<class Iterator, class Reference> -class join_iterator_union<Iterator, Iterator, Reference> -{ -public: - typedef Iterator iterator1_t; - typedef Iterator iterator2_t; - - join_iterator_union() {} - - join_iterator_union(unsigned int selected, const iterator1_t& it1, const iterator2_t& it2) - : m_it(selected ? it2 : it1) - { - } - - iterator1_t& it1() { return m_it; } - const iterator1_t& it1() const { return m_it; } - - iterator2_t& it2() { return m_it; } - const iterator2_t& it2() const { return m_it; } - - Reference dereference(unsigned int) const - { - return *m_it; - } - - bool equal(const join_iterator_union& other, - unsigned int /*selected*/) const - { - return m_it == other.m_it; - } - -private: - iterator1_t m_it; -}; - -template<typename Iterator1 - , typename Iterator2 - , typename ValueType = typename iterator_value<Iterator1>::type - // find least demanding, commonly supported reference type, in the order &, const&, and by-value: - , typename Reference = typename mpl::if_c< - !is_reference<typename iterator_reference<Iterator1>::type>::value - || !is_reference<typename iterator_reference<Iterator2>::type>::value, - typename remove_const< - typename remove_reference< - typename iterator_reference<Iterator1>::type - >::type - >::type, - typename mpl::if_c< - is_const< - typename remove_reference< - typename iterator_reference<Iterator1>::type - >::type - >::value - || is_const< - typename remove_reference< - typename iterator_reference<Iterator2>::type - >::type - >::value, - typename add_const< - typename iterator_reference<Iterator1>::type - >::type, - typename iterator_reference<Iterator1>::type - >::type - >::type - , typename Traversal = typename demote_iterator_traversal_tag< - typename iterator_traversal<Iterator1>::type - , typename iterator_traversal<Iterator2>::type>::type -> -class join_iterator - : public iterator_facade<join_iterator<Iterator1,Iterator2,ValueType,Reference,Traversal>, ValueType, Traversal, Reference> -{ - typedef join_iterator_link<Iterator1, Iterator2> link_t; - typedef join_iterator_union<Iterator1, Iterator2, Reference> iterator_union; -public: - typedef Iterator1 iterator1_t; - typedef Iterator2 iterator2_t; - - join_iterator() - : m_section(0u) - , m_it(0u, iterator1_t(), iterator2_t()) - , m_link(link_t(iterator1_t(), iterator2_t())) - {} - - join_iterator(unsigned int section, Iterator1 current1, Iterator1 last1, Iterator2 first2, Iterator2 current2) - : m_section(section) - , m_it(section, current1, current2) - , m_link(link_t(last1, first2)) - { - } - - template<typename Range1, typename Range2> - join_iterator(Range1& r1, Range2& r2, join_iterator_begin_tag) - : m_section(boost::empty(r1) ? 1u : 0u) - , m_it(boost::empty(r1) ? 1u : 0u, boost::begin(r1), boost::begin(r2)) - , m_link(link_t(boost::end(r1), boost::begin(r2))) - { - } - - template<typename Range1, typename Range2> - join_iterator(const Range1& r1, const Range2& r2, join_iterator_begin_tag) - : m_section(boost::empty(r1) ? 1u : 0u) - , m_it(boost::empty(r1) ? 1u : 0u, boost::const_begin(r1), boost::const_begin(r2)) - , m_link(link_t(boost::const_end(r1), boost::const_begin(r2))) - { - } - - template<typename Range1, typename Range2> - join_iterator(Range1& r1, Range2& r2, join_iterator_end_tag) - : m_section(1u) - , m_it(1u, boost::end(r1), boost::end(r2)) - , m_link(link_t(boost::end(r1), boost::begin(r2))) - { - } - - template<typename Range1, typename Range2> - join_iterator(const Range1& r1, const Range2& r2, join_iterator_end_tag) - : m_section(1u) - , m_it(1u, boost::const_end(r1), boost::const_end(r2)) - , m_link(link_t(boost::const_end(r1), boost::const_begin(r2))) - { - } - -private: - void increment() - { - if (m_section) - ++m_it.it2(); - else - { - ++m_it.it1(); - if (m_it.it1() == m_link.last1) - { - m_it.it2() = m_link.first2; - m_section = 1u; - } - } - } - - void decrement() - { - if (m_section) - { - if (m_it.it2() == m_link.first2) - { - m_it.it1() = boost::prior(m_link.last1); - m_section = 0u; - } - else - --m_it.it2(); - } - else - --m_it.it1(); - } - - typename join_iterator::reference dereference() const - { - return m_it.dereference(m_section); - } - - bool equal(const join_iterator& other) const - { - return m_section == other.m_section - && m_it.equal(other.m_it, m_section); - } - - void advance(typename join_iterator::difference_type offset) - { - if (m_section) - advance_from_range2(offset); - else - advance_from_range1(offset); - } - - typename join_iterator::difference_type distance_to(const join_iterator& other) const - { - typename join_iterator::difference_type result; - if (m_section) - { - if (other.m_section) - result = other.m_it.it2() - m_it.it2(); - else - { - result = (m_link.first2 - m_it.it2()) - + (other.m_it.it1() - m_link.last1); - - BOOST_ASSERT( result <= 0 ); - } - } - else - { - if (other.m_section) - { - result = (m_link.last1 - m_it.it1()) - + (other.m_it.it2() - m_link.first2); - } - else - result = other.m_it.it1() - m_it.it1(); - } - return result; - } - - void advance_from_range2(typename join_iterator::difference_type offset) - { - typedef typename join_iterator::difference_type difference_t; - BOOST_ASSERT( m_section == 1u ); - if (offset < 0) - { - difference_t r2_dist = m_link.first2 - m_it.it2(); - BOOST_ASSERT( r2_dist <= 0 ); - if (offset >= r2_dist) - std::advance(m_it.it2(), offset); - else - { - difference_t r1_dist = offset - r2_dist; - BOOST_ASSERT( r1_dist <= 0 ); - m_it.it1() = m_link.last1 + r1_dist; - m_section = 0u; - } - } - else - std::advance(m_it.it2(), offset); - } - - void advance_from_range1(typename join_iterator::difference_type offset) - { - typedef typename join_iterator::difference_type difference_t; - BOOST_ASSERT( m_section == 0u ); - if (offset > 0) - { - difference_t r1_dist = m_link.last1 - m_it.it1(); - BOOST_ASSERT( r1_dist >= 0 ); - if (offset < r1_dist) - std::advance(m_it.it1(), offset); - else - { - difference_t r2_dist = offset - r1_dist; - BOOST_ASSERT( r2_dist >= 0 ); - m_it.it2() = m_link.first2 + r2_dist; - m_section = 1u; - } - } - else - std::advance(m_it.it1(), offset); - } - - unsigned int m_section; - iterator_union m_it; - link_t m_link; - - friend class ::boost::iterator_core_access; -}; - - } // namespace range_detail - -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/detail/microsoft.hpp b/contrib/restricted/boost/boost/range/detail/microsoft.hpp deleted file mode 100644 index d04575c397..0000000000 --- a/contrib/restricted/boost/boost/range/detail/microsoft.hpp +++ /dev/null @@ -1,932 +0,0 @@ -#ifndef BOOST_RANGE_DETAIL_MICROSOFT_HPP -#define BOOST_RANGE_DETAIL_MICROSOFT_HPP - -// Boost.Range MFC/ATL Extension -// -// Copyright Shunsuke Sogame 2005-2006. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - - - - -// config -// - - -#include <boost/range/iterator.hpp> - - -#define BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1 1 - - -#if !defined(BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1) - #define BOOST_RANGE_DETAIL_MICROSOFT_range_mutable_iterator range_mutable_iterator - #define BOOST_RANGE_DETAIL_MICROSOFT_range_begin range_begin - #define BOOST_RANGE_DETAIL_MICROSOFT_range_end range_end -#else - #define BOOST_RANGE_DETAIL_MICROSOFT_range_mutable_iterator range_mutable_iterator - #define BOOST_RANGE_DETAIL_MICROSOFT_range_begin range_begin - #define BOOST_RANGE_DETAIL_MICROSOFT_range_end range_end -#endif - - - - -// yet another customization way -// - - -#include <boost/iterator/iterator_traits.hpp> // iterator_difference -#include <boost/mpl/identity.hpp> -#include <boost/mpl/if.hpp> -#include <boost/preprocessor/cat.hpp> -#include <boost/preprocessor/control/iif.hpp> -#include <boost/preprocessor/comma_if.hpp> -#include <boost/preprocessor/detail/is_unary.hpp> -#include <boost/preprocessor/list/for_each.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/repeat.hpp> -#include <boost/preprocessor/seq/for_each_i.hpp> -#include <boost/preprocessor/seq/size.hpp> -#include <boost/preprocessor/tuple/eat.hpp> -#include <boost/range/const_iterator.hpp> -#include <boost/range/size_type.hpp> -#include <boost/type_traits/is_const.hpp> -#include <boost/type_traits/is_same.hpp> -#include <boost/type_traits/remove_cv.hpp> -#include <boost/utility/addressof.hpp> -#include <boost/utility/enable_if.hpp> // disable_if -#include <boost/next_prior.hpp> - -#if !defined(BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1) - #include <boost/range/mutable_iterator.hpp> -#else - #include <iterator> // distance - #include <boost/range/begin.hpp> - #include <boost/range/end.hpp> - #include <boost/range/iterator.hpp> -#endif - - -namespace boost { namespace range_detail_microsoft { - - - // customization point - // - - template< class Tag > - struct customization; - - - template< class T > - struct customization_tag; - - - struct using_type_as_tag - { }; - - - // Topic: - // In fact, it is unnecessary for VC++. - // VC++'s behavior seems conforming, while GCC fails without this. - template< class Iterator, class T > - struct mutable_ : - disable_if< is_const<T>, Iterator > - { }; - - - // helpers - // - - template< class Tag, class T > - struct customization_tag_of - { - typedef typename mpl::if_< is_same<using_type_as_tag, Tag>, - T, - Tag - >::type type; - }; - - - template< class T > - struct customization_of - { - typedef typename remove_cv<T>::type bare_t; - typedef typename customization_tag<bare_t>::type tag_t; - typedef customization<tag_t> type; - }; - - - template< class T > - struct mutable_iterator_of - { - typedef typename remove_cv<T>::type bare_t; - typedef typename customization_of<bare_t>::type cust_t; - typedef typename cust_t::template meta<bare_t>::mutable_iterator type; - }; - - - template< class T > - struct const_iterator_of - { - typedef typename remove_cv<T>::type bare_t; - typedef typename customization_of<bare_t>::type cust_t; - typedef typename cust_t::template meta<bare_t>::const_iterator type; - }; - - - template< class T > - struct size_type_of - { - typedef typename range_detail_microsoft::mutable_iterator_of<T>::type miter_t; - typedef typename iterator_difference<miter_t>::type type; - }; - - - template< class T > inline - typename mutable_iterator_of<T>::type - begin_of(T& x) - { - typedef typename customization_of<T>::type cust_t; - return cust_t().template begin<typename mutable_iterator_of<T>::type>(x); - } - - - template< class T > inline - typename const_iterator_of<T>::type - begin_of(T const& x) - { - typedef typename customization_of<T>::type cust_t; - return cust_t().template begin<typename const_iterator_of<T>::type>(x); - } - - - template< class T > inline - typename mutable_iterator_of<T>::type - end_of(T& x) - { - typedef typename customization_of<T>::type cust_t; - return cust_t().template end<typename mutable_iterator_of<T>::type>(x); - } - - - template< class T > inline - typename const_iterator_of<T>::type - end_of(T const& x) - { - typedef typename customization_of<T>::type cust_t; - return cust_t().template end<typename const_iterator_of<T>::type>(x); - } - - -#if defined(BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1) - - template< class T > inline - typename size_type_of<T>::type - size_of(T const& x) - { - return std::distance(boost::begin(x), boost::end(x)); - } - -#endif - - - template< class Range > - struct compatible_mutable_iterator : - BOOST_RANGE_DETAIL_MICROSOFT_range_mutable_iterator<Range> - { }; - - -} } // namespace boost::range_detail_microsoft - - -#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_open(NamespaceList) \ - BOOST_PP_LIST_FOR_EACH(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_open_op, ~, NamespaceList) \ -/**/ - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_open_op(r, data, elem) \ - namespace elem { \ - /**/ - - -#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_close(NamespaceList) \ - BOOST_PP_LIST_FOR_EACH(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_close_op, ~, NamespaceList) \ -/**/ - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_close_op(r, data, elem) \ - } \ - /**/ - - -#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_expand_op(r, data, elem) \ - :: elem \ -/**/ - - -#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(Tag, NamespaceList, Name) \ - namespace boost { namespace range_detail_microsoft { \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_tag(Tag, BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \ - } } \ - \ - namespace boost { \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_mutable_iterator(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_const_iterator(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_size_type(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \ - } \ - \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_open(NamespaceList) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_begin(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_begin_const(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_end(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_end_const(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_size(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_close(NamespaceList) \ -/**/ - - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name) \ - BOOST_PP_LIST_FOR_EACH(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_expand_op, ~, NamespaceList) :: Name \ - /**/ - - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_tag(Tag, Fullname) \ - template< > \ - struct customization_tag< Fullname > : \ - customization_tag_of< Tag, Fullname > \ - { }; \ - /**/ - - - // metafunctions - // - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_mutable_iterator(Fullname) \ - template< > \ - struct BOOST_RANGE_DETAIL_MICROSOFT_range_mutable_iterator< Fullname > : \ - range_detail_microsoft::mutable_iterator_of< Fullname > \ - { }; \ - /**/ - - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_const_iterator(Fullname) \ - template< > \ - struct range_const_iterator< Fullname > : \ - range_detail_microsoft::const_iterator_of< Fullname > \ - { }; \ - /**/ - - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_size_type(Fullname) \ - template< > \ - struct range_size< Fullname > : \ - range_detail_microsoft::size_type_of< Fullname > \ - { }; \ - /**/ - - - // functions - // - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_begin(Fullname) \ - inline \ - boost::range_detail_microsoft::mutable_iterator_of< Fullname >::type \ - BOOST_RANGE_DETAIL_MICROSOFT_range_begin(Fullname& x) \ - { \ - return boost::range_detail_microsoft::begin_of(x); \ - } \ - /**/ - - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_begin_const(Fullname) \ - inline \ - boost::range_detail_microsoft::const_iterator_of< Fullname >::type \ - BOOST_RANGE_DETAIL_MICROSOFT_range_begin(Fullname const& x) \ - { \ - return boost::range_detail_microsoft::begin_of(x); \ - } \ - /**/ - - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_end(Fullname) \ - inline \ - boost::range_detail_microsoft::mutable_iterator_of< Fullname >::type \ - BOOST_RANGE_DETAIL_MICROSOFT_range_end(Fullname& x) \ - { \ - return boost::range_detail_microsoft::end_of(x); \ - } \ - /**/ - - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_end_const(Fullname) \ - inline \ - boost::range_detail_microsoft::const_iterator_of< Fullname >::type \ - BOOST_RANGE_DETAIL_MICROSOFT_range_end(Fullname const& x) \ - { \ - return boost::range_detail_microsoft::end_of(x); \ - } \ - /**/ - - - #if !defined(BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1) - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_size(Fullname) \ - /**/ - - #else - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_size(Fullname) \ - inline \ - boost::range_detail_microsoft::size_type_of< Fullname >::type \ - boost_range_size(Fullname const& x) \ - { \ - return boost::range_detail_microsoft::size_of(x); \ - } \ - /**/ - - #endif - - -#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE(Tag, NamespaceList, Name, ParamSeqOrCount) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_impl( \ - Tag, NamespaceList, Name, \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_to_param_seq(ParamSeqOrCount) \ - ) \ -/**/ - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_to_param_seq(ParamSeqOrCount) \ - BOOST_PP_IIF(BOOST_PP_IS_UNARY(ParamSeqOrCount), \ - ParamSeqOrCount BOOST_PP_TUPLE_EAT(3), \ - BOOST_PP_REPEAT \ - )(ParamSeqOrCount, BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_to_param_seq_op, ~) \ - /**/ - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_to_param_seq_op(z, n, _) \ - (class) \ - /**/ - - -#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_impl(Tag, NamespaceList, Name, ParamSeq) \ - namespace boost { namespace range_detail_microsoft { \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_tag( \ - Tag, \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \ - ) \ - } } \ - \ - namespace boost { \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_mutable_iterator( \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \ - ) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_const_iterator( \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \ - ) \ - \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_size_type( \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \ - ) \ - } \ - \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_open(NamespaceList) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_begin( \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \ - ) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_begin_const( \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \ - ) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_end( \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \ - ) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_end_const( \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \ - ) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_size( \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \ - ) \ - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_close(NamespaceList) \ -/**/ - - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq) \ - BOOST_PP_SEQ_FOR_EACH_I(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params_op, ~, ParamSeq) \ - /**/ - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params_op(r, data, i, elem) \ - BOOST_PP_COMMA_IF(i) elem BOOST_PP_CAT(T, i) \ - /**/ - - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \ - BOOST_PP_LIST_FOR_EACH(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_expand_op, ~, NamespaceList) \ - :: Name < BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(ParamSeq), T) > \ - /**/ - - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_tag(Tag, Params, Fullname) \ - template< Params > \ - struct customization_tag< Fullname > : \ - customization_tag_of< Tag, Fullname > \ - { }; \ - /**/ - - - // metafunctions - // - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_mutable_iterator(Params, Fullname) \ - template< Params > \ - struct BOOST_RANGE_DETAIL_MICROSOFT_range_mutable_iterator< Fullname > : \ - range_detail_microsoft::mutable_iterator_of< Fullname > \ - { }; \ - /**/ - - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_const_iterator(Params, Fullname) \ - template< Params > \ - struct range_const_iterator< Fullname > : \ - range_detail_microsoft::const_iterator_of< Fullname > \ - { }; \ - /**/ - - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_size_type(Params, Fullname) \ - template< Params > \ - struct range_size< Fullname > : \ - range_detail_microsoft::size_type_of< Fullname > \ - { }; \ - /**/ - - - // functions - // - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_begin(Params, Fullname) \ - template< Params > inline \ - typename boost::range_detail_microsoft::mutable_iterator_of< Fullname >::type \ - BOOST_RANGE_DETAIL_MICROSOFT_range_begin(Fullname& x) \ - { \ - return boost::range_detail_microsoft::begin_of(x); \ - } \ - /**/ - - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_begin_const(Params, Fullname) \ - template< Params > inline \ - typename boost::range_detail_microsoft::const_iterator_of< Fullname >::type \ - BOOST_RANGE_DETAIL_MICROSOFT_range_begin(Fullname const& x) \ - { \ - return boost::range_detail_microsoft::begin_of(x); \ - } \ - /**/ - - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_end(Params, Fullname) \ - template< Params > inline \ - typename boost::range_detail_microsoft::mutable_iterator_of< Fullname >::type \ - BOOST_RANGE_DETAIL_MICROSOFT_range_end(Fullname& x) \ - { \ - return boost::range_detail_microsoft::end_of(x); \ - } \ - /**/ - - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_end_const(Params, Fullname) \ - template< Params > inline \ - typename boost::range_detail_microsoft::const_iterator_of< Fullname >::type \ - BOOST_RANGE_DETAIL_MICROSOFT_range_end(Fullname const& x) \ - { \ - return boost::range_detail_microsoft::end_of(x); \ - } \ - /**/ - - - #if !defined(BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1) - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_size(Params, Fullname) \ - /**/ - - #else - - #define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_size(Params, Fullname) \ - template< Params > inline \ - typename boost::range_detail_microsoft::size_type_of< Fullname >::type \ - boost_range_size(Fullname const& x) \ - { \ - return boost::range_detail_microsoft::size_of(x); \ - } \ - /**/ - - #endif - - - - -// list_iterator and helpers -// - - -#include <boost/assert.hpp> -#include <boost/iterator/iterator_categories.hpp> -#include <boost/iterator/iterator_facade.hpp> -#include <boost/mpl/if.hpp> -#include <boost/type_traits/is_same.hpp> - - -// POSITION's header is undocumented, so is NULL. -// -struct __POSITION; // incomplete, but used as just a pointer. -typedef __POSITION *POSITION; - - -namespace boost { namespace range_detail_microsoft { - - - template< - class ListT, - class Value, - class Reference, - class Traversal - > - struct list_iterator; - - - template< - class ListT, - class Value, - class Reference, - class Traversal - > - struct list_iterator_super - { - typedef typename mpl::if_< is_same<use_default, Reference>, - Value&, - Reference - >::type ref_t; - - typedef typename mpl::if_< is_same<use_default, Traversal>, - bidirectional_traversal_tag, - Traversal - >::type trv_t; - - typedef iterator_facade< - list_iterator<ListT, Value, Reference, Traversal>, - Value, - trv_t, - ref_t - > type; - }; - - - template< - class ListT, - class Value, - class Reference = use_default, - class Traversal = use_default - > - struct list_iterator : - list_iterator_super<ListT, Value, Reference, Traversal>::type - { - private: - typedef list_iterator self_t; - typedef typename list_iterator_super<ListT, Value, Reference, Traversal>::type super_t; - typedef typename super_t::reference ref_t; - - public: - explicit list_iterator() - { } - - explicit list_iterator(ListT& lst, POSITION pos) : - m_plst(boost::addressof(lst)), m_pos(pos) - { } - - template< class, class, class, class > friend struct list_iterator; - template< class ListT_, class Value_, class Reference_, class Traversal_> - list_iterator(list_iterator<ListT_, Value_, Reference_, Traversal_> const& other) : - m_plst(other.m_plst), m_pos(other.m_pos) - { } - - private: - ListT *m_plst; - POSITION m_pos; - - friend class iterator_core_access; - ref_t dereference() const - { - BOOST_ASSERT(m_pos != 0 && "out of range"); - return m_plst->GetAt(m_pos); - } - - // A B C D x - // Head Tail NULL(0) - // - void increment() - { - BOOST_ASSERT(m_pos != 0 && "out of range"); - m_plst->GetNext(m_pos); - } - - void decrement() - { - if (m_pos == 0) { - m_pos = m_plst->GetTailPosition(); - return; - } - - m_plst->GetPrev(m_pos); - } - - bool equal(self_t const& other) const - { - BOOST_ASSERT(m_plst == other.m_plst && "iterators incompatible"); - return m_pos == other.m_pos; - } - }; - - - // customization helpers - // - - struct array_functions - { - template< class Iterator, class X > - Iterator begin(X& x) - { - return x.GetData(); - } - - template< class Iterator, class X > - Iterator end(X& x) - { - return begin<Iterator>(x) + x.GetSize(); - } - }; - - - struct list_functions - { - template< class Iterator, class X > - Iterator begin(X& x) - { - return Iterator(x, x.GetHeadPosition()); - } - - template< class Iterator, class X > - Iterator end(X& x) - { - return Iterator(x, POSITION(0)); - } - }; - - -} } // namespace boost::range_detail_microsoft - - - - -// test -// - - -#if defined(BOOST_RANGE_DETAIL_MICROSOFT_TEST) - - -#include <algorithm> -#include <iterator> -#include <vector> -#include <boost/concept_check.hpp> -#include <boost/next_prior.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/const_iterator.hpp> -#include <boost/range/difference_type.hpp> -#include <boost/range/distance.hpp> -#include <boost/range/empty.hpp> -#include <boost/range/iterator_range.hpp> -#include <boost/range/mutable_iterator.hpp> -#include <boost/range/rbegin.hpp> -#include <boost/range/rend.hpp> -#include <boost/range/value_type.hpp> -#include <boost/type_traits/is_same.hpp> - - -namespace boost { namespace range_detail_microsoft { - - - template< class Range1, class Range2 > - bool test_equals(Range1 const& rng1, Range2 const& rng2) - { - return - boost::distance(rng1) == boost::distance(rng2) && - std::equal(boost::begin(rng1), boost::end(rng1), boost::begin(rng2)) - ; - } - - - template< class AssocContainer, class PairT > - bool test_find_key_and_mapped(AssocContainer const& ac, PairT const& pa) - { - typedef typename boost::range_const_iterator<AssocContainer>::type iter_t; - for (iter_t it = boost::const_begin(ac), last = boost::const_end(ac); it != last; ++it) { - if (it->first == pa.first && it->second == pa.second) - return true; - } - - return false; - } - - - // test functions - // - - template< class Range > - bool test_emptiness(Range& ) - { - bool result = true; - - Range emptyRng; - result = result && boost::empty(emptyRng); - - return result; - } - - - template< class Range > - bool test_trivial(Range& rng) - { - bool result = true; - - // convertibility check - typedef typename range_const_iterator<Range>::type citer_t; - citer_t cit = boost::begin(rng); - (void)cit; // unused - - // mutability check - typedef typename range_value<Range>::type val_t; - val_t v = *boost::begin(rng); - *boost::begin(rng) = v; - result = result && *boost::begin(rng) == v; - - return result; - } - - - template< class Range > - bool test_forward(Range& rng) - { - boost::function_requires< ForwardRangeConcept<Range> >(); - - bool result = (test_trivial)(rng); - - typedef typename range_value<Range>::type val_t; - - std::vector<val_t> saved; - std::copy(boost::begin(rng), boost::end(rng), std::back_inserter(saved)); - std::rotate(boost::begin(saved), boost::next(boost::begin(saved)), boost::end(saved)); - - std::rotate(boost::begin(rng), boost::next(boost::begin(rng)), boost::end(rng)); - - return result && (test_equals)(saved, rng); - }; - - - template< class Range > - bool test_bidirectional(Range& rng) - { - boost::function_requires< BidirectionalRangeConcept<Range> >(); - - bool result = (test_forward)(rng); - - typedef typename range_value<Range>::type val_t; - - std::vector<val_t> saved; - std::copy(boost::begin(rng), boost::end(rng), std::back_inserter(saved)); - - result = result && (test_equals)( - boost::make_iterator_range(boost::rbegin(saved), boost::rend(saved)), - boost::make_iterator_range(boost::rbegin(rng), boost::rend(rng)) - ); - - return result; - } - - - template< class Range > - bool test_random_access(Range& rng) - { - boost::function_requires< RandomAccessRangeConcept<Range> >(); - - bool result = (test_bidirectional)(rng); - - typedef typename range_value<Range>::type val_t; - - std::vector<val_t> saved; - std::copy(boost::begin(rng), boost::end(rng), std::back_inserter(saved)); - std::sort(boost::begin(saved), boost::end(saved)); - - std::random_shuffle(boost::begin(rng), boost::end(rng)); - std::sort(boost::begin(rng), boost::end(rng)); - result = result && (test_equals)(rng, saved); - - std::random_shuffle(boost::begin(rng), boost::end(rng)); - std::stable_sort(boost::begin(rng), boost::end(rng)); - result = result && (test_equals)(rng, saved); - - std::random_shuffle(boost::begin(rng), boost::end(rng)); - std::partial_sort(boost::begin(rng), boost::end(rng), boost::end(rng)); - result = result && (test_equals)(rng, saved); - - return result; - } - - - // initializer - // - - template< class ArrayT, class SampleRange > - bool test_init_array(ArrayT& arr, SampleRange const& sample) - { - typedef typename range_const_iterator<SampleRange>::type iter_t; - typedef typename range_value<SampleRange>::type val_t; - - for (iter_t it = boost::const_begin(sample), last = boost::const_end(sample); it != last; ++it) { - val_t v = *it; // works around ATL3 CSimpleArray - arr.Add(v); - } - - return (test_equals)(arr, sample); - } - - - template< class ListT, class SampleRange > - bool test_init_list(ListT& lst, SampleRange const& sample) - { - typedef typename range_const_iterator<SampleRange>::type iter_t; - - for (iter_t it = boost::const_begin(sample), last = boost::const_end(sample); it != last; ++it) { - lst.AddTail(*it); - } - - return (test_equals)(lst, sample); - } - - - template< class StringT, class SampleRange > - bool test_init_string(StringT& str, SampleRange const& sample) - { - typedef typename range_const_iterator<SampleRange>::type iter_t; - typedef typename range_value<SampleRange>::type val_t; - - for (iter_t it = boost::const_begin(sample), last = boost::const_end(sample); it != last; ++it) { - str += *it; - } - - return (test_equals)(str, sample); - } - - - template< class MapT, class SampleMap > - bool test_init_map(MapT& map, SampleMap const& sample) - { - typedef typename range_const_iterator<SampleMap>::type iter_t; - - for (iter_t it = boost::const_begin(sample), last = boost::const_end(sample); it != last; ++it) { - map.SetAt(it->first, it->second); - } - - return boost::distance(map) == boost::distance(sample); - } - - - // metafunction test - // - - template< class Range, class Iter > - struct test_mutable_iter : - boost::is_same< typename boost::BOOST_RANGE_DETAIL_MICROSOFT_range_mutable_iterator<Range>::type, Iter > - { }; - - - template< class Range, class Iter > - struct test_const_iter : - boost::is_same< typename boost::range_const_iterator<Range>::type, Iter > - { }; - - -} } // namespace boost::range_detail_microsoft - - -#endif // defined(BOOST_RANGE_DETAIL_MICROSOFT_TEST) - - - -#endif diff --git a/contrib/restricted/boost/boost/range/detail/sizer.hpp b/contrib/restricted/boost/boost/range/detail/sizer.hpp deleted file mode 100644 index cd6679c24d..0000000000 --- a/contrib/restricted/boost/boost/range/detail/sizer.hpp +++ /dev/null @@ -1,35 +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) -# pragma once -#endif - -#include <boost/range/config.hpp> -#include <cstddef> - -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/contrib/restricted/boost/boost/range/istream_range.hpp b/contrib/restricted/boost/boost/range/istream_range.hpp deleted file mode 100644 index a4863171c5..0000000000 --- a/contrib/restricted/boost/boost/range/istream_range.hpp +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright Neil Groves 2010. 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_ISTREAM_RANGE_HPP_INCLUDED -#define BOOST_RANGE_ISTREAM_RANGE_HPP_INCLUDED - -/*! - * \file istream_range.hpp - */ - -#include <iterator> -#include <iosfwd> -#include <boost/config.hpp> -#include <boost/range/iterator_range.hpp> - -namespace boost -{ - namespace range - { - template<class Type, class Elem, class Traits> inline - iterator_range<std::istream_iterator<Type, Elem, Traits> > - istream_range(std::basic_istream<Elem, Traits>& in) - { - return iterator_range<std::istream_iterator<Type, Elem, Traits> >( - std::istream_iterator<Type, Elem, Traits>(in), - std::istream_iterator<Type, Elem, Traits>()); - } - } // namespace range - using range::istream_range; -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/iterator_range_hash.hpp b/contrib/restricted/boost/boost/range/iterator_range_hash.hpp deleted file mode 100644 index 615d22fc37..0000000000 --- a/contrib/restricted/boost/boost/range/iterator_range_hash.hpp +++ /dev/null @@ -1,22 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 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/ -// -#include <boost/range/iterator_range_core.hpp> -#include <boost/functional/hash.hpp> - -namespace boost -{ - -template<class T> -std::size_t hash_value(const iterator_range<T>& rng) -{ - return boost::hash_range(rng.begin(), rng.end()); -} - -} // namespace boost diff --git a/contrib/restricted/boost/boost/range/join.hpp b/contrib/restricted/boost/boost/range/join.hpp deleted file mode 100644 index aacc0a3711..0000000000 --- a/contrib/restricted/boost/boost/range/join.hpp +++ /dev/null @@ -1,91 +0,0 @@ -// Boost.Range library -// -// Copyright 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_JOIN_HPP_INCLUDED -#define BOOST_RANGE_JOIN_HPP_INCLUDED - -#include <boost/config.hpp> -#include <boost/range/detail/join_iterator.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/iterator_range.hpp> - -namespace boost -{ - namespace range_detail - { - -template<class SinglePassRange1, class SinglePassRange2> -class joined_type -{ -public: - typedef iterator_range< - range_detail::join_iterator< - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type, - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type, - BOOST_DEDUCED_TYPENAME range_value<SinglePassRange1>::type - > - > type; -}; - - } // namespace range_detail - -namespace range -{ - -template<class SinglePassRange1, class SinglePassRange2> -class joined_range - : public range_detail::joined_type<SinglePassRange1, SinglePassRange2>::type -{ - typedef range_detail::join_iterator< - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type, - BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type, - BOOST_DEDUCED_TYPENAME range_value<SinglePassRange1>::type - > iterator_t; - - typedef BOOST_DEDUCED_TYPENAME range_detail::joined_type< - SinglePassRange1, SinglePassRange2>::type base_t; -public: - joined_range(SinglePassRange1& rng1, SinglePassRange2& rng2) - : base_t( - iterator_t(rng1, rng2, range_detail::join_iterator_begin_tag()), - iterator_t(rng1, rng2, range_detail::join_iterator_end_tag()) - ) - { - } -}; - -template<class SinglePassRange1, class SinglePassRange2> -joined_range<const SinglePassRange1, const SinglePassRange2> -join(const SinglePassRange1& r1, const SinglePassRange2& r2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> )); - - return joined_range<const SinglePassRange1, const SinglePassRange2>(r1, r2); -} - -template<class SinglePassRange1, class SinglePassRange2> -joined_range<SinglePassRange1, SinglePassRange2> -join(SinglePassRange1& r1, SinglePassRange2& r2) -{ - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> )); - BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> )); - - return joined_range<SinglePassRange1, SinglePassRange2>(r1, r2); -} - -} // namespace range - -using ::boost::range::joined_range; -using ::boost::range::join; - -} // namespace boost - -#endif // include guard diff --git a/contrib/restricted/boost/boost/range/mfc.hpp b/contrib/restricted/boost/boost/range/mfc.hpp deleted file mode 100644 index 058e54ec6c..0000000000 --- a/contrib/restricted/boost/boost/range/mfc.hpp +++ /dev/null @@ -1,984 +0,0 @@ -#ifndef BOOST_RANGE_MFC_HPP -#define BOOST_RANGE_MFC_HPP - - - - -// Boost.Range MFC Extension -// -// Copyright Shunsuke Sogame 2005-2006. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - - - - -// config -// - - -#include <afx.h> // _MFC_VER - - -#if !defined(BOOST_RANGE_MFC_NO_CPAIR) - #if (_MFC_VER < 0x0700) // dubious - #define BOOST_RANGE_MFC_NO_CPAIR - #endif -#endif - - -#if !defined(BOOST_RANGE_MFC_HAS_LEGACY_STRING) - #if (_MFC_VER < 0x0700) // dubious - #define BOOST_RANGE_MFC_HAS_LEGACY_STRING - #endif -#endif - - -// A const collection of old MFC doesn't return const reference. -// -#if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF) - #if (_MFC_VER < 0x0700) // dubious - #define BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF - #endif -#endif - - - - -// forward declarations -// - - -template< class Type, class ArgType > -class CArray; - -template< class Type, class ArgType > -class CList; - -template< class Key, class ArgKey, class Mapped, class ArgMapped > -class CMap; - -template< class BaseClass, class PtrType > -class CTypedPtrArray; - -template< class BaseClass, class PtrType > -class CTypedPtrList; - -template< class BaseClass, class KeyPtrType, class MappedPtrType > -class CTypedPtrMap; - - - - -// extended customizations -// - - -#include <cstddef> // ptrdiff_t -#include <utility> // pair -#include <boost/assert.hpp> -#include <boost/mpl/if.hpp> -#include <boost/range/atl.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/const_iterator.hpp> -#include <boost/range/detail/microsoft.hpp> -#include <boost/range/end.hpp> -#include <boost/iterator/iterator_adaptor.hpp> -#include <boost/iterator/iterator_categories.hpp> -#include <boost/iterator/iterator_facade.hpp> -#include <boost/iterator/transform_iterator.hpp> -#include <boost/type_traits/is_const.hpp> -#include <boost/type_traits/remove_pointer.hpp> -#include <boost/utility/addressof.hpp> -#include <afx.h> // legacy CString -#include <afxcoll.h> // CXXXArray, CXXXList, CMapXXXToXXX -#include <tchar.h> - - -namespace boost { namespace range_detail_microsoft { - - - // mfc_ptr_array_iterator - // - // 'void **' is not convertible to 'void const **', - // so we define... - // - - template< class ArrayT, class PtrType > - struct mfc_ptr_array_iterator; - - template< class ArrayT, class PtrType > - struct mfc_ptr_array_iterator_super - { - typedef iterator_adaptor< - mfc_ptr_array_iterator<ArrayT, PtrType>, - std::ptrdiff_t, // Base! - PtrType, // Value - random_access_traversal_tag, - use_default, - std::ptrdiff_t // Difference - > type; - }; - - template< class ArrayT, class PtrType > - struct mfc_ptr_array_iterator : - mfc_ptr_array_iterator_super<ArrayT, PtrType>::type - { - private: - typedef mfc_ptr_array_iterator self_t; - typedef typename mfc_ptr_array_iterator_super<ArrayT, PtrType>::type super_t; - typedef typename super_t::reference ref_t; - - public: - explicit mfc_ptr_array_iterator() - { } - - explicit mfc_ptr_array_iterator(ArrayT& arr, INT_PTR index) : - super_t(index), m_parr(boost::addressof(arr)) - { } - - template< class, class > friend struct mfc_ptr_array_iterator; - template< class ArrayT_, class PtrType_ > - mfc_ptr_array_iterator(mfc_ptr_array_iterator<ArrayT_, PtrType_> const& other) : - super_t(other.base()), m_parr(other.m_parr) - { } - - private: - ArrayT *m_parr; - - friend class iterator_core_access; - ref_t dereference() const - { - BOOST_ASSERT(0 <= this->base() && this->base() < m_parr->GetSize() && "out of range"); - return *( m_parr->GetData() + this->base() ); - } - - bool equal(self_t const& other) const - { - BOOST_ASSERT(m_parr == other.m_parr && "iterators incompatible"); - return this->base() == other.base(); - } - }; - - struct mfc_ptr_array_functions - { - template< class Iterator, class X > - Iterator begin(X& x) - { - return Iterator(x, 0); - } - - template< class Iterator, class X > - Iterator end(X& x) - { - return Iterator(x, x.GetSize()); - } - }; - - - // arrays - // - - template< > - struct customization< ::CByteArray > : - array_functions - { - template< class X > - struct meta - { - typedef BYTE val_t; - - typedef val_t *mutable_iterator; - typedef val_t const *const_iterator; - }; - }; - - - template< > - struct customization< ::CDWordArray > : - array_functions - { - template< class X > - struct meta - { - typedef DWORD val_t; - - typedef val_t *mutable_iterator; - typedef val_t const *const_iterator; - }; - }; - - - template< > - struct customization< ::CObArray > : - mfc_ptr_array_functions - { - template< class X > - struct meta - { - typedef mfc_ptr_array_iterator<X, CObject *> mutable_iterator; - typedef mfc_ptr_array_iterator<X const, CObject const *> const_iterator; - }; - }; - - - template< > - struct customization< ::CPtrArray > : - mfc_ptr_array_functions - { - template< class X > - struct meta - { - typedef mfc_ptr_array_iterator<X, void *> mutable_iterator; - typedef mfc_ptr_array_iterator<X const, void const *> const_iterator; - }; - }; - - - template< > - struct customization< ::CStringArray > : - array_functions - { - template< class X > - struct meta - { - typedef ::CString val_t; - - typedef val_t *mutable_iterator; - typedef val_t const *const_iterator; - }; - }; - - - template< > - struct customization< ::CUIntArray > : - array_functions - { - template< class X > - struct meta - { - typedef UINT val_t; - - typedef val_t *mutable_iterator; - typedef val_t const *const_iterator; - }; - }; - - - template< > - struct customization< ::CWordArray > : - array_functions - { - template< class X > - struct meta - { - typedef WORD val_t; - - typedef val_t *mutable_iterator; - typedef val_t const *const_iterator; - }; - }; - - - // lists - // - - template< > - struct customization< ::CObList > : - list_functions - { - template< class X > - struct meta - { - typedef list_iterator<X, ::CObject *> mutable_iterator; - #if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF) - typedef list_iterator<X const, ::CObject const *> const_iterator; - #else - typedef list_iterator<X const, ::CObject const * const, ::CObject const * const> const_iterator; - #endif - }; - }; - - - template< > - struct customization< ::CPtrList > : - list_functions - { - template< class X > - struct meta - { - typedef list_iterator<X, void *> mutable_iterator; - #if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF) - typedef list_iterator<X const, void const *> const_iterator; - #else - typedef list_iterator<X const, void const * const, void const * const> const_iterator; - #endif - }; - }; - - - template< > - struct customization< ::CStringList > : - list_functions - { - template< class X > - struct meta - { - typedef ::CString val_t; - - typedef list_iterator<X, val_t> mutable_iterator; - #if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF) - typedef list_iterator<X const, val_t const> const_iterator; - #else - typedef list_iterator<X const, val_t const, val_t const> const_iterator; - #endif - }; - }; - - - // mfc_map_iterator - // - - template< class MapT, class KeyT, class MappedT > - struct mfc_map_iterator; - - template< class MapT, class KeyT, class MappedT > - struct mfc_map_iterator_super - { - typedef iterator_facade< - mfc_map_iterator<MapT, KeyT, MappedT>, - std::pair<KeyT, MappedT>, - forward_traversal_tag, - std::pair<KeyT, MappedT> const - > type; - }; - - template< class MapT, class KeyT, class MappedT > - struct mfc_map_iterator : - mfc_map_iterator_super<MapT, KeyT, MappedT>::type - { - private: - typedef mfc_map_iterator self_t; - typedef typename mfc_map_iterator_super<MapT, KeyT, MappedT>::type super_t; - typedef typename super_t::reference ref_t; - - public: - explicit mfc_map_iterator() - { } - - explicit mfc_map_iterator(MapT const& map, POSITION pos) : - m_pmap(boost::addressof(map)), m_posNext(pos) - { - increment(); - } - - explicit mfc_map_iterator(MapT const& map) : - m_pmap(&map), m_pos(0) // end iterator - { } - - template< class, class, class > friend struct mfc_map_iterator; - template< class MapT_, class KeyT_, class MappedT_> - mfc_map_iterator(mfc_map_iterator<MapT_, KeyT_, MappedT_> const& other) : - m_pmap(other.m_pmap), - m_pos(other.m_pos), m_posNext(other.m_posNext), - m_key(other.m_key), m_mapped(other.m_mapped) - { } - - private: - MapT const *m_pmap; - POSITION m_pos, m_posNext; - KeyT m_key; MappedT m_mapped; - - friend class iterator_core_access; - ref_t dereference() const - { - BOOST_ASSERT(m_pos != 0 && "out of range"); - return std::make_pair(m_key, m_mapped); - } - - void increment() - { - BOOST_ASSERT(m_pos != 0 && "out of range"); - - if (m_posNext == 0) { - m_pos = 0; - return; - } - - m_pos = m_posNext; - m_pmap->GetNextAssoc(m_posNext, m_key, m_mapped); - } - - bool equal(self_t const& other) const - { - BOOST_ASSERT(m_pmap == other.m_pmap && "iterators incompatible"); - return m_pos == other.m_pos; - } - }; - - struct mfc_map_functions - { - template< class Iterator, class X > - Iterator begin(X& x) - { - return Iterator(x, x.GetStartPosition()); - } - - template< class Iterator, class X > - Iterator end(X& x) - { - return Iterator(x); - } - }; - - -#if !defined(BOOST_RANGE_MFC_NO_CPAIR) - - - // mfc_cpair_map_iterator - // - // used by ::CMap and ::CMapStringToString - // - - template< class MapT, class PairT > - struct mfc_cpair_map_iterator; - - template< class MapT, class PairT > - struct mfc_pget_map_iterator_super - { - typedef iterator_facade< - mfc_cpair_map_iterator<MapT, PairT>, - PairT, - forward_traversal_tag - > type; - }; - - template< class MapT, class PairT > - struct mfc_cpair_map_iterator : - mfc_pget_map_iterator_super<MapT, PairT>::type - { - private: - typedef mfc_cpair_map_iterator self_t; - typedef typename mfc_pget_map_iterator_super<MapT, PairT>::type super_t; - typedef typename super_t::reference ref_t; - - public: - explicit mfc_cpair_map_iterator() - { } - - explicit mfc_cpair_map_iterator(MapT& map, PairT *pp) : - m_pmap(boost::addressof(map)), m_pp(pp) - { } - - template< class, class > friend struct mfc_cpair_map_iterator; - template< class MapT_, class PairT_> - mfc_cpair_map_iterator(mfc_cpair_map_iterator<MapT_, PairT_> const& other) : - m_pmap(other.m_pmap), m_pp(other.m_pp) - { } - - private: - MapT *m_pmap; - PairT *m_pp; - - friend class iterator_core_access; - ref_t dereference() const - { - BOOST_ASSERT(m_pp != 0 && "out of range"); - return *m_pp; - } - - void increment() - { - BOOST_ASSERT(m_pp != 0 && "out of range"); - m_pp = m_pmap->PGetNextAssoc(m_pp); - } - - bool equal(self_t const& other) const - { - BOOST_ASSERT(m_pmap == other.m_pmap && "iterators incompatible"); - return m_pp == other.m_pp; - } - }; - - struct mfc_cpair_map_functions - { - template< class Iterator, class X > - Iterator begin(X& x) - { - // Workaround: - // Assertion fails if empty. - // MFC document is wrong. - #if !defined(NDEBUG) - if (x.GetCount() == 0) - return Iterator(x, 0); - #endif - - return Iterator(x, x.PGetFirstAssoc()); - } - - template< class Iterator, class X > - Iterator end(X& x) - { - return Iterator(x, 0); - } - }; - - -#endif // !defined(BOOST_RANGE_MFC_NO_CPAIR) - - - // maps - // - - template< > - struct customization< ::CMapPtrToWord > : - mfc_map_functions - { - template< class X > - struct meta - { - typedef void *key_t; - typedef WORD mapped_t; - - typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator; - typedef mutable_iterator const_iterator; - }; - }; - - - template< > - struct customization< ::CMapPtrToPtr > : - mfc_map_functions - { - template< class X > - struct meta - { - typedef void *key_t; - typedef void *mapped_t; - - typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator; - typedef mutable_iterator const_iterator; - }; - }; - - - template< > - struct customization< ::CMapStringToOb > : - mfc_map_functions - { - template< class X > - struct meta - { - typedef ::CString key_t; - typedef ::CObject *mapped_t; - - typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator; - typedef mutable_iterator const_iterator; - }; - }; - - - template< > - struct customization< ::CMapStringToPtr > : - mfc_map_functions - { - template< class X > - struct meta - { - typedef ::CString key_t; - typedef void *mapped_t; - - typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator; - typedef mutable_iterator const_iterator; - }; - }; - - - template< > - struct customization< ::CMapStringToString > : - #if !defined(BOOST_RANGE_MFC_NO_CPAIR) - mfc_cpair_map_functions - #else - mfc_map_functions - #endif - { - template< class X > - struct meta - { - #if !defined(BOOST_RANGE_MFC_NO_CPAIR) - typedef typename X::CPair pair_t; - - typedef mfc_cpair_map_iterator<X, pair_t> mutable_iterator; - typedef mfc_cpair_map_iterator<X const, pair_t const> const_iterator; - #else - typedef ::CString key_t; - typedef ::CString mapped_t; - - typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator; - typedef mutable_iterator const_iterator; - #endif - }; - }; - - - template< > - struct customization< ::CMapWordToOb > : - mfc_map_functions - { - template< class X > - struct meta - { - typedef WORD key_t; - typedef ::CObject *mapped_t; - - typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator; - typedef mutable_iterator const_iterator; - }; - }; - - - template< > - struct customization< ::CMapWordToPtr > : - mfc_map_functions - { - template< class X > - struct meta - { - typedef WORD key_t; - typedef void *mapped_t; - - typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator; - typedef mutable_iterator const_iterator; - }; - }; - - - // templates - // - - template< class Type, class ArgType > - struct customization< ::CArray<Type, ArgType> > : - array_functions - { - template< class X > - struct meta - { - typedef Type val_t; - - typedef val_t *mutable_iterator; - typedef val_t const *const_iterator; - }; - }; - - - template< class Type, class ArgType > - struct customization< ::CList<Type, ArgType> > : - list_functions - { - template< class X > - struct meta - { - typedef Type val_t; - - typedef list_iterator<X, val_t> mutable_iterator; - #if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF) - typedef list_iterator<X const, val_t const> const_iterator; - #else - typedef list_iterator<X const, val_t const, val_t const> const_iterator; - #endif - }; - }; - - - template< class Key, class ArgKey, class Mapped, class ArgMapped > - struct customization< ::CMap<Key, ArgKey, Mapped, ArgMapped> > : - #if !defined(BOOST_RANGE_MFC_NO_CPAIR) - mfc_cpair_map_functions - #else - mfc_map_functions - #endif - { - template< class X > - struct meta - { - #if !defined(BOOST_RANGE_MFC_NO_CPAIR) - typedef typename X::CPair pair_t; - - typedef mfc_cpair_map_iterator<X, pair_t> mutable_iterator; - typedef mfc_cpair_map_iterator<X const, pair_t const> const_iterator; - #else - typedef Key key_t; - typedef Mapped mapped_t; - - typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator; - typedef mutable_iterator const_iterator; - #endif - }; - }; - - - template< class BaseClass, class PtrType > - struct customization< ::CTypedPtrArray<BaseClass, PtrType> > - { - template< class X > - struct fun - { - typedef typename remove_pointer<PtrType>::type val_t; - - typedef typename mpl::if_< is_const<X>, - val_t const, - val_t - >::type val_t_; - - typedef val_t_ * const result_type; - - template< class PtrType_ > - result_type operator()(PtrType_ p) const - { - return static_cast<result_type>(p); - } - }; - - template< class X > - struct meta - { - typedef typename compatible_mutable_iterator<BaseClass>::type miter_t; - typedef typename range_const_iterator<BaseClass>::type citer_t; - - typedef transform_iterator<fun<X>, miter_t> mutable_iterator; - typedef transform_iterator<fun<X const>, citer_t> const_iterator; - }; - - template< class Iterator, class X > - Iterator begin(X& x) - { - return Iterator(boost::begin<BaseClass>(x), fun<X>()); - } - - template< class Iterator, class X > - Iterator end(X& x) - { - return Iterator(boost::end<BaseClass>(x), fun<X>()); - } - }; - - - template< class BaseClass, class PtrType > - struct customization< ::CTypedPtrList<BaseClass, PtrType> > : - list_functions - { - template< class X > - struct meta - { - typedef typename remove_pointer<PtrType>::type val_t; - - // not l-value - typedef list_iterator<X, val_t * const, val_t * const> mutable_iterator; - typedef list_iterator<X const, val_t const * const, val_t const * const> const_iterator; - }; - }; - - - template< class BaseClass, class KeyPtrType, class MappedPtrType > - struct customization< ::CTypedPtrMap<BaseClass, KeyPtrType, MappedPtrType> > : - mfc_map_functions - { - template< class X > - struct meta - { - typedef mfc_map_iterator<X, KeyPtrType, MappedPtrType> mutable_iterator; - typedef mutable_iterator const_iterator; - }; - }; - - - // strings - // - -#if defined(BOOST_RANGE_MFC_HAS_LEGACY_STRING) - - template< > - struct customization< ::CString > - { - template< class X > - struct meta - { - // LPTSTR/LPCTSTR is not always defined in <tchar.h>. - typedef TCHAR *mutable_iterator; - typedef TCHAR const *const_iterator; - }; - - template< class Iterator, class X > - typename mutable_<Iterator, X>::type begin(X& x) - { - return x.GetBuffer(0); - } - - template< class Iterator, class X > - Iterator begin(X const& x) - { - return x; - } - - template< class Iterator, class X > - Iterator end(X& x) - { - return begin<Iterator>(x) + x.GetLength(); - } - }; - -#endif // defined(BOOST_RANGE_MFC_HAS_LEGACY_STRING) - - -} } // namespace boost::range_detail_microsoft - - - - -// range customizations -// - - -// arrays -// -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CByteArray -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CDWordArray -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CStringArray -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CUIntArray -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CWordArray -) - - -// lists -// -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CObList -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CPtrList -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CStringList -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CObArray -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CPtrArray -) - - -// maps -// -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CMapPtrToWord -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CMapPtrToPtr -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CMapStringToOb -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CMapStringToPtr -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CMapStringToString -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CMapWordToOb -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CMapWordToPtr -) - - -// templates -// -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CArray, 2 -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CList, 2 -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CMap, 4 -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CTypedPtrArray, 2 -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CTypedPtrList, 2 -) - -BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CTypedPtrMap, 3 -) - - -// strings -// -#if defined(BOOST_RANGE_MFC_HAS_LEGACY_STRING) - - BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE( - boost::range_detail_microsoft::using_type_as_tag, - BOOST_PP_NIL, CString - ) - -#endif - - - - -#endif diff --git a/contrib/restricted/boost/boost/range/mfc_map.hpp b/contrib/restricted/boost/boost/range/mfc_map.hpp deleted file mode 100644 index 2cd42b43d7..0000000000 --- a/contrib/restricted/boost/boost/range/mfc_map.hpp +++ /dev/null @@ -1,114 +0,0 @@ -// Boost.Range library -// -// Copyright Adam D. Walling 2012. 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_ADAPTOR_MFC_MAP_HPP -#define BOOST_RANGE_ADAPTOR_MFC_MAP_HPP - -#if !defined(BOOST_RANGE_MFC_NO_CPAIR) - -#include <boost/range/mfc.hpp> -#include <boost/range/adaptor/map.hpp> - -namespace boost -{ - namespace range_detail - { - // CMap and CMapStringToString range iterators return CPair, - // which has a key and value member. Other MFC range iterators - // already return adapted std::pair objects. This allows usage - // of the map_keys and map_values range adaptors with CMap - // and CMapStringToString - - // CPair has a VALUE value member, and a KEY key member; we will - // use VALUE& as the result_type consistent with CMap::operator[] - - // specialization for CMap - template<class KEY, class ARG_KEY, class VALUE, class ARG_VALUE> - struct select_first< CMap<KEY, ARG_KEY, VALUE, ARG_VALUE> > - { - typedef BOOST_DEDUCED_TYPENAME CMap<KEY, ARG_KEY, VALUE, ARG_VALUE> map_type; - typedef BOOST_DEDUCED_TYPENAME range_reference<const map_type>::type argument_type; - typedef BOOST_DEDUCED_TYPENAME const KEY& result_type; - - result_type operator()( argument_type r ) const - { - return r.key; - } - }; - - template<class KEY, class ARG_KEY, class VALUE, class ARG_VALUE> - struct select_second_mutable< CMap<KEY, ARG_KEY, VALUE, ARG_VALUE> > - { - typedef BOOST_DEDUCED_TYPENAME CMap<KEY, ARG_KEY, VALUE, ARG_VALUE> map_type; - typedef BOOST_DEDUCED_TYPENAME range_reference<map_type>::type argument_type; - typedef BOOST_DEDUCED_TYPENAME VALUE& result_type; - - result_type operator()( argument_type r ) const - { - return r.value; - } - }; - - template<class KEY, class ARG_KEY, class VALUE, class ARG_VALUE> - struct select_second_const< CMap<KEY, ARG_KEY, VALUE, ARG_VALUE> > - { - typedef BOOST_DEDUCED_TYPENAME CMap<KEY, ARG_KEY, VALUE, ARG_VALUE> map_type; - typedef BOOST_DEDUCED_TYPENAME range_reference<const map_type>::type argument_type; - typedef BOOST_DEDUCED_TYPENAME const VALUE& result_type; - - result_type operator()( argument_type r ) const - { - return r.value; - } - }; - - - // specialization for CMapStringToString - template<> - struct select_first< CMapStringToString > - { - typedef range_reference<const CMapStringToString>::type argument_type; - typedef const CString& result_type; - - result_type operator()( argument_type r ) const - { - return r.key; - } - }; - - template<> - struct select_second_mutable< CMapStringToString > - { - typedef range_reference<CMapStringToString>::type argument_type; - typedef CString& result_type; - - result_type operator()( argument_type r ) const - { - return r.value; - } - }; - - template<> - struct select_second_const< CMapStringToString > - { - typedef range_reference<const CMapStringToString>::type argument_type; - typedef const CString& result_type; - - result_type operator()( argument_type r ) const - { - return r.value; - } - }; - } // 'range_detail' -} // 'boost' - -#endif // !defined(BOOST_RANGE_MFC_NO_CPAIR) - -#endif diff --git a/contrib/restricted/boost/boost/range/numeric.hpp b/contrib/restricted/boost/boost/range/numeric.hpp deleted file mode 100644 index d1510cdef1..0000000000 --- a/contrib/restricted/boost/boost/range/numeric.hpp +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright 2009-2014 Neil Groves. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// Copyright 2006 Thorsten Ottosen. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// Copyright 2004 Eric Niebler. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// Contains range-based versions of the numeric std algorithms -// -#if defined(_MSC_VER) - #pragma once -#endif - -#ifndef BOOST_RANGE_NUMERIC_HPP -#define BOOST_RANGE_NUMERIC_HPP - -#include <boost/config.hpp> -#include <boost/assert.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/range/category.hpp> -#include <boost/range/concepts.hpp> -#include <boost/range/distance.hpp> -#include <boost/range/size.hpp> -#include <numeric> - - -namespace boost -{ - template<class SinglePassRange, class Value> - inline Value accumulate(const SinglePassRange& rng, Value init) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange>)); - - return std::accumulate(boost::begin(rng), boost::end(rng), init); - } - - template<class SinglePassRange, class Value, class BinaryOperation> - inline Value accumulate(const SinglePassRange& rng, Value init, - BinaryOperation op) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange> )); - - return std::accumulate(boost::begin(rng), boost::end(rng), init, op); - } - - namespace range_detail - { - template<class SinglePassRange1, class SinglePassRange2> - inline bool inner_product_precondition( - const SinglePassRange1&, - const SinglePassRange2&, - std::input_iterator_tag, - std::input_iterator_tag) - { - return true; - } - - template<class SinglePassRange1, class SinglePassRange2> - inline bool inner_product_precondition( - const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - std::forward_iterator_tag, - std::forward_iterator_tag) - { - return boost::size(rng2) >= boost::size(rng1); - } - - } // namespace range_detail - - template< - class SinglePassRange1, - class SinglePassRange2, - class Value - > - inline Value inner_product( - const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - Value init) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange1>)); - - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange2>)); - - BOOST_ASSERT( - range_detail::inner_product_precondition( - rng1, rng2, - typename range_category<const SinglePassRange1>::type(), - typename range_category<const SinglePassRange2>::type())); - - return std::inner_product( - boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), init); - } - - template< - class SinglePassRange1, - class SinglePassRange2, - class Value, - class BinaryOperation1, - class BinaryOperation2 - > - inline Value inner_product( - const SinglePassRange1& rng1, - const SinglePassRange2& rng2, - Value init, - BinaryOperation1 op1, - BinaryOperation2 op2) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange1>)); - - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange2>)); - - BOOST_ASSERT( - range_detail::inner_product_precondition( - rng1, rng2, - typename range_category<const SinglePassRange1>::type(), - typename range_category<const SinglePassRange2>::type())); - - return std::inner_product( - boost::begin(rng1), boost::end(rng1), - boost::begin(rng2), init, op1, op2); - } - - template<class SinglePassRange, class OutputIterator> - inline OutputIterator partial_sum(const SinglePassRange& rng, - OutputIterator result) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange>)); - - return std::partial_sum(boost::begin(rng), boost::end(rng), result); - } - - template<class SinglePassRange, class OutputIterator, class BinaryOperation> - inline OutputIterator partial_sum( - const SinglePassRange& rng, - OutputIterator result, - BinaryOperation op) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange>)); - - return std::partial_sum(boost::begin(rng), boost::end(rng), result, op); - } - - template<class SinglePassRange, class OutputIterator> - inline OutputIterator adjacent_difference( - const SinglePassRange& rng, - OutputIterator result) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange>)); - - return std::adjacent_difference(boost::begin(rng), boost::end(rng), - result); - } - - template<class SinglePassRange, class OutputIterator, class BinaryOperation> - inline OutputIterator adjacent_difference( - const SinglePassRange& rng, - OutputIterator result, - BinaryOperation op) - { - BOOST_RANGE_CONCEPT_ASSERT(( - SinglePassRangeConcept<const SinglePassRange>)); - - return std::adjacent_difference(boost::begin(rng), boost::end(rng), - result, op); - } - -} // namespace boost - -#endif diff --git a/contrib/restricted/boost/boost/range/traversal.hpp b/contrib/restricted/boost/boost/range/traversal.hpp deleted file mode 100644 index 237b3e88e0..0000000000 --- a/contrib/restricted/boost/boost/range/traversal.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 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_TRAVERSAL_HPP -#define BOOST_RANGE_TRAVERSAL_HPP - -#if defined(_MSC_VER) -# pragma once -#endif - -#include <boost/range/config.hpp> -#include <boost/range/iterator.hpp> -#include <boost/iterator/iterator_traits.hpp> - -namespace boost -{ - template<typename SinglePassRange> - struct range_traversal - : iterator_traversal<typename range_iterator<SinglePassRange>::type> - { - }; -} - -#endif diff --git a/contrib/restricted/boost/range/CMakeLists.txt b/contrib/restricted/boost/range/CMakeLists.txt new file mode 100644 index 0000000000..29643ab305 --- /dev/null +++ b/contrib/restricted/boost/range/CMakeLists.txt @@ -0,0 +1,34 @@ + +# This file was gererated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + + +add_library(restricted-boost-range INTERFACE) +target_include_directories(restricted-boost-range INTERFACE + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/range/include +) +target_link_libraries(restricted-boost-range INTERFACE + contrib-libs-cxxsupp + yutil + restricted-boost-array + restricted-boost-assert + restricted-boost-concept_check + restricted-boost-config + restricted-boost-container_hash + restricted-boost-core + restricted-boost-detail + restricted-boost-iterator + restricted-boost-mpl + restricted-boost-numeric_conversion + restricted-boost-optional + restricted-boost-preprocessor + restricted-boost-regex + restricted-boost-static_assert + restricted-boost-tuple + restricted-boost-type_traits + restricted-boost-utility +) diff --git a/contrib/restricted/boost/boost/range.hpp b/contrib/restricted/boost/range/include/boost/range.hpp index 179ae22492..179ae22492 100644 --- a/contrib/restricted/boost/boost/range.hpp +++ b/contrib/restricted/boost/range/include/boost/range.hpp diff --git a/contrib/restricted/boost/boost/range/adaptor/argument_fwd.hpp b/contrib/restricted/boost/range/include/boost/range/adaptor/argument_fwd.hpp index fbfd40c1df..fbfd40c1df 100644 --- a/contrib/restricted/boost/boost/range/adaptor/argument_fwd.hpp +++ b/contrib/restricted/boost/range/include/boost/range/adaptor/argument_fwd.hpp diff --git a/contrib/restricted/boost/boost/range/adaptor/map.hpp b/contrib/restricted/boost/range/include/boost/range/adaptor/map.hpp index 2d922ea4d2..2d922ea4d2 100644 --- a/contrib/restricted/boost/boost/range/adaptor/map.hpp +++ b/contrib/restricted/boost/range/include/boost/range/adaptor/map.hpp diff --git a/contrib/restricted/boost/boost/range/adaptor/reversed.hpp b/contrib/restricted/boost/range/include/boost/range/adaptor/reversed.hpp index 944fbffcae..944fbffcae 100644 --- a/contrib/restricted/boost/boost/range/adaptor/reversed.hpp +++ b/contrib/restricted/boost/range/include/boost/range/adaptor/reversed.hpp diff --git a/contrib/restricted/boost/boost/range/adaptor/transformed.hpp b/contrib/restricted/boost/range/include/boost/range/adaptor/transformed.hpp index 428ff4be75..428ff4be75 100644 --- a/contrib/restricted/boost/boost/range/adaptor/transformed.hpp +++ b/contrib/restricted/boost/range/include/boost/range/adaptor/transformed.hpp diff --git a/contrib/restricted/boost/boost/range/algorithm/equal.hpp b/contrib/restricted/boost/range/include/boost/range/algorithm/equal.hpp index 2b44f3bca3..2b44f3bca3 100644 --- a/contrib/restricted/boost/boost/range/algorithm/equal.hpp +++ b/contrib/restricted/boost/range/include/boost/range/algorithm/equal.hpp diff --git a/contrib/restricted/boost/boost/range/algorithm/find.hpp b/contrib/restricted/boost/range/include/boost/range/algorithm/find.hpp index 72c5cf15ef..72c5cf15ef 100644 --- a/contrib/restricted/boost/boost/range/algorithm/find.hpp +++ b/contrib/restricted/boost/range/include/boost/range/algorithm/find.hpp diff --git a/contrib/restricted/boost/boost/range/as_literal.hpp b/contrib/restricted/boost/range/include/boost/range/as_literal.hpp index 1c16e4a0f7..1c16e4a0f7 100644 --- a/contrib/restricted/boost/boost/range/as_literal.hpp +++ b/contrib/restricted/boost/range/include/boost/range/as_literal.hpp diff --git a/contrib/restricted/boost/boost/range/begin.hpp b/contrib/restricted/boost/range/include/boost/range/begin.hpp index ba5a73b92d..ba5a73b92d 100644 --- a/contrib/restricted/boost/boost/range/begin.hpp +++ b/contrib/restricted/boost/range/include/boost/range/begin.hpp diff --git a/contrib/restricted/boost/boost/range/category.hpp b/contrib/restricted/boost/range/include/boost/range/category.hpp index f5431adf2e..f5431adf2e 100644 --- a/contrib/restricted/boost/boost/range/category.hpp +++ b/contrib/restricted/boost/range/include/boost/range/category.hpp diff --git a/contrib/restricted/boost/boost/range/concepts.hpp b/contrib/restricted/boost/range/include/boost/range/concepts.hpp index 87c1e9893d..87c1e9893d 100644 --- a/contrib/restricted/boost/boost/range/concepts.hpp +++ b/contrib/restricted/boost/range/include/boost/range/concepts.hpp diff --git a/contrib/restricted/boost/boost/range/config.hpp b/contrib/restricted/boost/range/include/boost/range/config.hpp index 7600a5ff82..7600a5ff82 100644 --- a/contrib/restricted/boost/boost/range/config.hpp +++ b/contrib/restricted/boost/range/include/boost/range/config.hpp diff --git a/contrib/restricted/boost/boost/range/const_iterator.hpp b/contrib/restricted/boost/range/include/boost/range/const_iterator.hpp index 727fdad058..727fdad058 100644 --- a/contrib/restricted/boost/boost/range/const_iterator.hpp +++ b/contrib/restricted/boost/range/include/boost/range/const_iterator.hpp diff --git a/contrib/restricted/boost/boost/range/const_reverse_iterator.hpp b/contrib/restricted/boost/range/include/boost/range/const_reverse_iterator.hpp index bfe161561c..bfe161561c 100644 --- a/contrib/restricted/boost/boost/range/const_reverse_iterator.hpp +++ b/contrib/restricted/boost/range/include/boost/range/const_reverse_iterator.hpp diff --git a/contrib/restricted/boost/boost/range/counting_range.hpp b/contrib/restricted/boost/range/include/boost/range/counting_range.hpp index d886a2133f..d886a2133f 100644 --- a/contrib/restricted/boost/boost/range/counting_range.hpp +++ b/contrib/restricted/boost/range/include/boost/range/counting_range.hpp diff --git a/contrib/restricted/boost/boost/range/detail/as_literal.hpp b/contrib/restricted/boost/range/include/boost/range/detail/as_literal.hpp index 8b219ea246..8b219ea246 100644 --- a/contrib/restricted/boost/boost/range/detail/as_literal.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/as_literal.hpp diff --git a/contrib/restricted/boost/boost/range/detail/begin.hpp b/contrib/restricted/boost/range/include/boost/range/detail/begin.hpp index 1d9390ff85..1d9390ff85 100644 --- a/contrib/restricted/boost/boost/range/detail/begin.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/begin.hpp diff --git a/contrib/restricted/boost/boost/range/detail/common.hpp b/contrib/restricted/boost/range/include/boost/range/detail/common.hpp index 00b665bef8..00b665bef8 100644 --- a/contrib/restricted/boost/boost/range/detail/common.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/common.hpp diff --git a/contrib/restricted/boost/boost/range/detail/default_constructible_unary_fn.hpp b/contrib/restricted/boost/range/include/boost/range/detail/default_constructible_unary_fn.hpp index 374ddda15d..374ddda15d 100644 --- a/contrib/restricted/boost/boost/range/detail/default_constructible_unary_fn.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/default_constructible_unary_fn.hpp diff --git a/contrib/restricted/boost/boost/range/detail/detail_str.hpp b/contrib/restricted/boost/range/include/boost/range/detail/detail_str.hpp index 5ef7a3450e..5ef7a3450e 100644 --- a/contrib/restricted/boost/boost/range/detail/detail_str.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/detail_str.hpp diff --git a/contrib/restricted/boost/boost/range/detail/end.hpp b/contrib/restricted/boost/range/include/boost/range/detail/end.hpp index f2f71780a7..f2f71780a7 100644 --- a/contrib/restricted/boost/boost/range/detail/end.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/end.hpp diff --git a/contrib/restricted/boost/boost/range/detail/extract_optional_type.hpp b/contrib/restricted/boost/range/include/boost/range/detail/extract_optional_type.hpp index 0381434a85..0381434a85 100644 --- a/contrib/restricted/boost/boost/range/detail/extract_optional_type.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/extract_optional_type.hpp diff --git a/contrib/restricted/boost/boost/range/detail/has_member_size.hpp b/contrib/restricted/boost/range/include/boost/range/detail/has_member_size.hpp index 0c639aa891..0c639aa891 100644 --- a/contrib/restricted/boost/boost/range/detail/has_member_size.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/has_member_size.hpp diff --git a/contrib/restricted/boost/boost/range/detail/implementation_help.hpp b/contrib/restricted/boost/range/include/boost/range/detail/implementation_help.hpp index f35953f349..f35953f349 100644 --- a/contrib/restricted/boost/boost/range/detail/implementation_help.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/implementation_help.hpp diff --git a/contrib/restricted/boost/boost/range/detail/misc_concept.hpp b/contrib/restricted/boost/range/include/boost/range/detail/misc_concept.hpp index 74cb919f27..74cb919f27 100644 --- a/contrib/restricted/boost/boost/range/detail/misc_concept.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/misc_concept.hpp diff --git a/contrib/restricted/boost/boost/range/detail/msvc_has_iterator_workaround.hpp b/contrib/restricted/boost/range/include/boost/range/detail/msvc_has_iterator_workaround.hpp index 62b67fd529..62b67fd529 100644 --- a/contrib/restricted/boost/boost/range/detail/msvc_has_iterator_workaround.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/msvc_has_iterator_workaround.hpp diff --git a/contrib/restricted/boost/boost/range/detail/range_return.hpp b/contrib/restricted/boost/range/include/boost/range/detail/range_return.hpp index 9b98e099c1..9b98e099c1 100644 --- a/contrib/restricted/boost/boost/range/detail/range_return.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/range_return.hpp diff --git a/contrib/restricted/boost/boost/range/detail/remove_extent.hpp b/contrib/restricted/boost/range/include/boost/range/detail/remove_extent.hpp index 68e4597245..68e4597245 100644 --- a/contrib/restricted/boost/boost/range/detail/remove_extent.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/remove_extent.hpp diff --git a/contrib/restricted/boost/boost/range/detail/safe_bool.hpp b/contrib/restricted/boost/range/include/boost/range/detail/safe_bool.hpp index 182e510484..182e510484 100644 --- a/contrib/restricted/boost/boost/range/detail/safe_bool.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/safe_bool.hpp diff --git a/contrib/restricted/boost/boost/range/detail/sfinae.hpp b/contrib/restricted/boost/range/include/boost/range/detail/sfinae.hpp index 5b2c61e71e..5b2c61e71e 100644 --- a/contrib/restricted/boost/boost/range/detail/sfinae.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/sfinae.hpp diff --git a/contrib/restricted/boost/boost/range/detail/size_type.hpp b/contrib/restricted/boost/range/include/boost/range/detail/size_type.hpp index 78a60a48e9..78a60a48e9 100644 --- a/contrib/restricted/boost/boost/range/detail/size_type.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/size_type.hpp diff --git a/contrib/restricted/boost/boost/range/detail/str_types.hpp b/contrib/restricted/boost/range/include/boost/range/detail/str_types.hpp index f8cab190d5..f8cab190d5 100644 --- a/contrib/restricted/boost/boost/range/detail/str_types.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/str_types.hpp diff --git a/contrib/restricted/boost/boost/range/detail/value_type.hpp b/contrib/restricted/boost/range/include/boost/range/detail/value_type.hpp index 2784514c6a..2784514c6a 100644 --- a/contrib/restricted/boost/boost/range/detail/value_type.hpp +++ b/contrib/restricted/boost/range/include/boost/range/detail/value_type.hpp diff --git a/contrib/restricted/boost/boost/range/difference_type.hpp b/contrib/restricted/boost/range/include/boost/range/difference_type.hpp index 6bb3c5f552..6bb3c5f552 100644 --- a/contrib/restricted/boost/boost/range/difference_type.hpp +++ b/contrib/restricted/boost/range/include/boost/range/difference_type.hpp diff --git a/contrib/restricted/boost/boost/range/distance.hpp b/contrib/restricted/boost/range/include/boost/range/distance.hpp index 075f2d1fb9..075f2d1fb9 100644 --- a/contrib/restricted/boost/boost/range/distance.hpp +++ b/contrib/restricted/boost/range/include/boost/range/distance.hpp diff --git a/contrib/restricted/boost/boost/range/empty.hpp b/contrib/restricted/boost/range/include/boost/range/empty.hpp index d57a30ed01..d57a30ed01 100644 --- a/contrib/restricted/boost/boost/range/empty.hpp +++ b/contrib/restricted/boost/range/include/boost/range/empty.hpp diff --git a/contrib/restricted/boost/boost/range/end.hpp b/contrib/restricted/boost/range/include/boost/range/end.hpp index f2a3337e34..f2a3337e34 100644 --- a/contrib/restricted/boost/boost/range/end.hpp +++ b/contrib/restricted/boost/range/include/boost/range/end.hpp diff --git a/contrib/restricted/boost/boost/range/functions.hpp b/contrib/restricted/boost/range/include/boost/range/functions.hpp index 43c54b15b8..43c54b15b8 100644 --- a/contrib/restricted/boost/boost/range/functions.hpp +++ b/contrib/restricted/boost/range/include/boost/range/functions.hpp diff --git a/contrib/restricted/boost/boost/range/has_range_iterator.hpp b/contrib/restricted/boost/range/include/boost/range/has_range_iterator.hpp index 9eb58b35d2..9eb58b35d2 100644 --- a/contrib/restricted/boost/boost/range/has_range_iterator.hpp +++ b/contrib/restricted/boost/range/include/boost/range/has_range_iterator.hpp diff --git a/contrib/restricted/boost/boost/range/irange.hpp b/contrib/restricted/boost/range/include/boost/range/irange.hpp index b1a1240655..b1a1240655 100644 --- a/contrib/restricted/boost/boost/range/irange.hpp +++ b/contrib/restricted/boost/range/include/boost/range/irange.hpp diff --git a/contrib/restricted/boost/boost/range/iterator.hpp b/contrib/restricted/boost/range/include/boost/range/iterator.hpp index 2956353ab5..2956353ab5 100644 --- a/contrib/restricted/boost/boost/range/iterator.hpp +++ b/contrib/restricted/boost/range/include/boost/range/iterator.hpp diff --git a/contrib/restricted/boost/boost/range/iterator_range.hpp b/contrib/restricted/boost/range/include/boost/range/iterator_range.hpp index dfcd4d2f86..dfcd4d2f86 100644 --- a/contrib/restricted/boost/boost/range/iterator_range.hpp +++ b/contrib/restricted/boost/range/include/boost/range/iterator_range.hpp diff --git a/contrib/restricted/boost/boost/range/iterator_range_core.hpp b/contrib/restricted/boost/range/include/boost/range/iterator_range_core.hpp index 7f2dc3f9c8..7f2dc3f9c8 100644 --- a/contrib/restricted/boost/boost/range/iterator_range_core.hpp +++ b/contrib/restricted/boost/range/include/boost/range/iterator_range_core.hpp diff --git a/contrib/restricted/boost/boost/range/iterator_range_io.hpp b/contrib/restricted/boost/range/include/boost/range/iterator_range_io.hpp index 8c294008cd..8c294008cd 100644 --- a/contrib/restricted/boost/boost/range/iterator_range_io.hpp +++ b/contrib/restricted/boost/range/include/boost/range/iterator_range_io.hpp diff --git a/contrib/restricted/boost/boost/range/metafunctions.hpp b/contrib/restricted/boost/range/include/boost/range/metafunctions.hpp index 9dc59d0f7c..9dc59d0f7c 100644 --- a/contrib/restricted/boost/boost/range/metafunctions.hpp +++ b/contrib/restricted/boost/range/include/boost/range/metafunctions.hpp diff --git a/contrib/restricted/boost/boost/range/mutable_iterator.hpp b/contrib/restricted/boost/range/include/boost/range/mutable_iterator.hpp index b924666679..b924666679 100644 --- a/contrib/restricted/boost/boost/range/mutable_iterator.hpp +++ b/contrib/restricted/boost/range/include/boost/range/mutable_iterator.hpp diff --git a/contrib/restricted/boost/boost/range/pointer.hpp b/contrib/restricted/boost/range/include/boost/range/pointer.hpp index b1e8dc5c5e..b1e8dc5c5e 100644 --- a/contrib/restricted/boost/boost/range/pointer.hpp +++ b/contrib/restricted/boost/range/include/boost/range/pointer.hpp diff --git a/contrib/restricted/boost/boost/range/range_fwd.hpp b/contrib/restricted/boost/range/include/boost/range/range_fwd.hpp index 0e6e00f553..0e6e00f553 100644 --- a/contrib/restricted/boost/boost/range/range_fwd.hpp +++ b/contrib/restricted/boost/range/include/boost/range/range_fwd.hpp diff --git a/contrib/restricted/boost/boost/range/rbegin.hpp b/contrib/restricted/boost/range/include/boost/range/rbegin.hpp index 6d66de94b9..6d66de94b9 100644 --- a/contrib/restricted/boost/boost/range/rbegin.hpp +++ b/contrib/restricted/boost/range/include/boost/range/rbegin.hpp diff --git a/contrib/restricted/boost/boost/range/reference.hpp b/contrib/restricted/boost/range/include/boost/range/reference.hpp index c664c38a66..c664c38a66 100644 --- a/contrib/restricted/boost/boost/range/reference.hpp +++ b/contrib/restricted/boost/range/include/boost/range/reference.hpp diff --git a/contrib/restricted/boost/boost/range/rend.hpp b/contrib/restricted/boost/range/include/boost/range/rend.hpp index ef7040780c..ef7040780c 100644 --- a/contrib/restricted/boost/boost/range/rend.hpp +++ b/contrib/restricted/boost/range/include/boost/range/rend.hpp diff --git a/contrib/restricted/boost/boost/range/result_iterator.hpp b/contrib/restricted/boost/range/include/boost/range/result_iterator.hpp index 54e343d111..54e343d111 100644 --- a/contrib/restricted/boost/boost/range/result_iterator.hpp +++ b/contrib/restricted/boost/range/include/boost/range/result_iterator.hpp diff --git a/contrib/restricted/boost/boost/range/reverse_iterator.hpp b/contrib/restricted/boost/range/include/boost/range/reverse_iterator.hpp index 0aa0130af6..0aa0130af6 100644 --- a/contrib/restricted/boost/boost/range/reverse_iterator.hpp +++ b/contrib/restricted/boost/range/include/boost/range/reverse_iterator.hpp diff --git a/contrib/restricted/boost/boost/range/reverse_result_iterator.hpp b/contrib/restricted/boost/range/include/boost/range/reverse_result_iterator.hpp index d375cfd536..d375cfd536 100644 --- a/contrib/restricted/boost/boost/range/reverse_result_iterator.hpp +++ b/contrib/restricted/boost/range/include/boost/range/reverse_result_iterator.hpp diff --git a/contrib/restricted/boost/boost/range/size.hpp b/contrib/restricted/boost/range/include/boost/range/size.hpp index 7f38db8c1e..7f38db8c1e 100644 --- a/contrib/restricted/boost/boost/range/size.hpp +++ b/contrib/restricted/boost/range/include/boost/range/size.hpp diff --git a/contrib/restricted/boost/boost/range/size_type.hpp b/contrib/restricted/boost/range/include/boost/range/size_type.hpp index 0a2ea81bb9..0a2ea81bb9 100644 --- a/contrib/restricted/boost/boost/range/size_type.hpp +++ b/contrib/restricted/boost/range/include/boost/range/size_type.hpp diff --git a/contrib/restricted/boost/boost/range/sub_range.hpp b/contrib/restricted/boost/range/include/boost/range/sub_range.hpp index 97a9f0fcf5..97a9f0fcf5 100644 --- a/contrib/restricted/boost/boost/range/sub_range.hpp +++ b/contrib/restricted/boost/range/include/boost/range/sub_range.hpp diff --git a/contrib/restricted/boost/boost/range/value_type.hpp b/contrib/restricted/boost/range/include/boost/range/value_type.hpp index 5a3187ec0e..5a3187ec0e 100644 --- a/contrib/restricted/boost/boost/range/value_type.hpp +++ b/contrib/restricted/boost/range/include/boost/range/value_type.hpp diff --git a/contrib/restricted/boost/regex/CMakeLists.txt b/contrib/restricted/boost/regex/CMakeLists.txt new file mode 100644 index 0000000000..301ff0492e --- /dev/null +++ b/contrib/restricted/boost/regex/CMakeLists.txt @@ -0,0 +1,54 @@ + +# This file was gererated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + + +add_library(restricted-boost-regex) +target_compile_options(restricted-boost-regex PRIVATE + -DBOOST_HAS_ICU + -DBOOST_NO_CXX98_BINDERS +) +target_include_directories(restricted-boost-regex PUBLIC + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/include +) +target_link_libraries(restricted-boost-regex PUBLIC + contrib-libs-cxxsupp + yutil + contrib-libs-icu + restricted-boost-assert + restricted-boost-concept_check + restricted-boost-config + restricted-boost-container_hash + restricted-boost-core + restricted-boost-integer + restricted-boost-iterator + restricted-boost-mpl + restricted-boost-predef + restricted-boost-smart_ptr + restricted-boost-static_assert + restricted-boost-throw_exception + restricted-boost-type_traits +) +target_sources(restricted-boost-regex PRIVATE + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/c_regex_traits.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/cpp_regex_traits.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/cregex.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/fileiter.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/icu.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/instances.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/posix_api.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/regex.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/regex_debug.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/regex_raw_buffer.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/regex_traits_defaults.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/static_mutex.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/usinstances.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/w32_regex_traits.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/wc_regex_traits.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/wide_posix_api.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/regex/src/winstances.cpp +) diff --git a/contrib/restricted/boost/regex/include/boost/regex.h b/contrib/restricted/boost/regex/include/boost/regex.h new file mode 100644 index 0000000000..52af275cfa --- /dev/null +++ b/contrib/restricted/boost/regex/include/boost/regex.h @@ -0,0 +1,100 @@ +/* + * + * Copyright (c) 1998-2000 + * Dr John Maddock + * + * 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) + * + */ + + /* + * LOCATION: see http://www.boost.org/libs/regex for documentation. + * FILE regex.h + * VERSION 3.12 + * DESCRIPTION: Declares POSIX API functions + */ + +#ifndef BOOST_RE_REGEX_H +#define BOOST_RE_REGEX_H + +#include <boost/cregex.hpp> + +/* +* add using declarations to bring POSIX API functions into +* global scope, only if this is C++ (and not C). +*/ +#ifdef __cplusplus + +using boost::regoff_t; +using boost::regex_tA; +using boost::regmatch_t; +using boost::REG_BASIC; +using boost::REG_EXTENDED; +using boost::REG_ICASE; +using boost::REG_NOSUB; +using boost::REG_NEWLINE; +using boost::REG_NOSPEC; +using boost::REG_PEND; +using boost::REG_DUMP; +using boost::REG_NOCOLLATE; +using boost::REG_ESCAPE_IN_LISTS; +using boost::REG_NEWLINE_ALT; +using boost::REG_PERL; +using boost::REG_AWK; +using boost::REG_GREP; +using boost::REG_EGREP; +using boost::REG_ASSERT; +using boost::REG_INVARG; +using boost::REG_ATOI; +using boost::REG_ITOA; + +using boost::REG_NOTBOL; +using boost::REG_NOTEOL; +using boost::REG_STARTEND; + +using boost::reg_comp_flags; +using boost::reg_exec_flags; +using boost::regcompA; +using boost::regerrorA; +using boost::regexecA; +using boost::regfreeA; + +#ifndef BOOST_NO_WREGEX +using boost::regcompW; +using boost::regerrorW; +using boost::regexecW; +using boost::regfreeW; +using boost::regex_tW; +#endif + +using boost::REG_NOERROR; +using boost::REG_NOMATCH; +using boost::REG_BADPAT; +using boost::REG_ECOLLATE; +using boost::REG_ECTYPE; +using boost::REG_EESCAPE; +using boost::REG_ESUBREG; +using boost::REG_EBRACK; +using boost::REG_EPAREN; +using boost::REG_EBRACE; +using boost::REG_BADBR; +using boost::REG_ERANGE; +using boost::REG_ESPACE; +using boost::REG_BADRPT; +using boost::REG_EEND; +using boost::REG_ESIZE; +using boost::REG_ERPAREN; +using boost::REG_EMPTY; +using boost::REG_E_MEMORY; +using boost::REG_E_UNKNOWN; +using boost::reg_errcode_t; + +#endif /* __cplusplus */ + +#endif /* BOOST_RE_REGEX_H */ + + + + diff --git a/contrib/restricted/boost/regex/include/boost/regex/concepts.hpp b/contrib/restricted/boost/regex/include/boost/regex/concepts.hpp new file mode 100644 index 0000000000..8cd5d99573 --- /dev/null +++ b/contrib/restricted/boost/regex/include/boost/regex/concepts.hpp @@ -0,0 +1,1128 @@ +/* + * + * Copyright (c) 2004 + * John Maddock + * + * 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) + * + */ + + /* + * LOCATION: see http://www.boost.org for most recent version. + * FILE concepts.hpp + * VERSION see <boost/version.hpp> + * DESCRIPTION: Declares regular expression concepts. + */ + +#ifndef BOOST_REGEX_CONCEPTS_HPP_INCLUDED +#define BOOST_REGEX_CONCEPTS_HPP_INCLUDED + +#include <boost/concept_archetype.hpp> +#include <boost/concept_check.hpp> +#include <boost/type_traits/is_enum.hpp> +#include <boost/type_traits/is_base_and_derived.hpp> +#include <boost/static_assert.hpp> +#ifndef BOOST_TEST_TR1_REGEX +#include <boost/regex.hpp> +#endif +#include <bitset> +#include <vector> +#include <iostream> + +namespace boost{ + +// +// bitmask_archetype: +// this can be either an integer type, an enum, or a std::bitset, +// we use the latter as the architype as it offers the "strictest" +// of the possible interfaces: +// +typedef std::bitset<512> bitmask_archetype; +// +// char_architype: +// A strict model for the character type interface. +// +struct char_architype +{ + // default constructable: + char_architype(); + // copy constructable / assignable: + char_architype(const char_architype&); + char_architype& operator=(const char_architype&); + // constructable from an integral value: + char_architype(unsigned long val); + // comparable: + bool operator==(const char_architype&)const; + bool operator!=(const char_architype&)const; + bool operator<(const char_architype&)const; + bool operator<=(const char_architype&)const; + bool operator>=(const char_architype&)const; + bool operator>(const char_architype&)const; + // conversion to integral type: + operator long()const; +}; +inline long hash_value(char_architype val) +{ return val; } +// +// char_architype can not be used with basic_string: +// +} // namespace boost +namespace std{ + template<> struct char_traits<boost::char_architype> + { + // The intent is that this template is not instantiated, + // but this typedef gives us a chance of compilation in + // case it is: + typedef boost::char_architype char_type; + }; +} +// +// Allocator architype: +// +template <class T> +class allocator_architype +{ +public: + typedef T* pointer; + typedef const T* const_pointer; + typedef T& reference; + typedef const T& const_reference; + typedef T value_type; + typedef unsigned size_type; + typedef int difference_type; + + template <class U> + struct rebind + { + typedef allocator_architype<U> other; + }; + + pointer address(reference r){ return &r; } + const_pointer address(const_reference r) { return &r; } + pointer allocate(size_type n) { return static_cast<pointer>(std::malloc(n)); } + pointer allocate(size_type n, pointer) { return static_cast<pointer>(std::malloc(n)); } + void deallocate(pointer p, size_type) { std::free(p); } + size_type max_size()const { return UINT_MAX; } + + allocator_architype(){} + allocator_architype(const allocator_architype&){} + + template <class Other> + allocator_architype(const allocator_architype<Other>&){} + + void construct(pointer p, const_reference r) { new (p)T(r); } + void destroy(pointer p) { p->~T(); } +}; + +template <class T> +bool operator == (const allocator_architype<T>&, const allocator_architype<T>&) {return true; } +template <class T> +bool operator != (const allocator_architype<T>&, const allocator_architype<T>&) { return false; } + +namespace boost{ +// +// regex_traits_architype: +// A strict interpretation of the regular expression traits class requirements. +// +template <class charT> +struct regex_traits_architype +{ +public: + regex_traits_architype(){} + typedef charT char_type; + // typedef std::size_t size_type; + typedef std::vector<char_type> string_type; + typedef copy_constructible_archetype<assignable_archetype<> > locale_type; + typedef bitmask_archetype char_class_type; + + static std::size_t length(const char_type* ) { return 0; } + + charT translate(charT ) const { return charT(); } + charT translate_nocase(charT ) const { return static_object<charT>::get(); } + + template <class ForwardIterator> + string_type transform(ForwardIterator , ForwardIterator ) const + { return static_object<string_type>::get(); } + template <class ForwardIterator> + string_type transform_primary(ForwardIterator , ForwardIterator ) const + { return static_object<string_type>::get(); } + + template <class ForwardIterator> + char_class_type lookup_classname(ForwardIterator , ForwardIterator ) const + { return static_object<char_class_type>::get(); } + template <class ForwardIterator> + string_type lookup_collatename(ForwardIterator , ForwardIterator ) const + { return static_object<string_type>::get(); } + + bool isctype(charT, char_class_type) const + { return false; } + int value(charT, int) const + { return 0; } + + locale_type imbue(locale_type l) + { return l; } + locale_type getloc()const + { return static_object<locale_type>::get(); } + +private: + // this type is not copyable: + regex_traits_architype(const regex_traits_architype&){} + regex_traits_architype& operator=(const regex_traits_architype&){ return *this; } +}; + +// +// alter this to std::tr1, to test a std implementation: +// +#ifndef BOOST_TEST_TR1_REGEX +namespace global_regex_namespace = ::boost; +#else +namespace global_regex_namespace = ::std::tr1; +#endif + +template <class Bitmask> +struct BitmaskConcept +{ + void constraints() + { + function_requires<CopyConstructibleConcept<Bitmask> >(); + function_requires<AssignableConcept<Bitmask> >(); + + m_mask1 = m_mask2 | m_mask3; + m_mask1 = m_mask2 & m_mask3; + m_mask1 = m_mask2 ^ m_mask3; + + m_mask1 = ~m_mask2; + + m_mask1 |= m_mask2; + m_mask1 &= m_mask2; + m_mask1 ^= m_mask2; + } + Bitmask m_mask1, m_mask2, m_mask3; +}; + +template <class traits> +struct RegexTraitsConcept +{ + RegexTraitsConcept(); + // required typedefs: + typedef typename traits::char_type char_type; + // typedef typename traits::size_type size_type; + typedef typename traits::string_type string_type; + typedef typename traits::locale_type locale_type; + typedef typename traits::char_class_type char_class_type; + + void constraints() + { + //function_requires<UnsignedIntegerConcept<size_type> >(); + function_requires<RandomAccessContainerConcept<string_type> >(); + function_requires<DefaultConstructibleConcept<locale_type> >(); + function_requires<CopyConstructibleConcept<locale_type> >(); + function_requires<AssignableConcept<locale_type> >(); + function_requires<BitmaskConcept<char_class_type> >(); + + std::size_t n = traits::length(m_pointer); + ignore_unused_variable_warning(n); + + char_type c = m_ctraits.translate(m_char); + ignore_unused_variable_warning(c); + c = m_ctraits.translate_nocase(m_char); + + //string_type::foobar bar; + string_type s1 = m_ctraits.transform(m_pointer, m_pointer); + ignore_unused_variable_warning(s1); + + string_type s2 = m_ctraits.transform_primary(m_pointer, m_pointer); + ignore_unused_variable_warning(s2); + + char_class_type cc = m_ctraits.lookup_classname(m_pointer, m_pointer); + ignore_unused_variable_warning(cc); + + string_type s3 = m_ctraits.lookup_collatename(m_pointer, m_pointer); + ignore_unused_variable_warning(s3); + + bool b = m_ctraits.isctype(m_char, cc); + ignore_unused_variable_warning(b); + + int v = m_ctraits.value(m_char, 16); + ignore_unused_variable_warning(v); + + locale_type l(m_ctraits.getloc()); + m_traits.imbue(l); + ignore_unused_variable_warning(l); + } + traits m_traits; + const traits m_ctraits; + const char_type* m_pointer; + char_type m_char; +private: + RegexTraitsConcept& operator=(RegexTraitsConcept&); +}; + +// +// helper class to compute what traits class a regular expression type is using: +// +template <class Regex> +struct regex_traits_computer; + +template <class charT, class traits> +struct regex_traits_computer< global_regex_namespace::basic_regex<charT, traits> > +{ + typedef traits type; +}; + +// +// BaseRegexConcept does not test anything dependent on basic_string, +// in case our charT does not have an associated char_traits: +// +template <class Regex> +struct BaseRegexConcept +{ + typedef typename Regex::value_type value_type; + //typedef typename Regex::size_type size_type; + typedef typename Regex::flag_type flag_type; + typedef typename Regex::locale_type locale_type; + typedef input_iterator_archetype<value_type> input_iterator_type; + + // derived test types: + typedef const value_type* pointer_type; + typedef bidirectional_iterator_archetype<value_type> BidiIterator; + typedef global_regex_namespace::sub_match<BidiIterator> sub_match_type; + typedef global_regex_namespace::match_results<BidiIterator, allocator_architype<sub_match_type> > match_results_type; + typedef global_regex_namespace::match_results<BidiIterator> match_results_default_type; + typedef output_iterator_archetype<value_type> OutIterator; + typedef typename regex_traits_computer<Regex>::type traits_type; + typedef global_regex_namespace::regex_iterator<BidiIterator, value_type, traits_type> regex_iterator_type; + typedef global_regex_namespace::regex_token_iterator<BidiIterator, value_type, traits_type> regex_token_iterator_type; + + void global_constraints() + { + // + // test non-template components: + // + function_requires<BitmaskConcept<global_regex_namespace::regex_constants::syntax_option_type> >(); + global_regex_namespace::regex_constants::syntax_option_type opts + = global_regex_namespace::regex_constants::icase + | global_regex_namespace::regex_constants::nosubs + | global_regex_namespace::regex_constants::optimize + | global_regex_namespace::regex_constants::collate + | global_regex_namespace::regex_constants::ECMAScript + | global_regex_namespace::regex_constants::basic + | global_regex_namespace::regex_constants::extended + | global_regex_namespace::regex_constants::awk + | global_regex_namespace::regex_constants::grep + | global_regex_namespace::regex_constants::egrep; + ignore_unused_variable_warning(opts); + + function_requires<BitmaskConcept<global_regex_namespace::regex_constants::match_flag_type> >(); + global_regex_namespace::regex_constants::match_flag_type mopts + = global_regex_namespace::regex_constants::match_default + | global_regex_namespace::regex_constants::match_not_bol + | global_regex_namespace::regex_constants::match_not_eol + | global_regex_namespace::regex_constants::match_not_bow + | global_regex_namespace::regex_constants::match_not_eow + | global_regex_namespace::regex_constants::match_any + | global_regex_namespace::regex_constants::match_not_null + | global_regex_namespace::regex_constants::match_continuous + | global_regex_namespace::regex_constants::match_prev_avail + | global_regex_namespace::regex_constants::format_default + | global_regex_namespace::regex_constants::format_sed + | global_regex_namespace::regex_constants::format_no_copy + | global_regex_namespace::regex_constants::format_first_only; + ignore_unused_variable_warning(mopts); + + BOOST_STATIC_ASSERT((::boost::is_enum<global_regex_namespace::regex_constants::error_type>::value)); + global_regex_namespace::regex_constants::error_type e1 = global_regex_namespace::regex_constants::error_collate; + ignore_unused_variable_warning(e1); + e1 = global_regex_namespace::regex_constants::error_ctype; + ignore_unused_variable_warning(e1); + e1 = global_regex_namespace::regex_constants::error_escape; + ignore_unused_variable_warning(e1); + e1 = global_regex_namespace::regex_constants::error_backref; + ignore_unused_variable_warning(e1); + e1 = global_regex_namespace::regex_constants::error_brack; + ignore_unused_variable_warning(e1); + e1 = global_regex_namespace::regex_constants::error_paren; + ignore_unused_variable_warning(e1); + e1 = global_regex_namespace::regex_constants::error_brace; + ignore_unused_variable_warning(e1); + e1 = global_regex_namespace::regex_constants::error_badbrace; + ignore_unused_variable_warning(e1); + e1 = global_regex_namespace::regex_constants::error_range; + ignore_unused_variable_warning(e1); + e1 = global_regex_namespace::regex_constants::error_space; + ignore_unused_variable_warning(e1); + e1 = global_regex_namespace::regex_constants::error_badrepeat; + ignore_unused_variable_warning(e1); + e1 = global_regex_namespace::regex_constants::error_complexity; + ignore_unused_variable_warning(e1); + e1 = global_regex_namespace::regex_constants::error_stack; + ignore_unused_variable_warning(e1); + + BOOST_STATIC_ASSERT((::boost::is_base_and_derived<std::runtime_error, global_regex_namespace::regex_error>::value )); + const global_regex_namespace::regex_error except(e1); + e1 = except.code(); + + typedef typename Regex::value_type regex_value_type; + function_requires< RegexTraitsConcept<global_regex_namespace::regex_traits<char> > >(); + function_requires< BaseRegexConcept<global_regex_namespace::basic_regex<char> > >(); + } + void constraints() + { + global_constraints(); + + BOOST_STATIC_ASSERT((::boost::is_same< flag_type, global_regex_namespace::regex_constants::syntax_option_type>::value)); + flag_type opts + = Regex::icase + | Regex::nosubs + | Regex::optimize + | Regex::collate + | Regex::ECMAScript + | Regex::basic + | Regex::extended + | Regex::awk + | Regex::grep + | Regex::egrep; + ignore_unused_variable_warning(opts); + + function_requires<DefaultConstructibleConcept<Regex> >(); + function_requires<CopyConstructibleConcept<Regex> >(); + + // Regex constructors: + Regex e1(m_pointer); + ignore_unused_variable_warning(e1); + Regex e2(m_pointer, m_flags); + ignore_unused_variable_warning(e2); + Regex e3(m_pointer, m_size, m_flags); + ignore_unused_variable_warning(e3); + Regex e4(in1, in2); + ignore_unused_variable_warning(e4); + Regex e5(in1, in2, m_flags); + ignore_unused_variable_warning(e5); + + // assign etc: + Regex e; + e = m_pointer; + e = e1; + e.assign(e1); + e.assign(m_pointer); + e.assign(m_pointer, m_flags); + e.assign(m_pointer, m_size, m_flags); + e.assign(in1, in2); + e.assign(in1, in2, m_flags); + + // access: + const Regex ce; + typename Regex::size_type i = ce.mark_count(); + ignore_unused_variable_warning(i); + m_flags = ce.flags(); + e.imbue(ce.getloc()); + e.swap(e1); + + global_regex_namespace::swap(e, e1); + + // sub_match: + BOOST_STATIC_ASSERT((::boost::is_base_and_derived<std::pair<BidiIterator, BidiIterator>, sub_match_type>::value)); + typedef typename sub_match_type::value_type sub_value_type; + typedef typename sub_match_type::difference_type sub_diff_type; + typedef typename sub_match_type::iterator sub_iter_type; + BOOST_STATIC_ASSERT((::boost::is_same<sub_value_type, value_type>::value)); + BOOST_STATIC_ASSERT((::boost::is_same<sub_iter_type, BidiIterator>::value)); + bool b = m_sub.matched; + ignore_unused_variable_warning(b); + BidiIterator bi = m_sub.first; + ignore_unused_variable_warning(bi); + bi = m_sub.second; + ignore_unused_variable_warning(bi); + sub_diff_type diff = m_sub.length(); + ignore_unused_variable_warning(diff); + // match_results tests: + typedef typename match_results_type::value_type mr_value_type; + typedef typename match_results_type::const_reference mr_const_reference; + typedef typename match_results_type::reference mr_reference; + typedef typename match_results_type::const_iterator mr_const_iterator; + typedef typename match_results_type::iterator mr_iterator; + typedef typename match_results_type::difference_type mr_difference_type; + typedef typename match_results_type::size_type mr_size_type; + typedef typename match_results_type::allocator_type mr_allocator_type; + typedef typename match_results_type::char_type mr_char_type; + typedef typename match_results_type::string_type mr_string_type; + + match_results_type m1; + mr_allocator_type at; + match_results_type m2(at); + match_results_type m3(m1); + m1 = m2; + + int ival = 0; + + mr_size_type mrs = m_cresults.size(); + ignore_unused_variable_warning(mrs); + mrs = m_cresults.max_size(); + ignore_unused_variable_warning(mrs); + b = m_cresults.empty(); + ignore_unused_variable_warning(b); + mr_difference_type mrd = m_cresults.length(); + ignore_unused_variable_warning(mrd); + mrd = m_cresults.length(ival); + ignore_unused_variable_warning(mrd); + mrd = m_cresults.position(); + ignore_unused_variable_warning(mrd); + mrd = m_cresults.position(mrs); + ignore_unused_variable_warning(mrd); + + mr_const_reference mrcr = m_cresults[ival]; + ignore_unused_variable_warning(mrcr); + mr_const_reference mrcr2 = m_cresults.prefix(); + ignore_unused_variable_warning(mrcr2); + mr_const_reference mrcr3 = m_cresults.suffix(); + ignore_unused_variable_warning(mrcr3); + mr_const_iterator mrci = m_cresults.begin(); + ignore_unused_variable_warning(mrci); + mrci = m_cresults.end(); + ignore_unused_variable_warning(mrci); + + mr_allocator_type at2 = m_cresults.get_allocator(); + m_results.swap(m_results); + global_regex_namespace::swap(m_results, m_results); + + // regex_match: + b = global_regex_namespace::regex_match(m_in, m_in, m_results, e); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_match(m_in, m_in, m_results, e, m_mft); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_match(m_in, m_in, e); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_match(m_in, m_in, e, m_mft); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_match(m_pointer, m_pmatch, e); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_match(m_pointer, m_pmatch, e, m_mft); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_match(m_pointer, e); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_match(m_pointer, e, m_mft); + ignore_unused_variable_warning(b); + // regex_search: + b = global_regex_namespace::regex_search(m_in, m_in, m_results, e); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_search(m_in, m_in, m_results, e, m_mft); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_search(m_in, m_in, e); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_search(m_in, m_in, e, m_mft); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_search(m_pointer, m_pmatch, e); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_search(m_pointer, m_pmatch, e, m_mft); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_search(m_pointer, e); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_search(m_pointer, e, m_mft); + ignore_unused_variable_warning(b); + + // regex_iterator: + typedef typename regex_iterator_type::regex_type rit_regex_type; + typedef typename regex_iterator_type::value_type rit_value_type; + typedef typename regex_iterator_type::difference_type rit_difference_type; + typedef typename regex_iterator_type::pointer rit_pointer; + typedef typename regex_iterator_type::reference rit_reference; + typedef typename regex_iterator_type::iterator_category rit_iterator_category; + BOOST_STATIC_ASSERT((::boost::is_same<rit_regex_type, Regex>::value)); + BOOST_STATIC_ASSERT((::boost::is_same<rit_value_type, match_results_default_type>::value)); + BOOST_STATIC_ASSERT((::boost::is_same<rit_difference_type, std::ptrdiff_t>::value)); + BOOST_STATIC_ASSERT((::boost::is_same<rit_pointer, const match_results_default_type*>::value)); + BOOST_STATIC_ASSERT((::boost::is_same<rit_reference, const match_results_default_type&>::value)); + BOOST_STATIC_ASSERT((::boost::is_convertible<rit_iterator_category*, std::forward_iterator_tag*>::value)); + // this takes care of most of the checks needed: + function_requires<ForwardIteratorConcept<regex_iterator_type> >(); + regex_iterator_type iter1(m_in, m_in, e); + ignore_unused_variable_warning(iter1); + regex_iterator_type iter2(m_in, m_in, e, m_mft); + ignore_unused_variable_warning(iter2); + + // regex_token_iterator: + typedef typename regex_token_iterator_type::regex_type rtit_regex_type; + typedef typename regex_token_iterator_type::value_type rtit_value_type; + typedef typename regex_token_iterator_type::difference_type rtit_difference_type; + typedef typename regex_token_iterator_type::pointer rtit_pointer; + typedef typename regex_token_iterator_type::reference rtit_reference; + typedef typename regex_token_iterator_type::iterator_category rtit_iterator_category; + BOOST_STATIC_ASSERT((::boost::is_same<rtit_regex_type, Regex>::value)); + BOOST_STATIC_ASSERT((::boost::is_same<rtit_value_type, sub_match_type>::value)); + BOOST_STATIC_ASSERT((::boost::is_same<rtit_difference_type, std::ptrdiff_t>::value)); + BOOST_STATIC_ASSERT((::boost::is_same<rtit_pointer, const sub_match_type*>::value)); + BOOST_STATIC_ASSERT((::boost::is_same<rtit_reference, const sub_match_type&>::value)); + BOOST_STATIC_ASSERT((::boost::is_convertible<rtit_iterator_category*, std::forward_iterator_tag*>::value)); + // this takes care of most of the checks needed: + function_requires<ForwardIteratorConcept<regex_token_iterator_type> >(); + regex_token_iterator_type ti1(m_in, m_in, e); + ignore_unused_variable_warning(ti1); + regex_token_iterator_type ti2(m_in, m_in, e, 0); + ignore_unused_variable_warning(ti2); + regex_token_iterator_type ti3(m_in, m_in, e, 0, m_mft); + ignore_unused_variable_warning(ti3); + std::vector<int> subs; + regex_token_iterator_type ti4(m_in, m_in, e, subs); + ignore_unused_variable_warning(ti4); + regex_token_iterator_type ti5(m_in, m_in, e, subs, m_mft); + ignore_unused_variable_warning(ti5); + static const int i_array[3] = { 1, 2, 3, }; + regex_token_iterator_type ti6(m_in, m_in, e, i_array); + ignore_unused_variable_warning(ti6); + regex_token_iterator_type ti7(m_in, m_in, e, i_array, m_mft); + ignore_unused_variable_warning(ti7); + } + + pointer_type m_pointer; + flag_type m_flags; + std::size_t m_size; + input_iterator_type in1, in2; + const sub_match_type m_sub; + const value_type m_char; + match_results_type m_results; + const match_results_type m_cresults; + OutIterator m_out; + BidiIterator m_in; + global_regex_namespace::regex_constants::match_flag_type m_mft; + global_regex_namespace::match_results< + pointer_type, + allocator_architype<global_regex_namespace::sub_match<pointer_type> > > + m_pmatch; + + BaseRegexConcept(); + BaseRegexConcept(const BaseRegexConcept&); + BaseRegexConcept& operator=(const BaseRegexConcept&); +}; + +// +// RegexConcept: +// Test every interface in the std: +// +template <class Regex> +struct RegexConcept +{ + typedef typename Regex::value_type value_type; + //typedef typename Regex::size_type size_type; + typedef typename Regex::flag_type flag_type; + typedef typename Regex::locale_type locale_type; + + // derived test types: + typedef const value_type* pointer_type; + typedef std::basic_string<value_type> string_type; + typedef boost::bidirectional_iterator_archetype<value_type> BidiIterator; + typedef global_regex_namespace::sub_match<BidiIterator> sub_match_type; + typedef global_regex_namespace::match_results<BidiIterator, allocator_architype<sub_match_type> > match_results_type; + typedef output_iterator_archetype<value_type> OutIterator; + + + void constraints() + { + function_requires<BaseRegexConcept<Regex> >(); + // string based construct: + Regex e1(m_string); + ignore_unused_variable_warning(e1); + Regex e2(m_string, m_flags); + ignore_unused_variable_warning(e2); + + // assign etc: + Regex e; + e = m_string; + e.assign(m_string); + e.assign(m_string, m_flags); + + // sub_match: + string_type s(m_sub); + ignore_unused_variable_warning(s); + s = m_sub.str(); + ignore_unused_variable_warning(s); + int i = m_sub.compare(m_string); + ignore_unused_variable_warning(i); + + int i2 = m_sub.compare(m_sub); + ignore_unused_variable_warning(i2); + i2 = m_sub.compare(m_pointer); + ignore_unused_variable_warning(i2); + + bool b = m_sub == m_sub; + ignore_unused_variable_warning(b); + b = m_sub != m_sub; + ignore_unused_variable_warning(b); + b = m_sub <= m_sub; + ignore_unused_variable_warning(b); + b = m_sub <= m_sub; + ignore_unused_variable_warning(b); + b = m_sub > m_sub; + ignore_unused_variable_warning(b); + b = m_sub >= m_sub; + ignore_unused_variable_warning(b); + + b = m_sub == m_pointer; + ignore_unused_variable_warning(b); + b = m_sub != m_pointer; + ignore_unused_variable_warning(b); + b = m_sub <= m_pointer; + ignore_unused_variable_warning(b); + b = m_sub <= m_pointer; + ignore_unused_variable_warning(b); + b = m_sub > m_pointer; + ignore_unused_variable_warning(b); + b = m_sub >= m_pointer; + ignore_unused_variable_warning(b); + + b = m_pointer == m_sub; + ignore_unused_variable_warning(b); + b = m_pointer != m_sub; + ignore_unused_variable_warning(b); + b = m_pointer <= m_sub; + ignore_unused_variable_warning(b); + b = m_pointer <= m_sub; + ignore_unused_variable_warning(b); + b = m_pointer > m_sub; + ignore_unused_variable_warning(b); + b = m_pointer >= m_sub; + ignore_unused_variable_warning(b); + + b = m_sub == m_char; + ignore_unused_variable_warning(b); + b = m_sub != m_char; + ignore_unused_variable_warning(b); + b = m_sub <= m_char; + ignore_unused_variable_warning(b); + b = m_sub <= m_char; + ignore_unused_variable_warning(b); + b = m_sub > m_char; + ignore_unused_variable_warning(b); + b = m_sub >= m_char; + ignore_unused_variable_warning(b); + + b = m_char == m_sub; + ignore_unused_variable_warning(b); + b = m_char != m_sub; + ignore_unused_variable_warning(b); + b = m_char <= m_sub; + ignore_unused_variable_warning(b); + b = m_char <= m_sub; + ignore_unused_variable_warning(b); + b = m_char > m_sub; + ignore_unused_variable_warning(b); + b = m_char >= m_sub; + ignore_unused_variable_warning(b); + + b = m_sub == m_string; + ignore_unused_variable_warning(b); + b = m_sub != m_string; + ignore_unused_variable_warning(b); + b = m_sub <= m_string; + ignore_unused_variable_warning(b); + b = m_sub <= m_string; + ignore_unused_variable_warning(b); + b = m_sub > m_string; + ignore_unused_variable_warning(b); + b = m_sub >= m_string; + ignore_unused_variable_warning(b); + + b = m_string == m_sub; + ignore_unused_variable_warning(b); + b = m_string != m_sub; + ignore_unused_variable_warning(b); + b = m_string <= m_sub; + ignore_unused_variable_warning(b); + b = m_string <= m_sub; + ignore_unused_variable_warning(b); + b = m_string > m_sub; + ignore_unused_variable_warning(b); + b = m_string >= m_sub; + ignore_unused_variable_warning(b); + + // match results: + m_string = m_results.str(); + ignore_unused_variable_warning(m_string); + m_string = m_results.str(0); + ignore_unused_variable_warning(m_string); + m_out = m_cresults.format(m_out, m_string); + m_out = m_cresults.format(m_out, m_string, m_mft); + m_string = m_cresults.format(m_string); + ignore_unused_variable_warning(m_string); + m_string = m_cresults.format(m_string, m_mft); + ignore_unused_variable_warning(m_string); + + // regex_match: + b = global_regex_namespace::regex_match(m_string, m_smatch, e); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_match(m_string, m_smatch, e, m_mft); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_match(m_string, e); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_match(m_string, e, m_mft); + ignore_unused_variable_warning(b); + + // regex_search: + b = global_regex_namespace::regex_search(m_string, m_smatch, e); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_search(m_string, m_smatch, e, m_mft); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_search(m_string, e); + ignore_unused_variable_warning(b); + b = global_regex_namespace::regex_search(m_string, e, m_mft); + ignore_unused_variable_warning(b); + + // regex_replace: + m_out = global_regex_namespace::regex_replace(m_out, m_in, m_in, e, m_string, m_mft); + m_out = global_regex_namespace::regex_replace(m_out, m_in, m_in, e, m_string); + m_string = global_regex_namespace::regex_replace(m_string, e, m_string, m_mft); + ignore_unused_variable_warning(m_string); + m_string = global_regex_namespace::regex_replace(m_string, e, m_string); + ignore_unused_variable_warning(m_string); + + } + + flag_type m_flags; + string_type m_string; + const sub_match_type m_sub; + match_results_type m_results; + pointer_type m_pointer; + value_type m_char; + const match_results_type m_cresults; + OutIterator m_out; + BidiIterator m_in; + global_regex_namespace::regex_constants::match_flag_type m_mft; + global_regex_namespace::match_results<typename string_type::const_iterator, allocator_architype<global_regex_namespace::sub_match<typename string_type::const_iterator> > > m_smatch; + + RegexConcept(); + RegexConcept(const RegexConcept&); + RegexConcept& operator=(const RegexConcept&); +}; + +#ifndef BOOST_REGEX_TEST_STD + +template <class M> +struct functor1 +{ + typedef typename M::char_type char_type; + const char_type* operator()(const M&)const + { + static const char_type c = static_cast<char_type>(0); + return &c; + } +}; +template <class M> +struct functor1b +{ + typedef typename M::char_type char_type; + std::vector<char_type> operator()(const M&)const + { + static const std::vector<char_type> c; + return c; + } +}; +template <class M> +struct functor2 +{ + template <class O> + O operator()(const M& /*m*/, O i)const + { + return i; + } +}; +template <class M> +struct functor3 +{ + template <class O> + O operator()(const M& /*m*/, O i, regex_constants::match_flag_type)const + { + return i; + } +}; + +// +// BoostRegexConcept: +// Test every interface in the Boost implementation: +// +template <class Regex> +struct BoostRegexConcept +{ + typedef typename Regex::value_type value_type; + typedef typename Regex::size_type size_type; + typedef typename Regex::flag_type flag_type; + typedef typename Regex::locale_type locale_type; + + // derived test types: + typedef const value_type* pointer_type; + typedef std::basic_string<value_type> string_type; + typedef typename Regex::const_iterator const_iterator; + typedef bidirectional_iterator_archetype<value_type> BidiIterator; + typedef output_iterator_archetype<value_type> OutputIterator; + typedef global_regex_namespace::sub_match<BidiIterator> sub_match_type; + typedef global_regex_namespace::match_results<BidiIterator, allocator_architype<sub_match_type> > match_results_type; + typedef global_regex_namespace::match_results<BidiIterator> match_results_default_type; + + void constraints() + { + global_regex_namespace::regex_constants::match_flag_type mopts + = global_regex_namespace::regex_constants::match_default + | global_regex_namespace::regex_constants::match_not_bol + | global_regex_namespace::regex_constants::match_not_eol + | global_regex_namespace::regex_constants::match_not_bow + | global_regex_namespace::regex_constants::match_not_eow + | global_regex_namespace::regex_constants::match_any + | global_regex_namespace::regex_constants::match_not_null + | global_regex_namespace::regex_constants::match_continuous + | global_regex_namespace::regex_constants::match_partial + | global_regex_namespace::regex_constants::match_prev_avail + | global_regex_namespace::regex_constants::format_default + | global_regex_namespace::regex_constants::format_sed + | global_regex_namespace::regex_constants::format_perl + | global_regex_namespace::regex_constants::format_no_copy + | global_regex_namespace::regex_constants::format_first_only; + + (void)mopts; + + function_requires<RegexConcept<Regex> >(); + const global_regex_namespace::regex_error except(global_regex_namespace::regex_constants::error_collate); + std::ptrdiff_t pt = except.position(); + ignore_unused_variable_warning(pt); + const Regex ce, ce2; +#ifndef BOOST_NO_STD_LOCALE + m_stream << ce; +#endif + unsigned i = ce.error_code(); + ignore_unused_variable_warning(i); + pointer_type p = ce.expression(); + ignore_unused_variable_warning(p); + int i2 = ce.compare(ce2); + ignore_unused_variable_warning(i2); + bool b = ce == ce2; + ignore_unused_variable_warning(b); + b = ce.empty(); + ignore_unused_variable_warning(b); + b = ce != ce2; + ignore_unused_variable_warning(b); + b = ce < ce2; + ignore_unused_variable_warning(b); + b = ce > ce2; + ignore_unused_variable_warning(b); + b = ce <= ce2; + ignore_unused_variable_warning(b); + b = ce >= ce2; + ignore_unused_variable_warning(b); + i = ce.status(); + ignore_unused_variable_warning(i); + size_type s = ce.max_size(); + ignore_unused_variable_warning(s); + s = ce.size(); + ignore_unused_variable_warning(s); + const_iterator pi = ce.begin(); + ignore_unused_variable_warning(pi); + pi = ce.end(); + ignore_unused_variable_warning(pi); + string_type s2 = ce.str(); + ignore_unused_variable_warning(s2); + + m_string = m_sub + m_sub; + ignore_unused_variable_warning(m_string); + m_string = m_sub + m_pointer; + ignore_unused_variable_warning(m_string); + m_string = m_pointer + m_sub; + ignore_unused_variable_warning(m_string); + m_string = m_sub + m_string; + ignore_unused_variable_warning(m_string); + m_string = m_string + m_sub; + ignore_unused_variable_warning(m_string); + m_string = m_sub + m_char; + ignore_unused_variable_warning(m_string); + m_string = m_char + m_sub; + ignore_unused_variable_warning(m_string); + + // Named sub-expressions: + m_sub = m_cresults[&m_char]; + ignore_unused_variable_warning(m_sub); + m_sub = m_cresults[m_string]; + ignore_unused_variable_warning(m_sub); + m_sub = m_cresults[""]; + ignore_unused_variable_warning(m_sub); + m_sub = m_cresults[std::string("")]; + ignore_unused_variable_warning(m_sub); + m_string = m_cresults.str(&m_char); + ignore_unused_variable_warning(m_string); + m_string = m_cresults.str(m_string); + ignore_unused_variable_warning(m_string); + m_string = m_cresults.str(""); + ignore_unused_variable_warning(m_string); + m_string = m_cresults.str(std::string("")); + ignore_unused_variable_warning(m_string); + + typename match_results_type::difference_type diff; + diff = m_cresults.length(&m_char); + ignore_unused_variable_warning(diff); + diff = m_cresults.length(m_string); + ignore_unused_variable_warning(diff); + diff = m_cresults.length(""); + ignore_unused_variable_warning(diff); + diff = m_cresults.length(std::string("")); + ignore_unused_variable_warning(diff); + diff = m_cresults.position(&m_char); + ignore_unused_variable_warning(diff); + diff = m_cresults.position(m_string); + ignore_unused_variable_warning(diff); + diff = m_cresults.position(""); + ignore_unused_variable_warning(diff); + diff = m_cresults.position(std::string("")); + ignore_unused_variable_warning(diff); + +#ifndef BOOST_NO_STD_LOCALE + m_stream << m_sub; + m_stream << m_cresults; +#endif + // + // Extended formatting with a functor: + // + regex_constants::match_flag_type f = regex_constants::match_default; + OutputIterator out = static_object<OutputIterator>::get(); + + functor3<match_results_default_type> func3; + functor2<match_results_default_type> func2; + functor1<match_results_default_type> func1; + + functor3<match_results_type> func3b; + functor2<match_results_type> func2b; + functor1<match_results_type> func1b; + + out = regex_format(out, m_cresults, func3b, f); + out = regex_format(out, m_cresults, func3b); + out = regex_format(out, m_cresults, func2b, f); + out = regex_format(out, m_cresults, func2b); + out = regex_format(out, m_cresults, func1b, f); + out = regex_format(out, m_cresults, func1b); + out = regex_format(out, m_cresults, boost::ref(func3b), f); + out = regex_format(out, m_cresults, boost::ref(func3b)); + out = regex_format(out, m_cresults, boost::ref(func2b), f); + out = regex_format(out, m_cresults, boost::ref(func2b)); + out = regex_format(out, m_cresults, boost::ref(func1b), f); + out = regex_format(out, m_cresults, boost::ref(func1b)); + out = regex_format(out, m_cresults, boost::cref(func3b), f); + out = regex_format(out, m_cresults, boost::cref(func3b)); + out = regex_format(out, m_cresults, boost::cref(func2b), f); + out = regex_format(out, m_cresults, boost::cref(func2b)); + out = regex_format(out, m_cresults, boost::cref(func1b), f); + out = regex_format(out, m_cresults, boost::cref(func1b)); + + m_string += regex_format(m_cresults, func3b, f); + m_string += regex_format(m_cresults, func3b); + m_string += regex_format(m_cresults, func2b, f); + m_string += regex_format(m_cresults, func2b); + m_string += regex_format(m_cresults, func1b, f); + m_string += regex_format(m_cresults, func1b); + m_string += regex_format(m_cresults, boost::ref(func3b), f); + m_string += regex_format(m_cresults, boost::ref(func3b)); + m_string += regex_format(m_cresults, boost::ref(func2b), f); + m_string += regex_format(m_cresults, boost::ref(func2b)); + m_string += regex_format(m_cresults, boost::ref(func1b), f); + m_string += regex_format(m_cresults, boost::ref(func1b)); + m_string += regex_format(m_cresults, boost::cref(func3b), f); + m_string += regex_format(m_cresults, boost::cref(func3b)); + m_string += regex_format(m_cresults, boost::cref(func2b), f); + m_string += regex_format(m_cresults, boost::cref(func2b)); + m_string += regex_format(m_cresults, boost::cref(func1b), f); + m_string += regex_format(m_cresults, boost::cref(func1b)); + + out = m_cresults.format(out, func3b, f); + out = m_cresults.format(out, func3b); + out = m_cresults.format(out, func2b, f); + out = m_cresults.format(out, func2b); + out = m_cresults.format(out, func1b, f); + out = m_cresults.format(out, func1b); + out = m_cresults.format(out, boost::ref(func3b), f); + out = m_cresults.format(out, boost::ref(func3b)); + out = m_cresults.format(out, boost::ref(func2b), f); + out = m_cresults.format(out, boost::ref(func2b)); + out = m_cresults.format(out, boost::ref(func1b), f); + out = m_cresults.format(out, boost::ref(func1b)); + out = m_cresults.format(out, boost::cref(func3b), f); + out = m_cresults.format(out, boost::cref(func3b)); + out = m_cresults.format(out, boost::cref(func2b), f); + out = m_cresults.format(out, boost::cref(func2b)); + out = m_cresults.format(out, boost::cref(func1b), f); + out = m_cresults.format(out, boost::cref(func1b)); + + m_string += m_cresults.format(func3b, f); + m_string += m_cresults.format(func3b); + m_string += m_cresults.format(func2b, f); + m_string += m_cresults.format(func2b); + m_string += m_cresults.format(func1b, f); + m_string += m_cresults.format(func1b); + m_string += m_cresults.format(boost::ref(func3b), f); + m_string += m_cresults.format(boost::ref(func3b)); + m_string += m_cresults.format(boost::ref(func2b), f); + m_string += m_cresults.format(boost::ref(func2b)); + m_string += m_cresults.format(boost::ref(func1b), f); + m_string += m_cresults.format(boost::ref(func1b)); + m_string += m_cresults.format(boost::cref(func3b), f); + m_string += m_cresults.format(boost::cref(func3b)); + m_string += m_cresults.format(boost::cref(func2b), f); + m_string += m_cresults.format(boost::cref(func2b)); + m_string += m_cresults.format(boost::cref(func1b), f); + m_string += m_cresults.format(boost::cref(func1b)); + + out = regex_replace(out, m_in, m_in, ce, func3, f); + out = regex_replace(out, m_in, m_in, ce, func3); + out = regex_replace(out, m_in, m_in, ce, func2, f); + out = regex_replace(out, m_in, m_in, ce, func2); + out = regex_replace(out, m_in, m_in, ce, func1, f); + out = regex_replace(out, m_in, m_in, ce, func1); + out = regex_replace(out, m_in, m_in, ce, boost::ref(func3), f); + out = regex_replace(out, m_in, m_in, ce, boost::ref(func3)); + out = regex_replace(out, m_in, m_in, ce, boost::ref(func2), f); + out = regex_replace(out, m_in, m_in, ce, boost::ref(func2)); + out = regex_replace(out, m_in, m_in, ce, boost::ref(func1), f); + out = regex_replace(out, m_in, m_in, ce, boost::ref(func1)); + out = regex_replace(out, m_in, m_in, ce, boost::cref(func3), f); + out = regex_replace(out, m_in, m_in, ce, boost::cref(func3)); + out = regex_replace(out, m_in, m_in, ce, boost::cref(func2), f); + out = regex_replace(out, m_in, m_in, ce, boost::cref(func2)); + out = regex_replace(out, m_in, m_in, ce, boost::cref(func1), f); + out = regex_replace(out, m_in, m_in, ce, boost::cref(func1)); + + functor3<match_results<typename string_type::const_iterator> > func3s; + functor2<match_results<typename string_type::const_iterator> > func2s; + functor1<match_results<typename string_type::const_iterator> > func1s; + m_string += regex_replace(m_string, ce, func3s, f); + m_string += regex_replace(m_string, ce, func3s); + m_string += regex_replace(m_string, ce, func2s, f); + m_string += regex_replace(m_string, ce, func2s); + m_string += regex_replace(m_string, ce, func1s, f); + m_string += regex_replace(m_string, ce, func1s); + m_string += regex_replace(m_string, ce, boost::ref(func3s), f); + m_string += regex_replace(m_string, ce, boost::ref(func3s)); + m_string += regex_replace(m_string, ce, boost::ref(func2s), f); + m_string += regex_replace(m_string, ce, boost::ref(func2s)); + m_string += regex_replace(m_string, ce, boost::ref(func1s), f); + m_string += regex_replace(m_string, ce, boost::ref(func1s)); + m_string += regex_replace(m_string, ce, boost::cref(func3s), f); + m_string += regex_replace(m_string, ce, boost::cref(func3s)); + m_string += regex_replace(m_string, ce, boost::cref(func2s), f); + m_string += regex_replace(m_string, ce, boost::cref(func2s)); + m_string += regex_replace(m_string, ce, boost::cref(func1s), f); + m_string += regex_replace(m_string, ce, boost::cref(func1s)); + } + + std::basic_ostream<value_type> m_stream; + sub_match_type m_sub; + pointer_type m_pointer; + string_type m_string; + const value_type m_char; + match_results_type m_results; + const match_results_type m_cresults; + BidiIterator m_in; + + BoostRegexConcept(); + BoostRegexConcept(const BoostRegexConcept&); + BoostRegexConcept& operator=(const BoostRegexConcept&); +}; + +#endif // BOOST_REGEX_TEST_STD + +} + +#endif diff --git a/contrib/restricted/boost/regex/include/boost/regex/mfc.hpp b/contrib/restricted/boost/regex/include/boost/regex/mfc.hpp new file mode 100644 index 0000000000..d780673931 --- /dev/null +++ b/contrib/restricted/boost/regex/include/boost/regex/mfc.hpp @@ -0,0 +1,186 @@ +/* + * + * Copyright (c) 2004 + * John Maddock + * + * 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) + * + */ + + /* + * LOCATION: see http://www.boost.org for most recent version. + * FILE mfc.hpp + * VERSION see <boost/version.hpp> + * DESCRIPTION: Overloads and helpers for using MFC/ATL string types with Boost.Regex. + */ + +#ifndef BOOST_REGEX_MFC_HPP +#define BOOST_REGEX_MFC_HPP + +#include <atlsimpstr.h> +#include <boost/regex.hpp> + +namespace boost{ + +// +// define the types used for TCHAR's: +typedef basic_regex<TCHAR> tregex; +typedef match_results<TCHAR const*> tmatch; +typedef regex_iterator<TCHAR const*> tregex_iterator; +typedef regex_token_iterator<TCHAR const*> tregex_token_iterator; + +// Obsolete. Remove +#define SIMPLE_STRING_PARAM class B, bool b +#define SIMPLE_STRING_ARG_LIST B, b + +// +// define regex creation functions: +// +template <class B, bool b> +inline basic_regex<B> +make_regex(const ATL::CSimpleStringT<B, b>& s, ::boost::regex_constants::syntax_option_type f = boost::regex_constants::normal) +{ + basic_regex<B> result(s.GetString(), s.GetString() + s.GetLength(), f); + return result; +} +// +// regex_match overloads: +// +template <class B, bool b, class A, class T> +inline bool regex_match(const ATL::CSimpleStringT<B, b>& s, + match_results<const B*, A>& what, + const basic_regex<B, T>& e, + boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) +{ + return ::boost::regex_match(s.GetString(), + s.GetString() + s.GetLength(), + what, + e, + f); +} + +template <class B, bool b, class T> +inline bool regex_match(const ATL::CSimpleStringT<B, b>& s, + const basic_regex<B, T>& e, + boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) +{ + return ::boost::regex_match(s.GetString(), + s.GetString() + s.GetLength(), + e, + f); +} +// +// regex_search overloads: +// +template <class B, bool b, class A, class T> +inline bool regex_search(const ATL::CSimpleStringT<B, b>& s, + match_results<const B*, A>& what, + const basic_regex<B, T>& e, + boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) +{ + return ::boost::regex_search(s.GetString(), + s.GetString() + s.GetLength(), + what, + e, + f); +} + +template <class B, bool b, class T> +inline bool regex_search(const ATL::CSimpleStringT<B, b>& s, + const basic_regex<B, T>& e, + boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) +{ + return ::boost::regex_search(s.GetString(), + s.GetString() + s.GetLength(), + e, + f); +} +// +// regex_iterator creation: +// +template <class B, bool b> +inline regex_iterator<B const*> +make_regex_iterator(const ATL::CSimpleStringT<B, b>& s, const basic_regex<B>& e, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) +{ + regex_iterator<B const*> result(s.GetString(), s.GetString() + s.GetLength(), e, f); + return result; +} + +template <class B, bool b> +inline regex_token_iterator<B const*> + make_regex_token_iterator(const ATL::CSimpleStringT<B, b>& s, const basic_regex<B>& e, int sub = 0, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) +{ + regex_token_iterator<B const*> result(s.GetString(), s.GetString() + s.GetLength(), e, sub, f); + return result; +} + +template <class B, bool b> +inline regex_token_iterator<B const*> +make_regex_token_iterator(const ATL::CSimpleStringT<B, b>& s, const basic_regex<B>& e, const std::vector<int>& subs, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) +{ + regex_token_iterator<B const*> result(s.GetString(), s.GetString() + s.GetLength(), e, subs, f); + return result; +} + +template <class B, bool b, std::size_t N> +inline regex_token_iterator<B const*> +make_regex_token_iterator(const ATL::CSimpleStringT<B, b>& s, const basic_regex<B>& e, const int (& subs)[N], ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) +{ + regex_token_iterator<B const*> result(s.GetString(), s.GetString() + s.GetLength(), e, subs, f); + return result; +} + +template <class OutputIterator, class BidirectionalIterator, class traits, + class B, bool b> +OutputIterator regex_replace(OutputIterator out, + BidirectionalIterator first, + BidirectionalIterator last, + const basic_regex<B, traits>& e, + const ATL::CSimpleStringT<B, b>& fmt, + match_flag_type flags = match_default) +{ + return ::boost::regex_replace(out, first, last, e, fmt.GetString(), flags); +} + +namespace BOOST_REGEX_DETAIL_NS{ + +template <class B, bool b> +class mfc_string_out_iterator +{ + ATL::CSimpleStringT<B, b>* out; +public: + mfc_string_out_iterator(ATL::CSimpleStringT<B, b>& s) : out(&s) {} + mfc_string_out_iterator& operator++() { return *this; } + mfc_string_out_iterator& operator++(int) { return *this; } + mfc_string_out_iterator& operator*() { return *this; } + mfc_string_out_iterator& operator=(B v) + { + out->AppendChar(v); + return *this; + } + typedef std::ptrdiff_t difference_type; + typedef B value_type; + typedef value_type* pointer; + typedef value_type& reference; + typedef std::output_iterator_tag iterator_category; +}; + +} + +template <class traits, class B, bool b> +ATL::CSimpleStringT<B, b> regex_replace(const ATL::CSimpleStringT<B, b>& s, + const basic_regex<B, traits>& e, + const ATL::CSimpleStringT<B, b>& fmt, + match_flag_type flags = match_default) +{ + ATL::CSimpleStringT<B, b> result(s.GetManager()); + BOOST_REGEX_DETAIL_NS::mfc_string_out_iterator<B, b> i(result); + regex_replace(i, s.GetString(), s.GetString() + s.GetLength(), e, fmt.GetString(), flags); + return result; +} + +} // namespace boost. + +#endif diff --git a/contrib/restricted/boost/regex/include/boost/regex/user.hpp b/contrib/restricted/boost/regex/include/boost/regex/user.hpp new file mode 100644 index 0000000000..33b1013648 --- /dev/null +++ b/contrib/restricted/boost/regex/include/boost/regex/user.hpp @@ -0,0 +1,93 @@ +/* + * + * Copyright (c) 1998-2002 + * John Maddock + * + * 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) + * + */ + + /* + * LOCATION: see http://www.boost.org for most recent version. + * FILE user.hpp + * VERSION see <boost/version.hpp> + * DESCRIPTION: User settable options. + */ + +// define if you want the regex library to use the C locale +// even on Win32: +// #define BOOST_REGEX_USE_C_LOCALE + +// define this is you want the regex library to use the C++ +// locale: +// #define BOOST_REGEX_USE_CPP_LOCALE + +// define this if the runtime library is a dll, and you +// want BOOST_REGEX_DYN_LINK to set up dll exports/imports +// with __declspec(dllexport)/__declspec(dllimport.) +// #define BOOST_REGEX_HAS_DLL_RUNTIME + +// define this if you want to dynamically link to regex, +// if the runtime library is also a dll (Probably Win32 specific, +// and has no effect unless BOOST_REGEX_HAS_DLL_RUNTIME is set): +// #define BOOST_REGEX_DYN_LINK + +// define this if you don't want the lib to automatically +// select its link libraries: +// #define BOOST_REGEX_NO_LIB + +// define this if templates with switch statements cause problems: +// #define BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE + +// define this to disable Win32 support when available: +// #define BOOST_REGEX_NO_W32 + +// define this if bool is not a real type: +// #define BOOST_REGEX_NO_BOOL + +// define this if no template instances are to be placed in +// the library rather than users object files: +// #define BOOST_REGEX_NO_EXTERNAL_TEMPLATES + +// define this if the forward declarations in regex_fwd.hpp +// cause more problems than they are worth: +// #define BOOST_REGEX_NO_FWD + +// define this if your compiler supports MS Windows structured +// exception handling. +// #define BOOST_REGEX_HAS_MS_STACK_GUARD + +// define this if you want to use the recursive algorithm +// even if BOOST_REGEX_HAS_MS_STACK_GUARD is not defined. +// #define BOOST_REGEX_RECURSIVE + +// define this if you want to use the non-recursive +// algorithm, even if the recursive version would be the default. +// #define BOOST_REGEX_NON_RECURSIVE + +// define this if you want to set the size of the memory blocks +// used by the non-recursive algorithm. +// #define BOOST_REGEX_BLOCKSIZE 4096 + +// define this if you want to set the maximum number of memory blocks +// used by the non-recursive algorithm. +// #define BOOST_REGEX_MAX_BLOCKS 1024 + +// define this if you want to set the maximum number of memory blocks +// cached by the non-recursive algorithm: Normally this is 16, but can be +// higher if you have multiple threads all using boost.regex, or lower +// if you don't want boost.regex to cache memory. +// #define BOOST_REGEX_MAX_CACHE_BLOCKS 16 + +// define this if you want to be able to access extended capture +// information in your sub_match's (caution this will slow things +// down quite a bit). +// #define BOOST_REGEX_MATCH_EXTRA + +// define this if you want to enable support for Unicode via ICU. +// #define BOOST_HAS_ICU + +// define this if you want regex to use __cdecl calling convensions, even when __fastcall is available: +// #define BOOST_REGEX_NO_FASTCALL |