Compare commits

...

50 Commits

Author SHA1 Message Date
125c04d8fa Release 1.51.0
[SVN r80098]
2012-08-20 22:07:05 +00:00
dc46fc13ab [boost][range] - Merge trac resolutions from the trunk. The most notable change is the alteration of the size type to be unsigned. This is a potentially breaking change.
[SVN r78860]
2012-06-08 22:59:54 +00:00
2f3d82be9f [boost][range] - merge from trunk of miscellaneous defect fixes
[SVN r72427]
2011-06-05 21:47:57 +00:00
47e478d099 Merge to release.
[SVN r72228]
2011-05-27 19:51:13 +00:00
cafea6aea5 [boost][range] - Merge a fix to undo an erroneous change to iterator_range.size() that allowed it to compile for ranges that did not model the Random Access Range Concept and thereby broken the complexity guarantees.
[SVN r68190]
2011-01-16 17:07:27 +00:00
6d46ce412f [range] - merge the tested changes from the trunk in preparation for the 1.46 release.
[SVN r67905]
2011-01-10 06:35:02 +00:00
674be9dfa0 [boost][range] - merge from trunk which fixes a defect in the strided range adaptor, and contains improvements to the documentation
[SVN r67454]
2010-12-26 15:13:43 +00:00
65b22bfa38 Merge filesystem, range, doc from trunk.
* Inline deprecated methods in filesystem.
* Fix some links in range.
* Clean up test document a bit.


[SVN r64315]
2010-07-24 14:26:01 +00:00
fb8994f51c Merge documentation changes.
[SVN r64186]
2010-07-19 23:29:09 +00:00
26c095d022 Boost.Range merge of bug fixes and documentation
[SVN r64120]
2010-07-18 11:36:34 +00:00
ca2328ed87 Merge documentation fixes.
* Use `doc/src/*.css` instead of `doc/html/*.css`.
* Remove wiki and people directories.
* Some documentation fixes.
* Left out `minimal.css` changes and boostbook changes because of clashes.


[SVN r63347]
2010-06-26 12:30:09 +00:00
794fd3e226 Move Boost.Range's join_iterator intrusive_ptr_add_ref and intrusive_ptr_release where ADL will actually find them
[SVN r61867]
2010-05-09 01:32:55 +00:00
88001ada37 Merge standards-conformance fixes for Boost.Range
[SVN r61864]
2010-05-09 01:23:32 +00:00
91d62c2c1a Boost.Range documentation merge from the trunk. Corrects inconsitency with return types, Range Return Categories etc.
[SVN r61685]
2010-04-29 21:18:58 +00:00
f9eeb5d447 Boost.Range correct missing items from merge by merging these changes manually.
This changeset is what should have happened with the prior svn merge operation.

[SVN r61519]
2010-04-23 23:18:59 +00:00
a47f15a98f Boost.Range merge from trunk to release.
This is motivated by the need to correct the istream_range, to correct the adaptors.hpp header file, and correct the return types of various range algorithms.

[SVN r61517]
2010-04-23 22:50:56 +00:00
dfc30e334d Boost.Range merged defect fix for iterator_range.
[SVN r61280]
2010-04-14 21:15:41 +00:00
13b748a228 Boost.Range removed deprecated html documentation.
[SVN r61181]
2010-04-10 15:25:56 +00:00
eea32403ef Boost.Range merge of fixes from the trunk.
[SVN r61146]
2010-04-08 19:34:17 +00:00
29b2053f5c Merged the new Boost.Range into the release branch.
[SVN r61052]
2010-04-04 20:00:13 +00:00
29fa877949 rm cmake from the release branch before it goes out broken. Policy dictates that you never commit to release, you commit to trunk and merge to release.
[SVN r56941]
2009-10-17 01:10:45 +00:00
a39946c55d Add basic copyright/license to keep cmake out of the inspection report
[SVN r55095]
2009-07-22 21:51:01 +00:00
90f4eca5cd Merge in inspect checks for links in CSS files and external content. And fix a few of these issues.
Merged revisions 52663-52664,52666-52668,52712 via svnmerge from 
https://svn.boost.org/svn/boost/trunk

........
  r52663 | danieljames | 2009-04-29 22:12:08 +0100 (Wed, 29 Apr 2009) | 1 line
  
  Check for invalid css links in html files as well as css files.
........
  r52664 | danieljames | 2009-04-29 22:12:32 +0100 (Wed, 29 Apr 2009) | 1 line
  
  Check for external links.
........
  r52666 | danieljames | 2009-04-29 22:19:12 +0100 (Wed, 29 Apr 2009) | 1 line
  
  Use local copies of the boost logo.
........
  r52667 | danieljames | 2009-04-29 22:19:40 +0100 (Wed, 29 Apr 2009) | 1 line
  
  Remove unused copy of boostbook.css
........
  r52668 | danieljames | 2009-04-29 22:19:56 +0100 (Wed, 29 Apr 2009) | 3 lines
  
  Fix a link to a header on trac.
  
  IMO it would be better to link to the local copy.
........
  r52712 | danieljames | 2009-05-01 21:51:10 +0100 (Fri, 01 May 2009) | 1 line
  
  Better inspect error for external content.
........


[SVN r53044]
2009-05-16 13:45:21 +00:00
c8c808b04e fix for bug Ticket #2903
[SVN r52204]
2009-04-05 20:49:47 +00:00
deefb61ec6 Merge PDF build changes from Trunk.
[SVN r51417]
2009-02-23 18:39:32 +00:00
12d904a5e4 merge of cmake build files from trunk per beman
[SVN r50756]
2009-01-24 18:57:20 +00:00
26b096f65d update in response to inspection report
[SVN r47681]
2008-07-22 09:29:56 +00:00
a85afbe470 doc update
[SVN r47495]
2008-07-16 21:05:16 +00:00
e7902d439b more changes from trunk
[SVN r46652]
2008-06-24 15:42:48 +00:00
b4f99d66b5 bug-fixes from trunk
[SVN r46649]
2008-06-24 15:38:50 +00:00
d1c2c5ce3f bug-fixes from trunk
[SVN r46647]
2008-06-24 15:37:59 +00:00
062e820882 cleanup to pass inspection tool
[SVN r43139]
2008-02-07 08:38:07 +00:00
4d381e8564 fixed #if -> #ifdef
[SVN r42716]
2008-01-13 11:38:13 +00:00
fd00cc129f doc fixes
[SVN r42692]
2008-01-12 12:38:46 +00:00
8291ce67fc minor changes from trunk
[SVN r41751]
2007-12-05 17:30:23 +00:00
dbfa1df088 missing include (Ticket #1463)
[SVN r41637]
2007-12-03 09:01:03 +00:00
5afec2b74f merge from truck (boost::size()->boost::distance())
[SVN r41635]
2007-12-03 08:51:22 +00:00
a33d5c22c5 Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41370]
2007-11-25 18:38:02 +00:00
901266b76a Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41369]
2007-11-25 18:07:19 +00:00
25e932149c Starting point for releases
[SVN r39706]
2007-10-05 14:25:06 +00:00
c54e15d374 This commit was manufactured by cvs2svn to create tag
'Version_1_34_1'.

[SVN r38286]
2007-07-24 19:28:14 +00:00
fd448ffa31 removed invalid test
[SVN r37117]
2007-02-28 22:27:50 +00:00
21b558fe5e license info
[SVN r36156]
2006-11-22 22:33:09 +00:00
33c8f3e3ec *** empty log message ***
[SVN r36155]
2006-11-22 22:27:28 +00:00
523f8a5926 Merge from HEAD.
Allow building of shared versions of some Boost.Test libraries.
Adjust tests to use always use static linking to Boost.Test, since
linking to the shared version requires test changes.

Patch from Juergen Hunold.


[SVN r35990]
2006-11-10 19:59:52 +00:00
3bd0d886c4 Remove obsolete Boost.Build v1 files.
[SVN r35880]
2006-11-06 17:10:46 +00:00
e46eae8144 *** empty log message ***
[SVN r35717]
2006-10-24 10:37:46 +00:00
12cf02586c Remove tabs
[SVN r34957]
2006-08-26 14:28:38 +00:00
ee024f588b applied borland patch
[SVN r33670]
2006-04-11 20:12:31 +00:00
8e715b3810 This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'.
[SVN r33417]
2006-03-21 02:26:31 +00:00
159 changed files with 527 additions and 274 deletions

View File

@ -41,7 +41,7 @@ BOOST_FOREACH (CList<CString> *theList, myArray)
* Boost C++ Libraries Version 1.34.0 or later (no compilation required)
* Visual C++ 7.1 or later (for MFC and ATL)
[endsect]
[section:mfc_ranges MFC Ranges]

View File

@ -19,7 +19,7 @@ For maximum portability you should follow these guidelines:
# use __const_begin__`()` and __const_end__`()` whenever your code by intention is read-only; this will also solve most rvalue problems,
# do not rely on ADL:
* if you overload functions, include that header before the headers in this library,
* put all overloads in namespace boost.
* put all overloads in namespace boost.

View File

@ -11,7 +11,7 @@
#include <boost/range/algorithm/copy.hpp>
#include <boost/assign.hpp>
#include <algorithm>
#include <functinoal>
#include <functional>
#include <iostream>
#include <vector>

View File

@ -41,5 +41,5 @@ int main(int argc, const char* argv[])
display_element_and_index( input | indexed(0) );
return 0;
]
}

View File

@ -9,7 +9,7 @@
//
#include <boost/range/adaptor/transformed.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <boost/range/assign.hpp>
#include <boost/assign.hpp>
#include <algorithm>
#include <iostream>
#include <vector>

View File

@ -128,7 +128,7 @@
]
[
[`size(x)`]
[`range_difference<X>::type`]
[`range_size<X>::type`]
[`range_calculate_size(x)` which by default is `boost::end(x) - boost::begin(x)`. Users may supply alternative implementations by implementing `range_calculate_size(x)` so that it will be found via ADL]
[constant time]
]

View File

@ -20,10 +20,10 @@ namespace boost
template< class T >
struct range_reference;
template< class T >
struct range_pointer;
template< class T >
struct range_category;
@ -92,11 +92,11 @@ namespace boost
template< class T >
typename range_reverse_iterator<const T>::type
rend( const T& r );
//
// Random Access Range functions
//
template< class T >
typename range_difference<T>::type
size( const T& r );
@ -106,42 +106,42 @@ namespace boost
//
template< class T >
typename range_iterator<const T>::type
typename range_iterator<const T>::type
const_begin( const T& r );
template< class T >
typename range_iterator<const T>::type
typename range_iterator<const T>::type
const_end( const T& r );
template< class T >
typename range_reverse_iterator<const T>::type
typename range_reverse_iterator<const T>::type
const_rbegin( const T& r );
template< class T >
typename range_reverse_iterator<const T>::type
typename range_reverse_iterator<const T>::type
const_rend( const T& r );
//
// String utilities
//
template< class T >
iterator_range< ... see below ... >
as_literal( T& r );
template< class T >
iterator_range< ... see below ... >
as_literal( const T& r );
template< class T >
iterator_range< typename range_iterator<T>::type >
as_array( T& r );
template< class T >
iterator_range< typename range_iterator<const T>::type >
as_array( const T& r );
} // namespace 'boost'
} // namespace 'boost'
``
[endsect]

View File

@ -40,23 +40,23 @@ namespace boost
public: // construction, assignment
template< class ForwardTraversalIterator2 >
iterator_range( ForwardTraversalIterator2 Begin, ForwardTraversalIterator2 End );
template< class ForwardRange >
iterator_range( ForwardRange& r );
template< class ForwardRange >
iterator_range( const ForwardRange& r );
template< class ForwardRange >
iterator_range& operator=( ForwardRange& r );
template< class ForwardRange >
iterator_range& operator=( const ForwardRange& r );
public: // Forward Range functions
iterator begin() const;
iterator end() const;
public: // convenience
operator unspecified_bool_type() const;
bool equal( const iterator_range& ) const;
@ -65,25 +65,25 @@ namespace boost
iterator_range& advance_begin(difference_type n);
iterator_range& advance_end(difference_type n);
bool empty() const;
// for Random Access Range only:
// for Random Access Range only:
reference operator[]( difference_type at ) const;
value_type operator()( difference_type at ) const;
size_type size() const;
};
// stream output
template< class ForwardTraversalIterator, class T, class Traits >
std::basic_ostream<T,Traits>&
std::basic_ostream<T,Traits>&
operator<<( std::basic_ostream<T,Traits>& Os,
const iterator_range<ForwardTraversalIterator>& r );
// comparison
template< class ForwardTraversalIterator, class ForwardTraversalIterator2 >
bool operator==( const iterator_range<ForwardTraversalIterator>& l,
bool operator==( const iterator_range<ForwardTraversalIterator>& l,
const iterator_range<ForwardTraversalIterator2>& r );
template< class ForwardTraversalIterator, class ForwardRange >
bool operator==( const iterator_range<ForwardTraversalIterator>& l,
bool operator==( const iterator_range<ForwardTraversalIterator>& l,
const ForwardRange& r );
template< class ForwardTraversalIterator, class ForwardRange >
@ -91,11 +91,11 @@ namespace boost
const iterator_range<ForwardTraversalIterator>& r );
template< class ForwardTraversalIterator, class ForwardTraversalIterator2 >
bool operator!=( const iterator_range<ForwardTraversalIterator>& l,
bool operator!=( const iterator_range<ForwardTraversalIterator>& l,
const iterator_range<ForwardTraversalIterator2>& r );
template< class ForwardTraversalIterator, class ForwardRange >
bool operator!=( const iterator_range<ForwardTraversalIterator>& l,
bool operator!=( const iterator_range<ForwardTraversalIterator>& l,
const ForwardRange& r );
template< class ForwardTraversalIterator, class ForwardRange >
@ -103,23 +103,23 @@ namespace boost
const iterator_range<ForwardTraversalIterator>& r );
template< class ForwardTraversalIterator, class ForwardTraversalIterator2 >
bool operator<( const iterator_range<ForwardTraversalIterator>& l,
bool operator<( const iterator_range<ForwardTraversalIterator>& l,
const iterator_range<ForwardTraversalIterator2>& r );
template< class ForwardTraversalIterator, class ForwardRange >
bool operator<( const iterator_range<ForwardTraversalIterator>& l,
bool operator<( const iterator_range<ForwardTraversalIterator>& l,
const ForwardRange& r );
template< class ForwardTraversalIterator, class ForwardRange >
bool operator<( const ForwardRange& l,
const iterator_range<ForwardTraversalIterator>& r );
// external construction
template< class ForwardTraversalIterator >
iterator_range< ForwardTraversalIterator >
make_iterator_range( ForwardTraversalIterator Begin,
make_iterator_range( ForwardTraversalIterator Begin,
ForwardTraversalIterator End );
template< class ForwardRange >
iterator_range< typename range_iterator<ForwardRange>::type >
make_iterator_range( ForwardRange& r );
@ -127,25 +127,25 @@ namespace boost
template< class ForwardRange >
iterator_range< typename range_iterator<const ForwardRange>::type >
make_iterator_range( const ForwardRange& r );
template< class Range >
iterator_range< typename range_iterator<Range>::type >
make_iterator_range( Range& r,
typename range_difference<Range>::type advance_begin,
typename range_difference<Range>::type advance_end );
template< class Range >
iterator_range< typename range_iterator<const Range>::type >
make_iterator_range( const Range& r,
make_iterator_range( const Range& r,
typename range_difference<const Range>::type advance_begin,
typename range_difference<const Range>::type advance_end );
// convenience
template< class Sequence, class ForwardRange >
Sequence copy_range( const ForwardRange& r );
} // namespace 'boost'
``
``
If an instance of `iterator_range` is constructed by a client with two iterators, the client must ensure that the two iterators delimit a valid closed-open range [begin,end).
@ -177,7 +177,7 @@ It is worth noticing that the templated constructors and assignment operators al
``
iterator_range make_iterator_range( Range& r,
typename range_difference<Range>::type advance_begin,
typename range_difference<Range>::type advance_begin,
typename range_difference<Range>::type advance_end );
``
@ -209,46 +209,46 @@ namespace boost
template< class ForwardRange >
class sub_range : public iterator_range< typename range_iterator<ForwardRange>::type >
{
public:
public:
typedef typename range_iterator<ForwardRange>::type iterator;
typedef typename range_iterator<const ForwardRange>::type const_iterator;
typedef typename iterator_difference<iterator>::type difference_type;
public: // construction, assignment
template< class ForwardTraversalIterator >
sub_range( ForwardTraversalIterator Begin, ForwardTraversalIterator End );
template< class ForwardRange2 >
sub_range( ForwardRange2& r );
template< class ForwardRange2 >
sub_range( const Range2& r );
template< class ForwardRange2 >
sub_range& operator=( ForwardRange2& r );
template< class ForwardRange2 >
sub_range& operator=( const ForwardRange2& r );
public: // Forward Range functions
sub_range& operator=( const ForwardRange2& r );
public: // Forward Range functions
iterator begin();
const_iterator begin() const;
iterator end();
const_iterator end() const;
public: // convenience
const_iterator end() const;
public: // convenience
value_type& front();
const value_type& front() const;
value_type& back();
const value_type& back() const;
// for Random Access Range only:
// for Random Access Range only:
value_type& operator[]( size_type at );
const value_type& operator[]( size_type at ) const;
public:
// rest of interface inherited from iterator_range
};
} // namespace 'boost'
``

View File

@ -13,7 +13,7 @@ Since ranges are characterized by a specific underlying iterator type, we get a
* Readable Range
* Writeable Range
* Swappable Range
* Lvalue Range
* Lvalue Range
* [*/Traversal/] category:
* __single_pass_range__
* __forward_range__
@ -25,7 +25,7 @@ Notice how we have used the categories from the __new_style_iterators__.
Notice that an iterator (and therefore an range) has one [*/traversal/] property and one or more properties from the [*/value access/] category. So in reality we will mostly talk about mixtures such as
* Random Access Readable Writeable Range
* Forward Lvalue Range
* Forward Lvalue Range
By convention, we should always specify the [*/traversal/] property first as done above. This seems reasonable since there will only be one [*/traversal/] property, but perhaps many [*/value access/] properties.
@ -37,7 +37,7 @@ As another example, consider how we specify the interface of `std::sort()`. Algo
template< class RandomAccessTraversalReadableWritableIterator >
void sort( RandomAccessTraversalReadableWritableIterator first,
RandomAccessTraversalReadableWritableIterator last );
``
``
For ranges the interface becomes
@ -45,6 +45,6 @@ For ranges the interface becomes
template< class RandomAccessReadableWritableRange >
void sort( RandomAccessReadableWritableRange& r );
``
[endsect]

View File

@ -5,6 +5,12 @@
/]
[section:upgrade Upgrade version of Boost.Range]
[section:upgrade_from_1_49 Upgrade from version 1.49]
# __size__ now returns the type Rng::size_type if the range has size_type;
otherwise range_size<Rng>::type is used. This is the distance type promoted to
an unsigned type.
[section:upgrade_from_1_45 Upgrade from version 1.45]
# __size__ in addition to supporting __random_access_range__ now also supports extensibility via calls to the unqualified `range_calculate_size(rng)` function.

View File

@ -15,7 +15,7 @@
# pragma once
#endif
#if defined(_MSC_VER) && (_MSC_VER == 1300)
#if _MSC_VER == 1300 // experiment
#include <boost/range/detail/collection_traits.hpp>
#include <boost/range/iterator_range.hpp>
@ -28,6 +28,6 @@
#include <boost/range/iterator_range.hpp>
#include <boost/range/sub_range.hpp>
#endif // _MSC_VER == 1300
#endif // _MSC_VER == 1300 // experiment
#endif

View File

@ -143,10 +143,6 @@ namespace boost
skip_iter(boost::end(r), boost::end(r), p))
{
}
private:
P m_pred;
R* m_range;
};
template< class T >

0
include/boost/range/adaptor/argument_fwd.hpp Executable file → Normal file
View File

0
include/boost/range/adaptor/copied.hpp Executable file → Normal file
View File

View File

@ -44,24 +44,6 @@
return range_adaptor <const Range>(rng); \
}
#define BOOST_DEFINE_RANGE_ADAPTOR_1( adaptor_name, range_adaptor, adaptor_class ) \
template<typename Range> range_adaptor <Range> \
operator|(Range& rng, const adaptor_name & args) \
{ \
return range_adaptor <Range>(rng, args.arg1); \
} \
template<typename Range> range_adaptor <const Range> \
operator|(const Range& rng, const adaptor_name & args) \
{ \
return range_adaptor <Range>(rng, args.arg1); \
} \
template<typename Range, typename Arg1> \
range_adaptor<Range> \
make_##adaptor_name(Range& rng, Arg1 arg1) \
{ \
return range_adaptor<Range>(rng, arg1); \
}
#define BOOST_DEFINE_RANGE_ADAPTOR_1( adaptor_name, range_adaptor, arg1_type ) \
struct adaptor_name \
{ \

0
include/boost/range/adaptor/filtered.hpp Executable file → Normal file
View File

0
include/boost/range/adaptor/indexed.hpp Executable file → Normal file
View File

0
include/boost/range/adaptor/map.hpp Executable file → Normal file
View File

0
include/boost/range/adaptor/reversed.hpp Executable file → Normal file
View File

0
include/boost/range/adaptor/sliced.hpp Executable file → Normal file
View File

43
include/boost/range/adaptor/strided.hpp Executable file → Normal file
View File

@ -176,6 +176,7 @@ namespace boost
strided_iterator()
: m_first()
, m_last()
, m_index(0)
, m_stride()
{
}
@ -184,6 +185,7 @@ namespace boost
: super_t(it)
, m_first(first)
, m_last(last)
, m_index(stride ? (it - first) / stride : 0)
, m_stride(stride)
{
}
@ -194,6 +196,7 @@ namespace boost
: super_t(other.base())
, m_first(other.base_begin())
, m_last(other.base_end())
, m_index(other.get_index())
, m_stride(other.get_stride())
{
}
@ -201,44 +204,37 @@ namespace boost
base_iterator base_begin() const { return m_first; }
base_iterator base_end() const { return m_last; }
difference_type get_stride() const { return m_stride; }
difference_type get_index() const { return m_index; }
private:
void increment()
{
base_iterator& it = this->base_reference();
if ((m_last - it) > m_stride)
it += m_stride;
m_index += m_stride;
if (m_index < (m_last - m_first))
this->base_reference() = m_first + m_index;
else
it = m_last;
this->base_reference() = m_last;
}
void decrement()
{
base_iterator& it = this->base_reference();
if ((it - m_first) > m_stride)
it -= m_stride;
m_index -= m_stride;
if (m_index >= 0)
this->base_reference() = m_first + m_index;
else
it = m_first;
this->base_reference() = m_first;
}
void advance(difference_type offset)
{
base_iterator& it = this->base_reference();
offset *= m_stride;
if (offset >= 0)
{
if ((m_last - it) > offset)
it += offset;
else
it = m_last;
}
m_index += offset;
if (m_index < 0)
this->base_reference() = m_first;
else if (m_index > (m_last - m_first))
this->base_reference() = m_last;
else
{
if ((m_first - it) > offset)
it += offset;
else
it = m_first;
}
this->base_reference() = m_first + m_index;
}
template<class OtherIterator>
@ -252,12 +248,13 @@ namespace boost
bool equal(const strided_iterator& other) const
{
return other.base() == this->base();
return this->base() == other.base();
}
private:
base_iterator m_first;
base_iterator m_last;
difference_type m_index;
difference_type m_stride;
};

0
include/boost/range/adaptor/tokenized.hpp Executable file → Normal file
View File

0
include/boost/range/adaptor/transformed.hpp Executable file → Normal file
View File

0
include/boost/range/adaptor/uniqued.hpp Executable file → Normal file
View File

0
include/boost/range/adaptors.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/adjacent_find.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/binary_search.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/copy_backward.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/count.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/count_if.hpp Executable file → Normal file
View File

20
include/boost/range/algorithm/equal.hpp Executable file → Normal file
View File

@ -31,7 +31,7 @@ namespace boost
IteratorCategoryTag1,
IteratorCategoryTag2 )
{
do
while (true)
{
// If we have reached the end of the left range then this is
// the end of the loop. They are equal if and only if we have
@ -46,7 +46,12 @@ namespace boost
return false;
// continue looping if and only if the values are equal
} while(*first1++ == *first2++);
if (*first1 != *first2)
break;
++first1;
++first2;
}
// Reaching this line in the algorithm indicates that a value
// inequality has been detected.
@ -66,7 +71,7 @@ namespace boost
IteratorCategoryTag1,
IteratorCategoryTag2 )
{
do
while (true)
{
// If we have reached the end of the left range then this is
// the end of the loop. They are equal if and only if we have
@ -81,7 +86,12 @@ namespace boost
return false;
// continue looping if and only if the values are equal
} while(pred(*first1++, *first2++));
if (!pred(*first1, *first2))
break;
++first1;
++first2;
}
// Reaching this line in the algorithm indicates that a value
// inequality has been detected.
@ -182,7 +192,7 @@ namespace boost
}
} // namespace range
using range::equal;
using ::boost::range::equal;
} // namespace boost
#endif // include guard

0
include/boost/range/algorithm/equal_range.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/fill.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/fill_n.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/find.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/find_end.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/find_first_of.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/find_if.hpp Executable file → Normal file
View File

1
include/boost/range/algorithm/for_each.hpp Executable file → Normal file
View File

@ -14,7 +14,6 @@
#include <boost/range/end.hpp>
#include <boost/range/concepts.hpp>
#include <boost/ref.hpp>
#include <boost/utility.hpp>
#include <algorithm>
#if BOOST_WORKAROUND(BOOST_MSVC, == 1600)

0
include/boost/range/algorithm/generate.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/heap_algorithm.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/inplace_merge.hpp Executable file → Normal file
View File

View File

0
include/boost/range/algorithm/lower_bound.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/max_element.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/merge.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/min_element.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/mismatch.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/nth_element.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/partial_sort.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/partial_sort_copy.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/partition.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/permutation.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/random_shuffle.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/remove.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/remove_copy.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/remove_copy_if.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/remove_if.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/replace.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/replace_copy.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/replace_copy_if.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/replace_if.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/reverse.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/reverse_copy.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/rotate.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/rotate_copy.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/search.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/search_n.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/set_algorithm.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/sort.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/stable_partition.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/stable_sort.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/swap_ranges.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/transform.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/unique.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/unique_copy.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm/upper_bound.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm_ext.hpp Executable file → Normal file
View File

8
include/boost/range/algorithm_ext/copy_n.hpp Executable file → Normal file
View File

@ -30,15 +30,15 @@ namespace boost
///
/// \pre SinglePassRange is a model of the SinglePassRangeConcept
/// \pre OutputIterator is a model of the OutputIteratorConcept
/// \pre 0 <= n < distance(rng)
/// \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>(::boost::distance(rng)) );
BOOST_ASSERT( n >= static_cast<Size>(0) );
BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange>::type source = boost::begin(rng);
BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange>::type source = ::boost::begin(rng);
for (Size i = 0; i < n; ++i, ++out, ++source)
*out = *source;
@ -47,7 +47,7 @@ inline OutputIterator copy_n(const SinglePassRange& rng, Size n, OutputIterator
}
} // namespace range
using range::copy_n;
using ::boost::range::copy_n;
} // namespace boost
#endif // include guard

0
include/boost/range/algorithm_ext/erase.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm_ext/for_each.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm_ext/insert.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm_ext/is_sorted.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm_ext/overwrite.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm_ext/push_back.hpp Executable file → Normal file
View File

0
include/boost/range/algorithm_ext/push_front.hpp Executable file → Normal file
View File

0
include/boost/range/as_array.hpp Executable file → Normal file
View File

View File

@ -25,7 +25,7 @@
#include <boost/detail/workaround.hpp>
#include <cstring>
#ifndef BOOST_NO_CWCHAR
#ifndef BOOST_NO_CWCHAR
#include <cwchar>
#endif
@ -38,72 +38,72 @@ namespace boost
return strlen( s );
}
#ifndef BOOST_NO_CWCHAR
#ifndef BOOST_NO_CWCHAR
inline std::size_t length( const wchar_t* s )
{
return wcslen( s );
}
#endif
#endif
//
// Remark: the compiler cannot choose between T* and T[sz]
// overloads, so we must put the T* internal to the
// unconstrained version.
//
//
inline bool is_char_ptr( char* )
{
return true;
}
inline bool is_char_ptr( const char* )
{
return true;
}
#ifndef BOOST_NO_CWCHAR
#ifndef BOOST_NO_CWCHAR
inline bool is_char_ptr( wchar_t* )
{
return true;
}
inline bool is_char_ptr( const wchar_t* )
{
return true;
}
#endif
template< class T >
inline long is_char_ptr( T /* r */ )
inline long is_char_ptr( const T& /* r */ )
{
return 0L;
}
template< class T >
inline iterator_range<T*>
inline iterator_range<T*>
make_range( T* const r, bool )
{
return iterator_range<T*>( r, r + length(r) );
}
template< class T >
inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<T>::type>
inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<T>::type>
make_range( T& r, long )
{
return boost::make_iterator_range( r );
}
}
template< class Range >
inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<Range>::type>
inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<Range>::type>
as_literal( Range& r )
{
return range_detail::make_range( r, range_detail::is_char_ptr(r) );
}
template< class Range >
inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type>
inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type>
as_literal( const Range& r )
{
return range_detail::make_range( r, range_detail::is_char_ptr(r) );
@ -112,9 +112,9 @@ namespace boost
template< class Char, std::size_t sz >
inline iterator_range<Char*> as_literal( Char (&arr)[sz] )
{
return range_detail::make_range( arr, range_detail::is_char_ptr(arr) );
return range_detail::make_range( arr, range_detail::is_char_ptr(arr) );
}
template< class Char, std::size_t sz >
inline iterator_range<const Char*> as_literal( const Char (&arr)[sz] )
{

0
include/boost/range/category.hpp Executable file → Normal file
View File

0
include/boost/range/combine.hpp Executable file → Normal file
View File

0
include/boost/range/config.hpp Executable file → Normal file
View File

0
include/boost/range/const_reverse_iterator.hpp Executable file → Normal file
View File

1
include/boost/range/counting_range.hpp Executable file → Normal file
View File

@ -18,7 +18,6 @@
#include <boost/range/iterator_range_core.hpp>
#include <boost/range/value_type.hpp>
#include <boost/iterator/counting_iterator.hpp>
#include <boost/utility.hpp>
namespace boost
{

View File

@ -11,7 +11,6 @@
#define BOOST_RANGE_DETAIL_ANY_ITERATOR_HPP_INCLUDED
#include <boost/cast.hpp>
#include <boost/utility.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/not.hpp>

View File

@ -13,7 +13,7 @@
#include <boost/array.hpp>
#include <boost/assert.hpp>
#include <boost/static_assert.hpp>
#include <boost/utility.hpp>
#include <boost/noncopyable.hpp>
namespace boost
{

0
include/boost/range/detail/collection_traits.hpp Executable file → Normal file
View File

View File

0
include/boost/range/detail/common.hpp Executable file → Normal file
View File

0
include/boost/range/detail/const_iterator.hpp Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More