Compare commits

..

47 Commits

Author SHA1 Message Date
49a281072b Release 1.46.0
[SVN r69125]
2011-02-21 18:42:22 +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
115 changed files with 216 additions and 790 deletions

View File

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

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,6 +143,10 @@ 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 Normal file → Executable file
View File

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

View File

@ -44,6 +44,24 @@
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 Normal file → Executable file
View File

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

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

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

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

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

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

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

@ -42,8 +42,8 @@ namespace boost
typedef R source_range_type;
transformed_range( F f, R& r )
: base( boost::make_transform_iterator( boost::begin(r), f ),
boost::make_transform_iterator( boost::end(r), f ) )
: base( make_transform_iterator( boost::begin(r), f ),
make_transform_iterator( boost::end(r), f ) )
{ }
};

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -13,53 +13,13 @@
#include <boost/range/begin.hpp>
#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)
#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 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
@ -70,18 +30,7 @@ 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
return std::for_each(boost::begin(rng),boost::end(rng),fun);
}
/// \overload
@ -89,18 +38,7 @@ 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
return std::for_each(boost::begin(rng), boost::end(rng), fun);
}
} // namespace range

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

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

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

View File

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -1,4 +1,3 @@
// 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
@ -15,26 +14,45 @@
#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_detail
{
template<class ForwardIterator>
inline bool is_sorted(ForwardIterator first, ForwardIterator last)
{
for (ForwardIterator next = first; first != last && ++next != last; ++first)
if (*next < *first)
return false;
return true;
}
template<class ForwardIterator, class BinaryPredicate>
inline bool is_sorted(ForwardIterator first, ForwardIterator last, BinaryPredicate pred)
{
for (ForwardIterator next = first; first != last && ++next != last; ++first)
if (pred(*next, *first))
return false;
return true;
}
}
namespace range
{
/// \brief template function is_sorted
/// \brief template function count
///
/// range-based version of the is_sorted std algorithm
/// range-based version of the count 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));
BOOST_RANGE_CONCEPT_ASSERT((LessThanComparableConcept<BOOST_DEDUCED_TYPENAME range_value<const SinglePassRange>::type>));
return range_detail::is_sorted(boost::begin(rng), boost::end(rng));
}
/// \overload
@ -42,16 +60,12 @@ 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);
BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate, BOOST_DEDUCED_TYPENAME range_value<const SinglePassRange>::type, BOOST_DEDUCED_TYPENAME range_value<const SinglePassRange>::type>));
return range_detail::is_sorted(boost::begin(rng), boost::end(rng), pred);
}
} // namespace range
using range::is_sorted;
using range::is_sorted;
} // namespace boost
#endif // include guard

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

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

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

View File

@ -15,7 +15,6 @@
#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>

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,41 +38,41 @@ 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 */ )
{
@ -80,30 +80,30 @@ namespace boost
}
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/combine.hpp Normal file → Executable file
View File

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

View File

@ -5,9 +5,6 @@
// 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/
//
@ -22,12 +19,12 @@ namespace boost
{
template<class IteratorTraversalTag1, class IteratorTraversalTag2>
struct inner_demote_iterator_traversal_tag
struct demote_iterator_traversal_tag
{
};
#define BOOST_DEMOTE_TRAVERSAL_TAG( Tag1, Tag2, ResultTag ) \
template<> struct inner_demote_iterator_traversal_tag< Tag1 , Tag2 > \
template<> struct demote_iterator_traversal_tag< Tag1 , Tag2 > \
{ \
typedef ResultTag type; \
};
@ -76,15 +73,6 @@ BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, random_access_traversal
#undef BOOST_DEMOTE_TRAVERSAL_TAG
template<class IteratorTraversalTag1, class IteratorTraversalTag2>
struct demote_iterator_traversal_tag
: inner_demote_iterator_traversal_tag<
typename boost::detail::pure_traversal_tag< IteratorTraversalTag1 >::type,
typename boost::detail::pure_traversal_tag< IteratorTraversalTag2 >::type
>
{
};
} // namespace range_detail
} // namespace boost

View File

@ -134,8 +134,8 @@ namespace boost
#include <boost/range/detail/begin.hpp>
#include <boost/range/detail/end.hpp>
#include <boost/range/detail/size_type.hpp>
#include <boost/range/detail/value_type.hpp>
#include <boost/range/detail/size_type>
#include <boost/range/detail/value_type>
#include <boost/range/detail/common.hpp>
namespace boost

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

View File

@ -21,13 +21,13 @@
#include <wchar.h>
#endif
namespace boost
namespace boost
{
namespace range_detail
{
template <typename T>
inline void boost_range_silence_warning( const T& ) { }
/////////////////////////////////////////////////////////////////////
// end() help
/////////////////////////////////////////////////////////////////////
@ -36,7 +36,7 @@ namespace boost
{
return s + strlen( s );
}
#ifndef BOOST_NO_CWCHAR
inline const wchar_t* str_end( const wchar_t* s, const wchar_t* )
{
@ -51,7 +51,7 @@ namespace boost
;
return s;
}
#endif
#endif
template< class Char >
inline Char* str_end( Char* s )
@ -64,7 +64,7 @@ namespace boost
{
return boost_range_array + sz;
}
template< class T, std::size_t sz >
inline const T* array_end( const T BOOST_RANGE_ARRAY_REF()[sz] )
{
@ -74,7 +74,7 @@ namespace boost
/////////////////////////////////////////////////////////////////////
// size() help
/////////////////////////////////////////////////////////////////////
template< class Char >
inline std::size_t str_size( const Char* const& s )
{
@ -96,7 +96,7 @@ namespace boost
}
} // namespace 'range_detail'
} // namespace 'boost'

View File

@ -5,9 +5,6 @@
// 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.
//
// For more information, see http://www.boost.org/libs/range/
//
@ -123,32 +120,7 @@ private:
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<Iterator2>::type
>::type,
typename iterator_reference<Iterator1>::type
>::type
>::type
, typename Reference = typename iterator_reference<Iterator1>::type
, typename Traversal = typename demote_iterator_traversal_tag<
typename iterator_traversal<Iterator1>::type
, typename iterator_traversal<Iterator2>::type>::type

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

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

View File

@ -19,7 +19,7 @@ namespace boost
{
namespace range_detail
{
BOOST_MPL_HAS_XXX_TRAIT_DEF(type)
BOOST_MPL_HAS_XXX_TRAIT_DEF(type);
template<class T, class Enabler = void>
struct has_range_iterator_impl

View File

@ -124,11 +124,13 @@ namespace boost
typedef typename base_t::difference_type difference_type;
typedef typename base_t::reference reference;
integer_iterator_with_step(value_type first, difference_type step, value_type step_size)
integer_iterator_with_step(value_type first, value_type step, difference_type step_size)
: m_first(first)
, m_step(step)
, m_step_size(step_size)
{
BOOST_ASSERT( step >= 0 );
BOOST_ASSERT( step_size != 0 );
}
private:
@ -211,18 +213,16 @@ namespace boost
{
BOOST_ASSERT( step_size != 0 );
BOOST_ASSERT( (step_size > 0) ? (last >= first) : (last <= first) );
typedef typename range_detail::integer_iterator_with_step<Integer> iterator_t;
const std::ptrdiff_t sz = static_cast<std::ptrdiff_t>(step_size >= 0 ? step_size : -step_size);
const Integer l = step_size >= 0 ? last : first;
const Integer f = step_size >= 0 ? first : last;
const std::ptrdiff_t num_steps = (l + ((l-f) % sz) - f) / sz;
BOOST_ASSERT(num_steps >= 0);
const std::ptrdiff_t last_step
= (static_cast<std::ptrdiff_t>(last) - static_cast<std::ptrdiff_t>(first))
/ (static_cast<std::ptrdiff_t>(step_size));
return strided_integer_range<Integer>(
iterator_t(first, 0, step_size),
iterator_t(first, num_steps, step_size));
iterator_t(first, last_step, step_size));
}
} // namespace boost

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

View File

@ -25,46 +25,46 @@
namespace boost
{
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
namespace range_detail_vc7_1
{
template< typename C, typename Sig = void(C) >
struct range_iterator
{
typedef BOOST_RANGE_DEDUCED_TYPENAME
mpl::eval_if_c< is_const<C>::value,
range_const_iterator< typename remove_const<C>::type >,
range_mutable_iterator<C> >::type type;
};
template< typename C, typename T >
struct range_iterator< C, void(T[]) >
{
typedef T* type;
};
}
#endif
namespace range_detail_vc7_1
{
template< typename C, typename Sig = void(C) >
struct range_iterator
{
typedef BOOST_RANGE_DEDUCED_TYPENAME
mpl::eval_if_c< is_const<C>::value,
range_const_iterator< typename remove_const<C>::type >,
range_mutable_iterator<C> >::type type;
};
template< typename C, typename T >
struct range_iterator< C, void(T[]) >
{
typedef T* type;
};
}
#endif
template< typename C >
struct range_iterator
{
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
typedef BOOST_RANGE_DEDUCED_TYPENAME
range_detail_vc7_1::range_iterator<C>::type type;
#else
typedef BOOST_RANGE_DEDUCED_TYPENAME
mpl::eval_if_c< is_const<C>::value,
typedef BOOST_RANGE_DEDUCED_TYPENAME
range_detail_vc7_1::range_iterator<C>::type type;
#else
typedef BOOST_RANGE_DEDUCED_TYPENAME
mpl::eval_if_c< is_const<C>::value,
range_const_iterator< typename remove_const<C>::type >,
range_mutable_iterator<C> >::type type;
#endif
#endif
};
} // namespace boost
//#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION

102
include/boost/range/iterator_range_core.hpp Normal file → Executable file
View File

@ -53,13 +53,13 @@ namespace boost
template< class ForwardRange >
static IteratorT adl_begin( ForwardRange& r )
{
return static_cast<IteratorT>( boost::begin( r ) );
return IteratorT( boost::begin( r ) );
}
template< class ForwardRange >
static IteratorT adl_end( ForwardRange& r )
{
return static_cast<IteratorT>( boost::end( r ) );
return IteratorT( boost::end( r ) );
}
};
@ -71,24 +71,6 @@ namespace boost
boost::begin(r),
boost::end(r) );
}
template< class Left, class Right >
inline bool greater_than( const Left& l, const Right& r )
{
return less_than(r,l);
}
template< class Left, class Right >
inline bool less_or_equal_than( const Left& l, const Right& r )
{
return !iterator_range_detail::less_than(r,l);
}
template< class Left, class Right >
inline bool greater_or_equal_than( const Left& l, const Right& r )
{
return !iterator_range_detail::less_than(l,r);
}
// This version is maintained since it is used in other boost libraries
// such as Boost.Assign
@ -249,7 +231,7 @@ namespace boost
difference_type size() const
{
return m_End - m_Begin;
return m_End - m_Begin;
}
bool empty() const
@ -289,21 +271,6 @@ namespace boost
{
return iterator_range_detail::less_than( *this, r );
}
bool operator>( const iterator_range& r ) const
{
return iterator_range_detail::greater_than( *this, r );
}
bool operator<=( const iterator_range& r ) const
{
return iterator_range_detail::less_or_equal_than( *this, r );
}
bool operator>=( const iterator_range& r ) const
{
return iterator_range_detail::greater_or_equal_than( *this, r );
}
#endif
@ -403,27 +370,6 @@ namespace boost
{
return iterator_range_detail::less_than( l, r );
}
template< class IteratorT, class ForwardRange >
inline bool operator<=( const ForwardRange& l,
const iterator_range<IteratorT>& r )
{
return iterator_range_detail::less_or_equal_than( l, r );
}
template< class IteratorT, class ForwardRange >
inline bool operator>( const ForwardRange& l,
const iterator_range<IteratorT>& r )
{
return iterator_range_detail::greater_than( l, r );
}
template< class IteratorT, class ForwardRange >
inline bool operator>=( const ForwardRange& l,
const iterator_range<IteratorT>& r )
{
return iterator_range_detail::greater_or_equal_than( l, r );
}
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
#else
@ -470,48 +416,6 @@ namespace boost
{
return iterator_range_detail::less_than( l, r );
}
template< class Iterator1T, class Iterator2T >
inline bool operator<=( const iterator_range<Iterator1T>& l,
const iterator_range<Iterator2T>& r )
{
return iterator_range_detail::less_or_equal_than( l, r );
}
template< class IteratorT, class ForwardRange >
inline bool operator<=( const iterator_range<IteratorT>& l,
const ForwardRange& r )
{
return iterator_range_detail::less_or_equal_than( l, r );
}
template< class Iterator1T, class Iterator2T >
inline bool operator>( const iterator_range<Iterator1T>& l,
const iterator_range<Iterator2T>& r )
{
return iterator_range_detail::greater_than( l, r );
}
template< class IteratorT, class ForwardRange >
inline bool operator>( const iterator_range<IteratorT>& l,
const ForwardRange& r )
{
return iterator_range_detail::greater_than( l, r );
}
template< class Iterator1T, class Iterator2T >
inline bool operator>=( const iterator_range<Iterator1T>& l,
const iterator_range<Iterator2T>& r )
{
return iterator_range_detail::greater_or_equal_than( l, r );
}
template< class IteratorT, class ForwardRange >
inline bool operator>=( const iterator_range<IteratorT>& l,
const ForwardRange& r )
{
return iterator_range_detail::greater_or_equal_than( l, r );
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING

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

View File

@ -36,9 +36,6 @@ public:
} // namespace range_detail
namespace range
{
template<class SinglePassRange1, class SinglePassRange2>
class joined_range
: public range_detail::joined_type<SinglePassRange1, SinglePassRange2>::type
@ -81,11 +78,6 @@ join(SinglePassRange1& r1, SinglePassRange2& r2)
return joined_range<SinglePassRange1, SinglePassRange2>(r1, r2);
}
} // namespace range
using ::boost::range::joined_range;
using ::boost::range::join;
} // namespace boost
#endif // include guard

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

View File

@ -12,13 +12,12 @@
#ifndef BOOST_RANGE_SUB_RANGE_HPP
#define BOOST_RANGE_SUB_RANGE_HPP
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
#pragma warning( push )
#pragma warning( disable : 4996 )
#endif
#include <boost/detail/workaround.hpp>
#include <boost/range/config.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/range/value_type.hpp>
@ -31,9 +30,9 @@
namespace boost
{
template< class ForwardRange >
class sub_range : public iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
template< class ForwardRange >
class sub_range : public iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
{
typedef BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type iterator_t;
typedef iterator_range< iterator_t > base;
@ -54,40 +53,40 @@ namespace boost
reference >::type const_reference;
public:
sub_range() : base()
sub_range() : base()
{ }
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500) )
sub_range( const sub_range& r )
: base( static_cast<const base&>( r ) )
{ }
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500) )
sub_range( const sub_range& r )
: base( static_cast<const base&>( r ) )
{ }
#endif
template< class ForwardRange2 >
sub_range( ForwardRange2& r ) :
#if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 800 )
base( impl::adl_begin( r ), impl::adl_end( r ) )
#else
base( r )
#endif
{ }
template< class ForwardRange2 >
sub_range( const ForwardRange2& r ) :
sub_range( ForwardRange2& r ) :
#if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 800 )
base( impl::adl_begin( r ), impl::adl_end( r ) )
#else
base( r )
#endif
#endif
{ }
template< class ForwardRange2 >
sub_range( const ForwardRange2& r ) :
#if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 800 )
base( impl::adl_begin( r ), impl::adl_end( r ) )
#else
base( r )
#endif
{ }
template< class Iter >
sub_range( Iter first, Iter last ) :
base( first, last )
{ }
template< class ForwardRange2 >
sub_range& operator=( ForwardRange2& r )
{
@ -100,23 +99,23 @@ namespace boost
{
base::operator=( r );
return *this;
}
}
sub_range& operator=( const sub_range& r )
{
base::operator=( static_cast<const base&>(r) );
return *this;
return *this;
}
public:
iterator begin() { return base::begin(); }
const_iterator begin() const { return base::begin(); }
iterator end() { return base::end(); }
const_iterator end() const { return base::end(); }
difference_type size() const { return base::size(); }
difference_type size() const { return base::size(); }
public: // convenience
reference front()
{
@ -174,7 +173,7 @@ namespace boost
} // namespace 'boost'
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
#pragma warning( pop )
#endif

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