Merge changes from develop for the 1.74.0 release

This commit is contained in:
Marshall Clow
2020-06-24 09:47:23 -07:00
12 changed files with 40 additions and 41 deletions

View File

@ -22,9 +22,10 @@
#include <algorithm> // for std::stable_partition #include <algorithm> // for std::stable_partition
#include <functional> #include <functional>
#include <utility> // for std::make_pair
#include <boost/config.hpp> #include <boost/config.hpp>
#include <boost/bind.hpp> // for boost::bind #include <boost/bind/bind.hpp> // for boost::bind
#include <boost/range/begin.hpp> // for boost::begin(range) #include <boost/range/begin.hpp> // for boost::begin(range)
#include <boost/range/end.hpp> // for boost::end(range) #include <boost/range/end.hpp> // for boost::end(range)
@ -81,13 +82,14 @@ namespace boost { namespace algorithm {
*/ */
template < template <
typename BidirectionalIterator, // Iter models BidirectionalIterator typename BidirectionalIterator, // models BidirectionalIterator
typename Pred> // Pred models UnaryPredicate typename Pred> // models UnaryPredicate
std::pair<BidirectionalIterator, BidirectionalIterator> gather std::pair<BidirectionalIterator, BidirectionalIterator> gather
( BidirectionalIterator first, BidirectionalIterator last, BidirectionalIterator pivot, Pred pred ) ( BidirectionalIterator first, BidirectionalIterator last, BidirectionalIterator pivot, Pred pred )
{ {
// The first call partitions everything up to (but not including) the pivot element, // The first call partitions everything up to (but not including) the pivot element,
// while the second call partitions the rest of the sequence. // while the second call partitions the rest of the sequence.
using namespace boost::placeholders;
return std::make_pair ( return std::make_pair (
std::stable_partition ( first, pivot, !boost::bind<bool> ( pred, _1 )), std::stable_partition ( first, pivot, !boost::bind<bool> ( pred, _1 )),
std::stable_partition ( pivot, last, boost::bind<bool> ( pred, _1 ))); std::stable_partition ( pivot, last, boost::bind<bool> ( pred, _1 )));

View File

@ -65,7 +65,7 @@ namespace boost {
template< typename T1, typename T2 > template< typename T1, typename T2 >
bool operator()( const T1& Arg1, const T2& Arg2 ) const bool operator()( const T1& Arg1, const T2& Arg2 ) const
{ {
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) #if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x564) && !defined(_USE_OLD_RW_STL)
return std::toupper(Arg1)==std::toupper(Arg2); return std::toupper(Arg1)==std::toupper(Arg2);
#else #else
return std::toupper<T1>(Arg1,m_Loc)==std::toupper<T2>(Arg2,m_Loc); return std::toupper<T1>(Arg1,m_Loc)==std::toupper<T2>(Arg2,m_Loc);
@ -118,7 +118,7 @@ namespace boost {
template< typename T1, typename T2 > template< typename T1, typename T2 >
bool operator()( const T1& Arg1, const T2& Arg2 ) const bool operator()( const T1& Arg1, const T2& Arg2 ) const
{ {
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) #if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x564) && !defined(_USE_OLD_RW_STL)
return std::toupper(Arg1)<std::toupper(Arg2); return std::toupper(Arg1)<std::toupper(Arg2);
#else #else
return std::toupper<T1>(Arg1,m_Loc)<std::toupper<T2>(Arg2,m_Loc); return std::toupper<T1>(Arg1,m_Loc)<std::toupper<T2>(Arg2,m_Loc);
@ -171,7 +171,7 @@ namespace boost {
template< typename T1, typename T2 > template< typename T1, typename T2 >
bool operator()( const T1& Arg1, const T2& Arg2 ) const bool operator()( const T1& Arg1, const T2& Arg2 ) const
{ {
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) #if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x564) && !defined(_USE_OLD_RW_STL)
return std::toupper(Arg1)<=std::toupper(Arg2); return std::toupper(Arg1)<=std::toupper(Arg2);
#else #else
return std::toupper<T1>(Arg1,m_Loc)<=std::toupper<T2>(Arg2,m_Loc); return std::toupper<T1>(Arg1,m_Loc)<=std::toupper<T2>(Arg2,m_Loc);

View File

@ -40,7 +40,7 @@ namespace boost {
// Operation // Operation
CharT operator ()( CharT Ch ) const CharT operator ()( CharT Ch ) const
{ {
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) #if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x564) && !defined(_USE_OLD_RW_STL)
return std::tolower( static_cast<typename boost::make_unsigned <CharT>::type> ( Ch )); return std::tolower( static_cast<typename boost::make_unsigned <CharT>::type> ( Ch ));
#else #else
return std::tolower<CharT>( Ch, *m_Loc ); return std::tolower<CharT>( Ch, *m_Loc );
@ -62,7 +62,7 @@ namespace boost {
// Operation // Operation
CharT operator ()( CharT Ch ) const CharT operator ()( CharT Ch ) const
{ {
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) #if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x564) && !defined(_USE_OLD_RW_STL)
return std::toupper( static_cast<typename boost::make_unsigned <CharT>::type> ( Ch )); return std::toupper( static_cast<typename boost::make_unsigned <CharT>::type> ( Ch ));
#else #else
return std::toupper<CharT>( Ch, *m_Loc ); return std::toupper<CharT>( Ch, *m_Loc );

View File

@ -45,7 +45,7 @@ namespace boost {
return std::use_facet< std::ctype<CharT> >(m_Locale).is( m_Type, Ch ); return std::use_facet< std::ctype<CharT> >(m_Locale).is( m_Type, Ch );
} }
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x582) && !defined(_USE_OLD_RW_STL) #if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x582) && !defined(_USE_OLD_RW_STL)
template<> template<>
bool operator()( char const Ch ) const bool operator()( char const Ch ) const
{ {

View File

@ -13,7 +13,7 @@
#include <boost/algorithm/string/config.hpp> #include <boost/algorithm/string/config.hpp>
#include <boost/algorithm/string/constants.hpp> #include <boost/algorithm/string/constants.hpp>
#include <boost/detail/iterator.hpp> #include <iterator>
#include <boost/range/iterator_range_core.hpp> #include <boost/range/iterator_range_core.hpp>
#include <boost/range/begin.hpp> #include <boost/range/begin.hpp>
@ -127,8 +127,8 @@ namespace boost {
if( boost::empty(m_Search) ) if( boost::empty(m_Search) )
return result_type( End, End ); return result_type( End, End );
typedef BOOST_STRING_TYPENAME boost::detail:: typedef BOOST_STRING_TYPENAME
iterator_traits<ForwardIteratorT>::iterator_category category; std::iterator_traits<ForwardIteratorT>::iterator_category category;
return findit( Begin, End, category() ); return findit( Begin, End, category() );
} }
@ -344,9 +344,8 @@ namespace boost {
typedef iterator_range<ForwardIteratorT> result_type; typedef iterator_range<ForwardIteratorT> result_type;
input_iterator_type It=Begin; input_iterator_type It=Begin;
for( for( unsigned int Index=0; Index<N && It!=End; ++Index,++It )
unsigned int Index=0; ;
Index<N && It!=End; ++Index,++It ) {};
return result_type( Begin, It ); return result_type( Begin, It );
} }
@ -375,8 +374,8 @@ namespace boost {
ForwardIteratorT End, ForwardIteratorT End,
unsigned int N ) unsigned int N )
{ {
typedef BOOST_STRING_TYPENAME boost::detail:: typedef BOOST_STRING_TYPENAME
iterator_traits<ForwardIteratorT>::iterator_category category; std::iterator_traits<ForwardIteratorT>::iterator_category category;
return ::boost::algorithm::detail::find_head_impl( Begin, End, N, category() ); return ::boost::algorithm::detail::find_head_impl( Begin, End, N, category() );
} }
@ -397,10 +396,12 @@ namespace boost {
input_iterator_type It2=Begin; input_iterator_type It2=Begin;
// Advance It2 by N increments // Advance It2 by N increments
for( Index=0; Index<N && It2!=End; ++Index,++It2 ) {}; for( Index=0; Index<N && It2!=End; ++Index,++It2 )
;
// Advance It, It2 to the end // Advance It, It2 to the end
for(; It2!=End; ++It,++It2 ) {}; for(; It2!=End; ++It,++It2 )
;
return result_type( It, It2 ); return result_type( It, It2 );
} }
@ -417,9 +418,8 @@ namespace boost {
typedef iterator_range<ForwardIteratorT> result_type; typedef iterator_range<ForwardIteratorT> result_type;
input_iterator_type It=End; input_iterator_type It=End;
for( for( unsigned int Index=0; Index<N && It!=Begin; ++Index,--It )
unsigned int Index=0; ;
Index<N && It!=Begin; ++Index,--It ) {};
return result_type( It, End ); return result_type( It, End );
} }
@ -448,8 +448,8 @@ namespace boost {
ForwardIteratorT End, ForwardIteratorT End,
unsigned int N ) unsigned int N )
{ {
typedef BOOST_STRING_TYPENAME boost::detail:: typedef BOOST_STRING_TYPENAME
iterator_traits<ForwardIteratorT>::iterator_category category; std::iterator_traits<ForwardIteratorT>::iterator_category category;
return ::boost::algorithm::detail::find_tail_impl( Begin, End, N, category() ); return ::boost::algorithm::detail::find_tail_impl( Begin, End, N, category() );
} }

View File

@ -42,7 +42,7 @@ namespace boost {
m_Format(::boost::begin(Format), ::boost::end(Format)) {} m_Format(::boost::begin(Format), ::boost::end(Format)) {}
// Operation // Operation
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) #if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
template<typename Range2T> template<typename Range2T>
result_type& operator()(const Range2T&) result_type& operator()(const Range2T&)
{ {

View File

@ -12,7 +12,7 @@
#define BOOST_STRING_TRIM_DETAIL_HPP #define BOOST_STRING_TRIM_DETAIL_HPP
#include <boost/algorithm/string/config.hpp> #include <boost/algorithm/string/config.hpp>
#include <boost/detail/iterator.hpp> #include <iterator>
namespace boost { namespace boost {
namespace algorithm { namespace algorithm {
@ -80,8 +80,8 @@ namespace boost {
ForwardIteratorT InEnd, ForwardIteratorT InEnd,
PredicateT IsSpace ) PredicateT IsSpace )
{ {
typedef BOOST_STRING_TYPENAME boost::detail:: typedef BOOST_STRING_TYPENAME
iterator_traits<ForwardIteratorT>::iterator_category category; std::iterator_traits<ForwardIteratorT>::iterator_category category;
return ::boost::algorithm::detail::trim_end_iter_select( InBegin, InEnd, IsSpace, category() ); return ::boost::algorithm::detail::trim_end_iter_select( InBegin, InEnd, IsSpace, category() );
} }

View File

@ -12,7 +12,6 @@
#define BOOST_STRING_FIND_FORMAT_HPP #define BOOST_STRING_FIND_FORMAT_HPP
#include <deque> #include <deque>
#include <boost/detail/iterator.hpp>
#include <boost/range/iterator_range_core.hpp> #include <boost/range/iterator_range_core.hpp>
#include <boost/range/begin.hpp> #include <boost/range/begin.hpp>
#include <boost/range/end.hpp> #include <boost/range/end.hpp>
@ -40,7 +39,7 @@ namespace boost {
this substring and replace it in the input. this substring and replace it in the input.
The result is a modified copy of the input. It is returned as a sequence The result is a modified copy of the input. It is returned as a sequence
or copied to the output iterator. or copied to the output iterator.
\param Output An output iterator to which the result will be copied \param Output An output iterator to which the result will be copied
\param Input An input sequence \param Input An input sequence
\param Finder A Finder object used to search for a match to be replaced \param Finder A Finder object used to search for a match to be replaced

View File

@ -11,7 +11,6 @@
#ifndef BOOST_STRING_FORMATTER_HPP #ifndef BOOST_STRING_FORMATTER_HPP
#define BOOST_STRING_FORMATTER_HPP #define BOOST_STRING_FORMATTER_HPP
#include <boost/detail/iterator.hpp>
#include <boost/range/value_type.hpp> #include <boost/range/value_type.hpp>
#include <boost/range/iterator_range_core.hpp> #include <boost/range/iterator_range_core.hpp>
#include <boost/range/as_literal.hpp> #include <boost/range/as_literal.hpp>

View File

@ -11,6 +11,7 @@
#ifndef BOOST_STRING_PREDICATE_HPP #ifndef BOOST_STRING_PREDICATE_HPP
#define BOOST_STRING_PREDICATE_HPP #define BOOST_STRING_PREDICATE_HPP
#include <iterator>
#include <boost/algorithm/string/config.hpp> #include <boost/algorithm/string/config.hpp>
#include <boost/range/begin.hpp> #include <boost/range/begin.hpp>
#include <boost/range/end.hpp> #include <boost/range/end.hpp>
@ -144,10 +145,10 @@ namespace boost {
iterator_range<BOOST_STRING_TYPENAME range_const_iterator<Range1T>::type> lit_input(::boost::as_literal(Input)); iterator_range<BOOST_STRING_TYPENAME range_const_iterator<Range1T>::type> lit_input(::boost::as_literal(Input));
iterator_range<BOOST_STRING_TYPENAME range_const_iterator<Range2T>::type> lit_test(::boost::as_literal(Test)); iterator_range<BOOST_STRING_TYPENAME range_const_iterator<Range2T>::type> lit_test(::boost::as_literal(Test));
typedef BOOST_STRING_TYPENAME typedef BOOST_STRING_TYPENAME
range_const_iterator<Range1T>::type Iterator1T; range_const_iterator<Range1T>::type Iterator1T;
typedef BOOST_STRING_TYPENAME boost::detail:: typedef BOOST_STRING_TYPENAME
iterator_traits<Iterator1T>::iterator_category category; std::iterator_traits<Iterator1T>::iterator_category category;
return detail:: return detail::
ends_with_iter_select( ends_with_iter_select(

View File

@ -12,8 +12,6 @@
#include <functional> #include <functional>
#include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/classification.hpp> #include <boost/algorithm/string/classification.hpp>
#include <boost/bind.hpp>
using namespace std; using namespace std;
using namespace boost; using namespace boost;

View File

@ -16,7 +16,7 @@
#include <string> #include <string>
#include <iostream> #include <iostream>
#include <limits> #include <limits>
#include <boost/detail/iterator.hpp> #include <iterator>
#include <boost/algorithm/string/find_format.hpp> #include <boost/algorithm/string/find_format.hpp>
#include <boost/algorithm/string/finder.hpp> #include <boost/algorithm/string/finder.hpp>
@ -46,7 +46,7 @@ struct find_compressF
ForwardIteratorT End ) const ForwardIteratorT End ) const
{ {
typedef ForwardIteratorT input_iterator_type; typedef ForwardIteratorT input_iterator_type;
typedef typename boost::detail::iterator_traits<input_iterator_type>::value_type value_type; typedef typename std::iterator_traits<input_iterator_type>::value_type value_type;
typedef iterator_range<input_iterator_type> result_type; typedef iterator_range<input_iterator_type> result_type;
// begin of the matching segment // begin of the matching segment
@ -144,7 +144,7 @@ struct find_decompressF
ForwardIteratorT End ) const ForwardIteratorT End ) const
{ {
typedef ForwardIteratorT input_iterator_type; typedef ForwardIteratorT input_iterator_type;
typedef typename boost::detail::iterator_traits<input_iterator_type>::value_type value_type; typedef typename std::iterator_traits<input_iterator_type>::value_type value_type;
typedef iterator_range<input_iterator_type> result_type; typedef iterator_range<input_iterator_type> result_type;
for(input_iterator_type It=Begin; It!=End; It++) for(input_iterator_type It=Begin; It!=End; It++)
@ -153,12 +153,12 @@ struct find_decompressF
{ {
// Repeat mark found, extract body // Repeat mark found, extract body
input_iterator_type It2=It++; input_iterator_type It2=It++;
if ( It==End ) break; if ( It==End ) break;
It++; It++;
if ( It==End ) break; if ( It==End ) break;
It++; It++;
return result_type( It2, It ); return result_type( It2, It );
} }
} }