diff --git a/include/boost/algorithm/gather.hpp b/include/boost/algorithm/gather.hpp index 7a0fdf2..e777f8b 100644 --- a/include/boost/algorithm/gather.hpp +++ b/include/boost/algorithm/gather.hpp @@ -22,9 +22,10 @@ #include // for std::stable_partition #include +#include // for std::make_pair #include -#include // for boost::bind +#include // for boost::bind #include // for boost::begin(range) #include // for boost::end(range) @@ -81,13 +82,14 @@ namespace boost { namespace algorithm { */ template < - typename BidirectionalIterator, // Iter models BidirectionalIterator - typename Pred> // Pred models UnaryPredicate + typename BidirectionalIterator, // models BidirectionalIterator + typename Pred> // models UnaryPredicate std::pair gather ( BidirectionalIterator first, BidirectionalIterator last, BidirectionalIterator pivot, Pred pred ) { // The first call partitions everything up to (but not including) the pivot element, // while the second call partitions the rest of the sequence. + using namespace boost::placeholders; return std::make_pair ( std::stable_partition ( first, pivot, !boost::bind ( pred, _1 )), std::stable_partition ( pivot, last, boost::bind ( pred, _1 ))); diff --git a/include/boost/algorithm/string/compare.hpp b/include/boost/algorithm/string/compare.hpp index 734303a..dc34007 100644 --- a/include/boost/algorithm/string/compare.hpp +++ b/include/boost/algorithm/string/compare.hpp @@ -65,7 +65,7 @@ namespace boost { template< typename T1, typename T2 > 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); #else return std::toupper(Arg1,m_Loc)==std::toupper(Arg2,m_Loc); @@ -118,7 +118,7 @@ namespace boost { template< typename T1, typename T2 > 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)(Arg1,m_Loc)(Arg2,m_Loc); @@ -171,7 +171,7 @@ namespace boost { template< typename T1, typename T2 > 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); #else return std::toupper(Arg1,m_Loc)<=std::toupper(Arg2,m_Loc); diff --git a/include/boost/algorithm/string/detail/case_conv.hpp b/include/boost/algorithm/string/detail/case_conv.hpp index 233912c..3ba317f 100644 --- a/include/boost/algorithm/string/detail/case_conv.hpp +++ b/include/boost/algorithm/string/detail/case_conv.hpp @@ -40,7 +40,7 @@ namespace boost { // Operation 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::type> ( Ch )); #else return std::tolower( Ch, *m_Loc ); @@ -62,7 +62,7 @@ namespace boost { // Operation 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::type> ( Ch )); #else return std::toupper( Ch, *m_Loc ); diff --git a/include/boost/algorithm/string/detail/classification.hpp b/include/boost/algorithm/string/detail/classification.hpp index 704d9d2..febf8b7 100644 --- a/include/boost/algorithm/string/detail/classification.hpp +++ b/include/boost/algorithm/string/detail/classification.hpp @@ -45,7 +45,7 @@ namespace boost { return std::use_facet< std::ctype >(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<> bool operator()( char const Ch ) const { diff --git a/include/boost/algorithm/string/detail/finder.hpp b/include/boost/algorithm/string/detail/finder.hpp index a2a9582..8e70240 100644 --- a/include/boost/algorithm/string/detail/finder.hpp +++ b/include/boost/algorithm/string/detail/finder.hpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include @@ -127,8 +127,8 @@ namespace boost { if( boost::empty(m_Search) ) return result_type( End, End ); - typedef BOOST_STRING_TYPENAME boost::detail:: - iterator_traits::iterator_category category; + typedef BOOST_STRING_TYPENAME + std::iterator_traits::iterator_category category; return findit( Begin, End, category() ); } @@ -344,9 +344,8 @@ namespace boost { typedef iterator_range result_type; input_iterator_type It=Begin; - for( - unsigned int Index=0; - Index::iterator_category category; + typedef BOOST_STRING_TYPENAME + std::iterator_traits::iterator_category category; return ::boost::algorithm::detail::find_head_impl( Begin, End, N, category() ); } @@ -397,10 +396,12 @@ namespace boost { input_iterator_type It2=Begin; // Advance It2 by N increments - for( Index=0; Index result_type; input_iterator_type It=End; - for( - unsigned int Index=0; - Index::iterator_category category; + typedef BOOST_STRING_TYPENAME + std::iterator_traits::iterator_category category; return ::boost::algorithm::detail::find_tail_impl( Begin, End, N, category() ); } diff --git a/include/boost/algorithm/string/detail/formatter.hpp b/include/boost/algorithm/string/detail/formatter.hpp index c071822..f4c6728 100644 --- a/include/boost/algorithm/string/detail/formatter.hpp +++ b/include/boost/algorithm/string/detail/formatter.hpp @@ -42,7 +42,7 @@ namespace boost { m_Format(::boost::begin(Format), ::boost::end(Format)) {} // Operation -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) template result_type& operator()(const Range2T&) { diff --git a/include/boost/algorithm/string/detail/trim.hpp b/include/boost/algorithm/string/detail/trim.hpp index 1233e49..3bb4ef2 100644 --- a/include/boost/algorithm/string/detail/trim.hpp +++ b/include/boost/algorithm/string/detail/trim.hpp @@ -12,7 +12,7 @@ #define BOOST_STRING_TRIM_DETAIL_HPP #include -#include +#include namespace boost { namespace algorithm { @@ -80,8 +80,8 @@ namespace boost { ForwardIteratorT InEnd, PredicateT IsSpace ) { - typedef BOOST_STRING_TYPENAME boost::detail:: - iterator_traits::iterator_category category; + typedef BOOST_STRING_TYPENAME + std::iterator_traits::iterator_category category; return ::boost::algorithm::detail::trim_end_iter_select( InBegin, InEnd, IsSpace, category() ); } diff --git a/include/boost/algorithm/string/find_format.hpp b/include/boost/algorithm/string/find_format.hpp index 0e84a4e..4d9315c 100644 --- a/include/boost/algorithm/string/find_format.hpp +++ b/include/boost/algorithm/string/find_format.hpp @@ -12,7 +12,6 @@ #define BOOST_STRING_FIND_FORMAT_HPP #include -#include #include #include #include @@ -40,7 +39,7 @@ namespace boost { this substring and replace it in the input. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. - + \param Output An output iterator to which the result will be copied \param Input An input sequence \param Finder A Finder object used to search for a match to be replaced diff --git a/include/boost/algorithm/string/formatter.hpp b/include/boost/algorithm/string/formatter.hpp index de8681b..0e08ae7 100644 --- a/include/boost/algorithm/string/formatter.hpp +++ b/include/boost/algorithm/string/formatter.hpp @@ -11,7 +11,6 @@ #ifndef BOOST_STRING_FORMATTER_HPP #define BOOST_STRING_FORMATTER_HPP -#include #include #include #include diff --git a/include/boost/algorithm/string/predicate.hpp b/include/boost/algorithm/string/predicate.hpp index 0879829..d7c86e8 100644 --- a/include/boost/algorithm/string/predicate.hpp +++ b/include/boost/algorithm/string/predicate.hpp @@ -11,6 +11,7 @@ #ifndef BOOST_STRING_PREDICATE_HPP #define BOOST_STRING_PREDICATE_HPP +#include #include #include #include @@ -144,10 +145,10 @@ namespace boost { iterator_range::type> lit_input(::boost::as_literal(Input)); iterator_range::type> lit_test(::boost::as_literal(Test)); - typedef BOOST_STRING_TYPENAME + typedef BOOST_STRING_TYPENAME range_const_iterator::type Iterator1T; - typedef BOOST_STRING_TYPENAME boost::detail:: - iterator_traits::iterator_category category; + typedef BOOST_STRING_TYPENAME + std::iterator_traits::iterator_category category; return detail:: ends_with_iter_select( diff --git a/string/example/predicate_example.cpp b/string/example/predicate_example.cpp index 473ab8b..26d24e4 100644 --- a/string/example/predicate_example.cpp +++ b/string/example/predicate_example.cpp @@ -12,8 +12,6 @@ #include #include #include -#include - using namespace std; using namespace boost; diff --git a/string/example/rle_example.cpp b/string/example/rle_example.cpp index 9e52b96..ff47ccc 100644 --- a/string/example/rle_example.cpp +++ b/string/example/rle_example.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include @@ -46,7 +46,7 @@ struct find_compressF ForwardIteratorT End ) const { typedef ForwardIteratorT input_iterator_type; - typedef typename boost::detail::iterator_traits::value_type value_type; + typedef typename std::iterator_traits::value_type value_type; typedef iterator_range result_type; // begin of the matching segment @@ -144,7 +144,7 @@ struct find_decompressF ForwardIteratorT End ) const { typedef ForwardIteratorT input_iterator_type; - typedef typename boost::detail::iterator_traits::value_type value_type; + typedef typename std::iterator_traits::value_type value_type; typedef iterator_range result_type; for(input_iterator_type It=Begin; It!=End; It++) @@ -153,12 +153,12 @@ struct find_decompressF { // Repeat mark found, extract body input_iterator_type It2=It++; - + if ( It==End ) break; It++; if ( It==End ) break; It++; - + return result_type( It2, It ); } }