Compare commits

...

45 Commits

Author SHA1 Message Date
f0e109312c Merge pull request #144 from tobias-loew/fix-mfc
fixed compilation error in mfc.hpp with VS2022, MSVC 14.3
2023-08-28 08:41:52 +01:00
3920ef2e7a Merge pull request #146 from BenFrantzDale/issue-145
Fix for docs: https://github.com/boostorg/range/issues/145
2023-04-21 22:18:11 +01:00
41bff33b2c Fix for docs: https://github.com/boostorg/range/issues/145 2023-04-21 14:38:08 -04:00
b2e4d5ad4b Merge branch 'boostorg:develop' into fix-mfc 2023-04-12 09:07:19 +02:00
d52236c0b8 fixed compilation error in mfc.hpp with VS2022, MSVC 14.3
`const CObList` and `const CPtrList` still return a value from `GetHead`, `GetTail` and `GetAt`. MSVC 14.2 didn't complain about it, but 14.3 does so.

```
1>D:\boost\range\detail\microsoft.hpp(626,33): error C2440: 'return': cannot convert from 'const void *' to 'const void *&'
1>D:\boost\range\detail\microsoft.hpp(624,1): message : while compiling class template member function 'const void *&boost::range_detail_microsoft::list_iterator<const X,const void *,boost::use_default,boost::use_default>::dereference(void) const'
1>        with
1>        [
1>            X=CPtrList
1>        ]
1>D:\boost\iterator\iterator_facade.hpp(631,11): message : see reference to function template instantiation 'const void *&boost::range_detail_microsoft::list_iterator<const X,const void *,boost::use_default,boost::use_default>::dereference(void) const' being compiled
1>        with
1>        [
1>            X=CPtrList
1>        ]
1>D:\boost\range\mfc.hpp(881,1): message : see reference to class template instantiation 'boost::range_detail_microsoft::list_iterator<const X,const void *,boost::use_default,boost::use_default>' being compiled
1>        with
1>        [
1>            X=CPtrList
1>        ]

```
2023-04-12 09:04:41 +02:00
014c48f1b1 Merge pull request #137 from fanquake/patch-1
refactor: use core/noncopyable over boost/noncopyable
2022-08-24 17:55:01 +01:00
9c783ecbef refactor: use core/noncopyable over boost/noncopyable
The later is deprecated:
```cpp
// The header file at this path is deprecated;
// use boost/core/noncopyable.hpp instead.

#include <boost/core/noncopyable.hpp>
```
2022-08-23 16:00:08 +01:00
d6e0a32f2e Merge pull request #131 from BenjaminRodenberg/patch-1
Fix typo
2022-01-23 09:01:28 -05:00
95095cf4bb Fix typo 2022-01-23 12:53:11 +01:00
88c6199aed Merge branch 'master' into develop 2021-05-29 01:02:17 +03:00
fd40a25fea Add CMakeLists.txt 2021-03-18 17:28:05 +02:00
da69f60d3e Merge pull request #120 from eldiener/develop
[skip ci] Add "cxxstd" json field
2021-01-21 09:13:11 +00:00
6fc6e92adc [skip ci] Add "cxxstd" json field. The "cxxstd" json field is being added to each Boost library's meta json information for libraries in order to specify the minumum C++ standard compilation level. The value of this field matches one of the values for 'cxxstd' in Boost.Build. The purpose of doing this is to provide information for the Boost website documentation for each library which will specify the minimum C++ standard compilation that an end-user must employ in order to use the particular library. This will aid end-users who want to know if they can successfully use a Boost library based on their C++ compiler's compilation level, without having to search the library's documentation to find this out. 2021-01-21 03:20:56 -05:00
e13030df17 Merge pull request #117 from Mike-Devel/patch-1
Replace include of outdated boost/cast.hpp header
2020-12-12 09:21:49 -05:00
6776ffa8e8 Replace incldue of outdated boost/cast.hpp header
- Instead include `boost/polymorphic_cast.hpp` directly.
- This replaces the direct dependency of Boost.Range on Boost.NumericConversion with a direct dependency on Boost.Conversion
2020-11-19 14:25:21 +01:00
000b4882aa Merge branch 'develop' 2020-11-03 07:32:17 -05:00
486c74fbeb No longer include the deprecated headers in metafunctions.hpp 2020-09-12 07:48:06 -04:00
f3ff60c3bc Merge branch 'develop' 2020-06-24 19:44:12 +01:00
72e2a4457a Merge pull request #69 from cwecht/unique_erase
Added boost::unique_erase
2020-05-11 19:05:31 +01:00
bb27d50b31 Merge pull request #84 from cekc/patch-1
add std::tuple_element and std::tuple_size specializations for index_value
2020-05-11 19:05:06 +01:00
5572b24a71 Merge pull request #101 from Kojoley/deprecated-headers-compile-time-warning
Add compile-time warning to deprecated headers
2020-05-11 19:04:30 +01:00
b42165a916 Merge pull request #102 from Kojoley/combine-remove-unused-includes-and-code
combine: remove unused includes and code
2020-05-11 19:04:10 +01:00
9a2960f01b Merge pull request #104 from eldiener/develop
Changes for Embarcadero C++ clang-based compilers, targeting Boost 1.74. Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost conf…
2020-05-11 13:00:07 -04:00
4ed7887128 Merge pull request #105 from Lastique/fix_deprecated_headers
Fix usage of deprecated headers
2020-05-11 12:59:37 -04:00
ee1ec1cf57 Fix deprecated usage of boost/bind.hpp.
boost/bind.hpp emits compiler warnings about deprecation of the header
and global _N placeholders. This commit converts usage of this header
to boost/bind/bind.hpp and using namespace boost::placeholders.

Where boost::bind is not actually used, the includes are removed.
2020-05-11 19:26:26 +03:00
3b04f1a65e Remove uses of deprecated header boost/detail/iterator.hpp.
This header was deprecated in favor of <iterator>. It generates compiler
warnings and will be removed in a future release.
2020-05-11 19:13:20 +03:00
45d3aae111 Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost config for the Embarcadero non-clang-based compilers. 2020-03-31 16:55:55 -04:00
0e8ad01bf9 combine: remove unused includes and code 2020-03-01 18:03:19 +03:00
c25b0e5069 Add compile-time warning to deprecated headers 2020-02-13 18:29:06 +03:00
994ff83292 Merge pull request #95 from mjendruk/fix-lower-upper-bound-taking-argument-by-value
Make lower_bound and upper_bound take argument by const reference
2020-02-13 09:38:29 +00:00
77e5b868a0 Merge pull request #97 from Kojoley/remove-broken-no_function_template_ordering-support
Remove broken BOOST_NO_FUNCTION_TEMPLATE_ORDERING workaround
2020-02-13 09:37:35 +00:00
474efda11a Merge pull request #94 from mjendruk/fix-any-range-non-reference-references
Fix any_range with non-reference references can cause UB
2020-02-13 09:36:50 +00:00
f1215fbda2 Remove broken BOOST_NO_FUNCTION_TEMPLATE_ORDERING workaround
The workaround seems to be broken for a while, no compilers with that bug are
tested/supported, and there is no complaint whatsoever, not even on trac.
2019-09-28 01:11:01 +03:00
5f04231144 Make lower_bound and upper_bound take argument by const reference 2019-05-31 16:06:46 +02:00
4e0b172a23 Merge branch 'fix-any-range-non-reference-references' of https://github.com/mjendruk/range into fix-any-range-non-reference-references
# Conflicts:
#	include/boost/range/detail/any_iterator_interface.hpp
2019-05-31 10:46:51 +02:00
21a06a93aa Replace decay with remove_reference / remove_const 2019-05-31 10:46:04 +02:00
6b3750f209 Remove unused include 2019-05-08 22:43:09 +02:00
1bf2db29c0 Replace is_copy_constructible and is_abstract with is_convertible 2019-05-08 17:21:45 +02:00
9f03cc44d8 Add is_copy_constructible for >= C++11 2019-05-08 09:58:37 +02:00
911d8a427d Add result_type typedef in tests 2019-05-07 17:17:50 +02:00
3496282d3b Remove usage of initializer_list in test 2019-05-07 17:01:02 +02:00
ce24356018 Replace is_copy_constructible with is_abstract (for pre C++11) 2019-05-07 15:03:56 +02:00
dbb6ef424f Fix any_range with non-reference references can cause UB 2019-05-07 12:06:05 +02:00
221ae46c2b add std::tuple_element and std::tuple_size specializations for index_value
To make index_value work with structured bindings
https://wandbox.org/permlink/gsveiKdAamnEbOKM
2019-02-25 18:35:53 +03:00
11dd528eb0 added unique_erase 2018-04-24 16:29:31 +02:00
97 changed files with 335 additions and 1215 deletions

41
CMakeLists.txt Normal file
View File

@ -0,0 +1,41 @@
# Generated by `boostdep --cmake range`
# Copyright 2020 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required(VERSION 3.5...3.16)
project(boost_range VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
add_library(boost_range INTERFACE)
add_library(Boost::range ALIAS boost_range)
target_include_directories(boost_range INTERFACE include)
target_link_libraries(boost_range
INTERFACE
Boost::array
Boost::assert
Boost::concept_check
Boost::config
Boost::container_hash
Boost::conversion
Boost::core
Boost::detail
Boost::iterator
Boost::mpl
Boost::optional
Boost::preprocessor
Boost::regex
Boost::static_assert
Boost::tuple
Boost::type_traits
Boost::utility
)
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()

View File

@ -14,7 +14,7 @@
* [*Precondition:] The `value_type` of the range is an instantiation of `std::pair`.
* [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `y.second` where `y` is the corresponding element in the original range.
* [*Range Category:] __single_pass_range__
* [*Range Return Type:] for constant ranges, `boost::select_second_const<decltype(rng)>` otherwise `boost:select_second_mutable<decltype(rng)>`
* [*Range Return Type:] for constant ranges, `boost::select_second_const<decltype(rng)>` otherwise `boost::select_second_mutable<decltype(rng)>`
* [*Returned Range Category:] The range category of `rng`.
[section:map_values_example map_values example]

View File

@ -19,9 +19,11 @@ bool is_sorted(const SinglePassRange& rng, BinaryPredicate pred);
`is_sorted` determines if a range is sorted.
For the non-predicate version the return value is `true` if and only if for
each adjacent elements `[x,y]` the expression `x < y` is `true`.
each adjacent elements `[x, y]` the expression `y < x` is `false` (i.e.,
`x <= y`), or if the number of elements is zero or one.
For the predicate version the return value is `true` is and only if for each
adjacent elements `[x,y]` the expression `pred(x,y)` is `true`.
adjacent elements `[x, y]` the expression `pred(y, x)` is `false`, or if the
number of elements is zero or one.
[heading Definition]

View File

@ -367,4 +367,29 @@ index(
} // namespace adaptors
} // namespace boost
#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
namespace std {
#if defined(BOOST_CLANG)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmismatched-tags"
#endif
template<size_t N, class T, class Indexable>
struct tuple_element<N, boost::range::index_value<T, Indexable>>:
boost::tuples::element<N, boost::range::index_value<T, Indexable>> {};
template<class T, class Indexable>
struct tuple_size<boost::range::index_value<T, Indexable>>:
std::integral_constant<std::size_t, 2> {};
#if defined(BOOST_CLANG)
#pragma clang diagnostic pop
#endif
} // namespace std
#endif // !defined(BOOST_NO_CXX11_HDR_TUPLE)
#endif // include guard

View File

@ -31,7 +31,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
>::type
lower_bound( ForwardRange& rng, Value val )
lower_bound( ForwardRange& rng, const Value& val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return std::lower_bound(boost::begin(rng), boost::end(rng), val);
@ -40,7 +40,7 @@ lower_bound( ForwardRange& rng, Value val )
/// \overload
template< class ForwardRange, class Value >
inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
lower_bound( const ForwardRange& rng, Value val )
lower_bound( const ForwardRange& rng, const Value& val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return std::lower_bound(boost::begin(rng), boost::end(rng), val);
@ -52,7 +52,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
>::type
lower_bound( ForwardRange& rng, Value val, SortPredicate pred )
lower_bound( ForwardRange& rng, const Value& val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred);
@ -61,7 +61,7 @@ lower_bound( ForwardRange& rng, Value val, SortPredicate pred )
/// \overload
template< class ForwardRange, class Value, class SortPredicate >
inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
lower_bound( const ForwardRange& rng, Value val, SortPredicate pred )
lower_bound( const ForwardRange& rng, const Value& val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred);
@ -73,7 +73,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
>::type
lower_bound( ForwardRange& rng, Value val )
lower_bound( ForwardRange& rng, const Value& val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return range_return<ForwardRange,re>::
@ -84,7 +84,7 @@ lower_bound( ForwardRange& rng, Value val )
/// \overload
template< range_return_value re, class ForwardRange, class Value >
inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
lower_bound( const ForwardRange& rng, Value val )
lower_bound( const ForwardRange& rng, const Value& val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return range_return<const ForwardRange,re>::
@ -98,7 +98,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
>::type
lower_bound( ForwardRange& rng, Value val, SortPredicate pred )
lower_bound( ForwardRange& rng, const Value& val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return range_return<ForwardRange,re>::
@ -109,7 +109,7 @@ lower_bound( ForwardRange& rng, Value val, SortPredicate pred )
/// \overload
template< range_return_value re, class ForwardRange, class Value, class SortPredicate >
inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
lower_bound( const ForwardRange& rng, Value val, SortPredicate pred )
lower_bound( const ForwardRange& rng, const Value& val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return range_return<const ForwardRange,re>::

View File

@ -32,7 +32,7 @@ BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
>::type
upper_bound( ForwardRange& rng, Value val )
upper_bound( ForwardRange& rng, const Value& val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return std::upper_bound(boost::begin(rng), boost::end(rng), val);
@ -41,7 +41,7 @@ upper_bound( ForwardRange& rng, Value val )
/// \overload
template< class ForwardRange, class Value >
BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
upper_bound( const ForwardRange& rng, Value val )
upper_bound( const ForwardRange& rng, const Value& val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return std::upper_bound(boost::begin(rng), boost::end(rng), val);
@ -53,7 +53,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
>::type
upper_bound( ForwardRange& rng, Value val, SortPredicate pred )
upper_bound( ForwardRange& rng, const Value& val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred);
@ -62,7 +62,7 @@ upper_bound( ForwardRange& rng, Value val, SortPredicate pred )
/// \overload
template< class ForwardRange, class Value, class SortPredicate >
inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
upper_bound( const ForwardRange& rng, Value val, SortPredicate pred )
upper_bound( const ForwardRange& rng, const Value& val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred);
@ -74,7 +74,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
>::type
upper_bound( ForwardRange& rng, Value val )
upper_bound( ForwardRange& rng, const Value& val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return range_return<ForwardRange,re>::
@ -85,7 +85,7 @@ upper_bound( ForwardRange& rng, Value val )
/// \overload
template< range_return_value re, class ForwardRange, class Value >
inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
upper_bound( const ForwardRange& rng, Value val )
upper_bound( const ForwardRange& rng, const Value& val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return range_return<const ForwardRange,re>::
@ -100,7 +100,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
>::type
upper_bound( ForwardRange& rng, Value val, SortPredicate pred )
upper_bound( ForwardRange& rng, const Value& val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return range_return<ForwardRange,re>::
@ -112,7 +112,7 @@ upper_bound( ForwardRange& rng, Value val, SortPredicate pred )
template< range_return_value re, class ForwardRange, class Value,
class SortPredicate >
inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
upper_bound( const ForwardRange& rng, Value val, SortPredicate pred )
upper_bound( const ForwardRange& rng, const Value& val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return range_return<const ForwardRange,re>::

View File

@ -52,10 +52,31 @@ inline Container& remove_erase_if( Container& on, Pred pred )
return on;
}
template< class Container >
inline Container& unique_erase( Container& on)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> ));
on.erase(
std::unique(boost::begin(on), boost::end(on)),
boost::end(on));
return on;
}
template< class Container, class Pred >
inline Container& unique_erase( Container& on, Pred pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> ));
on.erase(
std::unique(boost::begin(on), boost::end(on), pred),
boost::end(on));
return on;
}
} // namespace range
using range::erase;
using range::remove_erase;
using range::remove_erase_if;
using range::unique_erase;
} // namespace boost
#endif // include guard

View File

@ -28,8 +28,6 @@ namespace boost
return boost::make_iterator_range( r );
}
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class Range >
inline boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type >
as_array( const Range& r )
@ -37,8 +35,6 @@ namespace boost
return boost::make_iterator_range( r );
}
#endif
}
#endif

View File

@ -15,10 +15,6 @@
# pragma once
#endif
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
#include <boost/range/detail/as_literal.hpp>
#else
#include <boost/range/iterator_range.hpp>
#include <boost/range/detail/str_types.hpp>
@ -165,6 +161,4 @@ namespace boost
}
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
#endif

View File

@ -17,10 +17,6 @@
#include <boost/range/config.hpp>
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
#include <boost/range/detail/begin.hpp>
#else
#include <boost/range/iterator.hpp>
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
@ -28,7 +24,7 @@
namespace boost
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
namespace range_detail
{
#endif
@ -85,7 +81,7 @@ namespace range_detail
}
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
} // namespace 'range_detail'
#endif
@ -101,7 +97,7 @@ BOOST_CONSTEXPR
#endif
inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type begin( T& r )
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
using namespace range_detail;
#endif
return range_begin( r );
@ -113,7 +109,7 @@ BOOST_CONSTEXPR
#endif
inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type begin( const T& r )
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
using namespace range_detail;
#endif
return range_begin( r );
@ -122,8 +118,6 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type begin( const T& r )
} // namespace range_adl_barrier
} // namespace boost
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
namespace boost
{
namespace range_adl_barrier

View File

@ -84,7 +84,7 @@ namespace boost {
#endif
#endif
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0
#endif

View File

@ -23,7 +23,7 @@
#error "macro already defined!"
#endif
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# define BOOST_RANGE_DEDUCED_TYPENAME typename
#else
#define BOOST_RANGE_DEDUCED_TYPENAME BOOST_DEDUCED_TYPENAME

View File

@ -15,6 +15,10 @@
# pragma once
#endif
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/range/reverse_iterator.hpp>")
#include <boost/range/reverse_iterator.hpp>
#include <boost/type_traits/remove_reference.hpp>

View File

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

View File

@ -12,8 +12,7 @@
#include <boost/range/detail/any_iterator_buffer.hpp>
#include <boost/iterator/iterator_categories.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/is_reference.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp>
@ -35,15 +34,16 @@ namespace boost
};
template<class T>
struct mutable_reference_type_generator
struct reference_as_value_type_generator
{
typedef typename remove_reference<
typename remove_const<T>::type
>::type value_type;
typedef typename mpl::if_<
typename mpl::and_<
typename is_const<T>::type,
typename mpl::not_<typename is_reference<T>::type>::type
>::type,
T,
typename add_reference<T>::type
typename is_convertible<const value_type&, value_type>::type,
value_type,
T
>::type type;
};
@ -53,16 +53,12 @@ namespace boost
>
struct any_incrementable_iterator_interface
{
typedef typename mutable_reference_type_generator<
Reference
>::type reference;
typedef Reference reference;
typedef typename const_reference_type_generator<
Reference
>::type const_reference;
typedef typename remove_const<
typename remove_reference<Reference>::type
typedef typename reference_as_value_type_generator<
Reference
>::type reference_as_value_type;
typedef Buffer buffer_type;

View File

@ -10,7 +10,7 @@
#ifndef BOOST_RANGE_DETAIL_ANY_ITERATOR_WRAPPER_HPP_INCLUDED
#define BOOST_RANGE_DETAIL_ANY_ITERATOR_WRAPPER_HPP_INCLUDED
#include <boost/cast.hpp>
#include <boost/polymorphic_cast.hpp>
#include <boost/range/config.hpp>
#include <boost/range/detail/any_iterator_interface.hpp>
#include <boost/range/concepts.hpp>

View File

@ -1,33 +0,0 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2006. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_DETAIL_AS_LITERAL_HPP
#define BOOST_RANGE_DETAIL_AS_LITERAL_HPP
#if defined(_MSC_VER)
# pragma once
#endif
#include <boost/range/detail/detail_str.hpp>
#include <boost/range/iterator_range.hpp>
namespace boost
{
template< class Range >
inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<Range>::type>
as_literal( Range& r )
{
return ::boost::make_iterator_range( ::boost::range_detail::str_begin(r),
::boost::range_detail::str_end(r) );
}
}
#endif

View File

@ -1,83 +0,0 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_DETAIL_BEGIN_HPP
#define BOOST_RANGE_DETAIL_BEGIN_HPP
#include <boost/config.hpp> // BOOST_MSVC
#include <boost/detail/workaround.hpp>
#include <boost/range/iterator.hpp>
#include <boost/range/detail/common.hpp>
namespace boost
{
namespace range_detail
{
template< typename T >
struct range_begin;
//////////////////////////////////////////////////////////////////////
// default
//////////////////////////////////////////////////////////////////////
template<>
struct range_begin<std_container_>
{
template< typename C >
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type fun( C& c )
{
return c.begin();
};
};
//////////////////////////////////////////////////////////////////////
// pair
//////////////////////////////////////////////////////////////////////
template<>
struct range_begin<std_pair_>
{
template< typename P >
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type fun( const P& p )
{
return p.first;
}
};
//////////////////////////////////////////////////////////////////////
// array
//////////////////////////////////////////////////////////////////////
template<>
struct range_begin<array_>
{
template<typename T>
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_value<T>::type* fun(T& t)
{
return t;
}
};
} // namespace 'range_detail'
namespace range_adl_barrier
{
template< typename C >
BOOST_CONSTEXPR inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
begin( C& c )
{
return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
}
}
} // namespace 'boost'
#endif

View File

@ -187,8 +187,6 @@ namespace boost {
return collection_traits<C>::function_type::empty( c );
}
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
//! Free-standing begin() function
/*!
Get the begin iterator of the container. Uses collection_traits.
@ -233,32 +231,6 @@ namespace boost {
return collection_traits<C>::function_type::end( c );
}
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
//! Free-standing begin() function
/*!
\overload
*/
template< typename C >
inline typename collection_traits<C>::result_iterator
begin( C& c )
{
return collection_traits<C>::function_type::begin( c );
}
//! Free-standing end() function
/*!
\overload
*/
template< typename C >
inline typename collection_traits<C>::result_iterator
end( C& c )
{
return collection_traits<C>::function_type::end( c );
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
} // namespace algorithm
} // namespace boost

View File

@ -12,6 +12,8 @@
#include <cstddef>
#include <string>
#include <utility>
#include <iterator>
#include <boost/type_traits/is_array.hpp>
#include <boost/type_traits/is_pointer.hpp>
#include <boost/type_traits/is_const.hpp>
@ -22,7 +24,6 @@
#include <boost/mpl/identity.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/mpl/fold.hpp>
#include <boost/detail/iterator.hpp>
// Container traits implementation ---------------------------------------------------------
@ -36,7 +37,7 @@ namespace boost {
/*
Wraps std::container compliant containers
*/
template< typename ContainerT >
template< typename ContainerT >
struct default_container_traits
{
typedef typename ContainerT::value_type value_type;
@ -49,7 +50,7 @@ namespace boost {
>::type result_iterator;
typedef typename ContainerT::difference_type difference_type;
typedef typename ContainerT::size_type size_type;
// static operations
template< typename C >
static size_type size( const C& c )
@ -63,8 +64,6 @@ namespace boost {
return c.empty();
}
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< typename C >
static iterator begin( C& c )
{
@ -89,22 +88,6 @@ namespace boost {
return c.end();
}
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< typename C >
static result_iterator begin( C& c )
{
return c.begin();
}
template< typename C >
static result_iterator end( C& c )
{
return c.end();
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
};
template<typename T>
@ -138,11 +121,11 @@ namespace boost {
{
typedef typename PairT::first_type element_type;
typedef typename ::boost::detail::
iterator_traits<element_type>::value_type value_type;
typedef typename
std::iterator_traits<element_type>::value_type value_type;
typedef std::size_t size_type;
typedef typename ::boost::detail::
iterator_traits<element_type>::difference_type difference_type;
typedef typename
std::iterator_traits<element_type>::difference_type difference_type;
typedef element_type iterator;
typedef element_type const_iterator;
@ -204,7 +187,7 @@ namespace boost {
BOOST_STATIC_CONSTANT( size_type, array_size = sz );
};
// array length resolving
/*
Lenght of string contained in a static array could
@ -261,7 +244,7 @@ namespace boost {
else
return std::char_traits<char>::length(a);
}
template< typename A >
static bool empty( const A& a )
{
@ -321,7 +304,7 @@ namespace boost {
const_iterator,
iterator
>::type result_iterator;
private:
// resolve array size
typedef typename
@ -345,9 +328,7 @@ namespace boost {
{
return array_length_type::empty(a);
}
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< typename A >
static iterator begin( A& a )
@ -373,22 +354,6 @@ namespace boost {
return a+array_length_type::length(a);
}
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< typename A >
static result_iterator begin( A& a )
{
return a;
}
template< typename A >
static result_iterator end( A& a )
{
return a+array_length_type::length(a);
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
};
template<typename T>
@ -436,8 +401,6 @@ namespace boost {
return p==0 || p[0]==0;
}
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< typename P >
static iterator begin( P& p )
{
@ -468,24 +431,6 @@ namespace boost {
return p+char_traits::length(p);
}
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< typename P >
static result_iterator begin( P& p )
{
return p;
}
template< typename P >
static result_iterator end( P& p )
{
if ( p==0 )
return p;
else
return p+char_traits::length(p);
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
};
template<typename T>

View File

@ -23,68 +23,20 @@
#include <boost/preprocessor/arithmetic/dec.hpp>
#include <boost/preprocessor/arithmetic/div.hpp>
#include <boost/preprocessor/arithmetic/mul.hpp>
#include <boost/preprocessor/control.hpp>
#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/control/while.hpp>
#include <boost/preprocessor/facilities/empty.hpp>
#include <boost/preprocessor/facilities/identity.hpp>
#include <boost/preprocessor/iteration/local.hpp>
#include <boost/preprocessor/punctuation/comma.hpp>
#include <boost/preprocessor/repetition.hpp>
#include <boost/preprocessor/repetition/enum.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/repeat.hpp>
#include <boost/preprocessor/tuple/elem.hpp>
#include <boost/range/iterator_range_core.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/mpl/transform.hpp>
#include <boost/utility/result_of.hpp>
#include <vector>
#include <list>
namespace boost
{
namespace range_detail
{
template<typename F, typename T, int SIZE>
struct combined_result_impl;
template<typename F, typename T>
struct combined_result
: combined_result_impl<F, T, tuples::length<T>::value>
{
};
#define BOOST_RANGE_combined_element(z, n, data) \
typename tuples::element<n, T>::type
#define BOOST_RANGE_combined_result(z, n, data) \
template<typename F, typename T> \
struct combined_result_impl <F,T,n> \
: result_of<F(BOOST_PP_ENUM(n, BOOST_RANGE_combined_element, ~))> \
{ \
};
#define BOOST_PP_LOCAL_MACRO(n) BOOST_RANGE_combined_result(~,n,~)
#define BOOST_PP_LOCAL_LIMITS (BOOST_RANGE_MIN_COMBINE_ARGS, \
BOOST_RANGE_MAX_COMBINE_ARGS)
#include BOOST_PP_LOCAL_ITERATE()
#define BOOST_RANGE_combined_get(z, n, data) get<n>(tuple)
#define BOOST_RANGE_combined_unpack(z, n, data) \
template<typename F, typename T> inline \
typename combined_result<F,T>::type \
unpack_(mpl::int_<n>, F f, const T& tuple) \
{ \
return f(BOOST_PP_ENUM(n, BOOST_RANGE_combined_get, ~)); \
}
#define BOOST_PP_LOCAL_MACRO(n) BOOST_RANGE_combined_unpack(~,n,~)
#define BOOST_PP_LOCAL_LIMITS (BOOST_RANGE_MIN_COMBINE_ARGS, \
BOOST_RANGE_MAX_COMBINE_ARGS)
#include BOOST_PP_LOCAL_ITERATE()
} // namespace range_detail
namespace range
{
@ -114,10 +66,6 @@ namespace range
#endif // include guard
#undef BOOST_RANGE_combined_element
#undef BOOST_RANGE_combined_result
#undef BOOST_RANGE_combined_get
#undef BOOST_RANGE_combined_unpack
#undef BOOST_RANGE_combined_seq
#undef BOOST_RANGE_combined_exp_pred
#undef BOOST_RANGE_combined_exp_op

View File

@ -15,8 +15,6 @@
#include <boost/range/end.hpp>
#include <boost/iterator/zip_iterator.hpp>
#include <fstream>
namespace boost
{
namespace range

View File

@ -1,376 +0,0 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_DETAIL_DETAIL_STR_HPP
#define BOOST_RANGE_DETAIL_DETAIL_STR_HPP
#include <boost/config.hpp> // BOOST_MSVC
#include <boost/range/iterator.hpp>
namespace boost
{
namespace range_detail
{
//
// iterator
//
template<>
struct range_iterator_<char_array_>
{
template< typename T >
struct pts
{
typedef BOOST_RANGE_DEDUCED_TYPENAME
remove_extent<T>::type* type;
};
};
template<>
struct range_iterator_<char_ptr_>
{
template< typename S >
struct pts
{
typedef char* type;
};
};
template<>
struct range_iterator_<const_char_ptr_>
{
template< typename S >
struct pts
{
typedef const char* type;
};
};
template<>
struct range_iterator_<wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef wchar_t* type;
};
};
template<>
struct range_iterator_<const_wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef const wchar_t* type;
};
};
//
// const iterator
//
template<>
struct range_const_iterator_<char_array_>
{
template< typename T >
struct pts
{
typedef const BOOST_RANGE_DEDUCED_TYPENAME
remove_extent<T>::type* type;
};
};
template<>
struct range_const_iterator_<char_ptr_>
{
template< typename S >
struct pts
{
typedef const char* type;
};
};
template<>
struct range_const_iterator_<const_char_ptr_>
{
template< typename S >
struct pts
{
typedef const char* type;
};
};
template<>
struct range_const_iterator_<wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef const wchar_t* type;
};
};
template<>
struct range_const_iterator_<const_wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef const wchar_t* type;
};
};
}
}
#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/common.hpp>
namespace boost
{
namespace range_detail
{
//
// str_begin()
//
template<>
struct range_begin<char_ptr_>
{
static char* fun( char* s )
{
return s;
}
};
template<>
struct range_begin<const_char_ptr_>
{
static const char* fun( const char* s )
{
return s;
}
};
template<>
struct range_begin<wchar_t_ptr_>
{
static wchar_t* fun( wchar_t* s )
{
return s;
}
};
template<>
struct range_begin<const_wchar_t_ptr_>
{
static const wchar_t* fun( const wchar_t* s )
{
return s;
}
};
template< typename C >
inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
str_begin( C& c )
{
return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME
range_detail::range<C>::type >::fun( c );
}
//
// str_end()
//
template<>
struct range_end<char_array_>
{
template< typename T, std::size_t sz >
static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] )
{
return boost::range_detail::array_end( boost_range_array );
}
};
template<>
struct range_end<wchar_t_array_>
{
template< typename T, std::size_t sz >
static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] )
{
return boost::range_detail::array_end( boost_range_array );
}
};
template<>
struct range_end<char_ptr_>
{
static char* fun( char* s )
{
return boost::range_detail::str_end( s );
}
};
template<>
struct range_end<const_char_ptr_>
{
static const char* fun( const char* s )
{
return boost::range_detail::str_end( s );
}
};
template<>
struct range_end<wchar_t_ptr_>
{
static wchar_t* fun( wchar_t* s )
{
return boost::range_detail::str_end( s );
}
};
template<>
struct range_end<const_wchar_t_ptr_>
{
static const wchar_t* fun( const wchar_t* s )
{
return boost::range_detail::str_end( s );
}
};
template< typename C >
inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
str_end( C& c )
{
return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME
range_detail::range<C>::type >::fun( c );
}
//
// size_type
//
template<>
struct range_size_type_<char_array_>
{
template< typename A >
struct pts
{
typedef std::size_t type;
};
};
template<>
struct range_size_type_<char_ptr_>
{
template< typename S >
struct pts
{
typedef std::size_t type;
};
};
template<>
struct range_size_type_<const_char_ptr_>
{
template< typename S >
struct pts
{
typedef std::size_t type;
};
};
template<>
struct range_size_type_<wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef std::size_t type;
};
};
template<>
struct range_size_type_<const_wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef std::size_t type;
};
};
//
// value_type
//
template<>
struct range_value_type_<char_array_>
{
template< typename T >
struct pts
{
typedef char type;
};
};
template<>
struct range_value_type_<char_ptr_>
{
template< typename S >
struct pts
{
typedef char type;
};
};
template<>
struct range_value_type_<const_char_ptr_>
{
template< typename S >
struct pts
{
typedef const char type;
};
};
template<>
struct range_value_type_<wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef wchar_t type;
};
};
template<>
struct range_value_type_<const_wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef const wchar_t type;
};
};
} // namespace 'range_detail'
} // namespace 'boost'
#endif

View File

@ -1,86 +0,0 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_DETAIL_END_HPP
#define BOOST_RANGE_DETAIL_END_HPP
#include <boost/config.hpp> // BOOST_MSVC
#include <boost/detail/workaround.hpp>
#include <boost/range/detail/implementation_help.hpp>
#include <boost/range/iterator.hpp>
#include <boost/range/detail/common.hpp>
namespace boost
{
namespace range_detail
{
template< typename T >
struct range_end;
//////////////////////////////////////////////////////////////////////
// default
//////////////////////////////////////////////////////////////////////
template<>
struct range_end<std_container_>
{
template< typename C >
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
fun( C& c )
{
return c.end();
};
};
//////////////////////////////////////////////////////////////////////
// pair
//////////////////////////////////////////////////////////////////////
template<>
struct range_end<std_pair_>
{
template< typename P >
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type
fun( const P& p )
{
return p.second;
}
};
//////////////////////////////////////////////////////////////////////
// array
//////////////////////////////////////////////////////////////////////
template<>
struct range_end<array_>
{
template<typename T>
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME remove_extent<T>::type* fun(T& t)
{
return t + remove_extent<T>::size;
}
};
} // namespace 'range_detail'
namespace range_adl_barrier
{
template< typename C >
BOOST_CONSTEXPR inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
end( C& c )
{
return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
}
} // namespace range_adl_barrier
} // namespace 'boost'
#endif

View File

@ -1,157 +0,0 @@
// Boost.Range library
//
// Copyright Jonathan Turkanis 2005. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP
#define BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP
#include <boost/config.hpp> // MSVC, NO_INTRINSIC_WCHAR_T, put size_t in std.
#include <cstddef>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost
{
namespace range_detail
{
template< typename Case1 = mpl::true_,
typename Type1 = mpl::void_,
typename Case2 = mpl::true_,
typename Type2 = mpl::void_,
typename Case3 = mpl::true_,
typename Type3 = mpl::void_,
typename Case4 = mpl::true_,
typename Type4 = mpl::void_,
typename Case5 = mpl::true_,
typename Type5 = mpl::void_,
typename Case6 = mpl::true_,
typename Type6 = mpl::void_,
typename Case7 = mpl::true_,
typename Type7 = mpl::void_,
typename Case8 = mpl::true_,
typename Type8 = mpl::void_,
typename Case9 = mpl::true_,
typename Type9 = mpl::void_,
typename Case10 = mpl::true_,
typename Type10 = mpl::void_,
typename Case11 = mpl::true_,
typename Type11 = mpl::void_,
typename Case12 = mpl::true_,
typename Type12 = mpl::void_,
typename Case13 = mpl::true_,
typename Type13 = mpl::void_,
typename Case14 = mpl::true_,
typename Type14 = mpl::void_,
typename Case15 = mpl::true_,
typename Type15 = mpl::void_,
typename Case16 = mpl::true_,
typename Type16 = mpl::void_,
typename Case17 = mpl::true_,
typename Type17 = mpl::void_,
typename Case18 = mpl::true_,
typename Type18 = mpl::void_,
typename Case19 = mpl::true_,
typename Type19 = mpl::void_,
typename Case20 = mpl::true_,
typename Type20 = mpl::void_>
struct select {
typedef typename
mpl::eval_if<
Case1, mpl::identity<Type1>, mpl::eval_if<
Case2, mpl::identity<Type2>, mpl::eval_if<
Case3, mpl::identity<Type3>, mpl::eval_if<
Case4, mpl::identity<Type4>, mpl::eval_if<
Case5, mpl::identity<Type5>, mpl::eval_if<
Case6, mpl::identity<Type6>, mpl::eval_if<
Case7, mpl::identity<Type7>, mpl::eval_if<
Case8, mpl::identity<Type8>, mpl::eval_if<
Case9, mpl::identity<Type9>, mpl::if_<
Case10, Type10, mpl::void_ > > > > > > > > >
>::type result1;
typedef typename
mpl::eval_if<
Case11, mpl::identity<Type11>, mpl::eval_if<
Case12, mpl::identity<Type12>, mpl::eval_if<
Case13, mpl::identity<Type13>, mpl::eval_if<
Case14, mpl::identity<Type14>, mpl::eval_if<
Case15, mpl::identity<Type15>, mpl::eval_if<
Case16, mpl::identity<Type16>, mpl::eval_if<
Case17, mpl::identity<Type17>, mpl::eval_if<
Case18, mpl::identity<Type18>, mpl::eval_if<
Case19, mpl::identity<Type19>, mpl::if_<
Case20, Type20, mpl::void_ > > > > > > > > >
> result2;
typedef typename
mpl::eval_if<
is_same<result1, mpl::void_>,
result2,
mpl::identity<result1>
>::type type;
};
template<typename T>
struct remove_extent {
static T* ar;
BOOST_STATIC_CONSTANT(std::size_t, size = sizeof(*ar) / sizeof((*ar)[0]));
typedef typename
select<
is_same<T, bool[size]>, bool,
is_same<T, char[size]>, char,
is_same<T, signed char[size]>, signed char,
is_same<T, unsigned char[size]>, unsigned char,
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
is_same<T, wchar_t[size]>, wchar_t,
#endif
is_same<T, short[size]>, short,
is_same<T, unsigned short[size]>, unsigned short,
is_same<T, int[size]>, int,
is_same<T, unsigned int[size]>, unsigned int,
is_same<T, long[size]>, long,
is_same<T, unsigned long[size]>, unsigned long,
is_same<T, float[size]>, float,
is_same<T, double[size]>, double,
is_same<T, long double[size]>, long double
>::type result1;
typedef typename
select<
is_same<T, const bool[size]>, const bool,
is_same<T, const char[size]>, const char,
is_same<T, const signed char[size]>, const signed char,
is_same<T, const unsigned char[size]>, const unsigned char,
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
is_same<T, const wchar_t[size]>, const wchar_t,
#endif
is_same<T, const short[size]>, const short,
is_same<T, const unsigned short[size]>, const unsigned short,
is_same<T, const int[size]>, const int,
is_same<T, const unsigned int[size]>, const unsigned int,
is_same<T, const long[size]>, const long,
is_same<T, const unsigned long[size]>, const unsigned long,
is_same<T, const float[size]>, const float,
is_same<T, const double[size]>, const double,
is_same<T, const long double[size]>, const long double
> result2;
typedef typename
mpl::eval_if<
is_same<result1, mpl::void_>,
result2,
mpl::identity<result1>
>::type type;
};
} // namespace 'range_detail'
} // namespace 'boost'
#endif

View File

@ -1,55 +0,0 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_DETAIL_SIZE_TYPE_HPP
#define BOOST_RANGE_DETAIL_SIZE_TYPE_HPP
#include <boost/range/detail/common.hpp>
//////////////////////////////////////////////////////////////////////////////
// missing partial specialization workaround.
//////////////////////////////////////////////////////////////////////////////
namespace boost
{
namespace range_detail
{
template< typename T >
struct range_size_type_
{
template< typename C >
struct pts
{
typedef std::size_t type;
};
};
template<>
struct range_size_type_<std_container_>
{
template< typename C >
struct pts
{
typedef BOOST_RANGE_DEDUCED_TYPENAME C::size_type type;
};
};
}
template< typename C >
class range_size
{
typedef typename range_detail::range<C>::type c_type;
public:
typedef typename range_detail::range_size_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;
};
}
#endif

View File

@ -1,72 +0,0 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_DETAIL_VALUE_TYPE_HPP
#define BOOST_RANGE_DETAIL_VALUE_TYPE_HPP
#include <boost/range/detail/common.hpp>
#include <boost/range/detail/remove_extent.hpp>
#include <boost/iterator/iterator_traits.hpp>
//////////////////////////////////////////////////////////////////////////////
// missing partial specialization workaround.
//////////////////////////////////////////////////////////////////////////////
namespace boost
{
namespace range_detail
{
template< typename T >
struct range_value_type_;
template<>
struct range_value_type_<std_container_>
{
template< typename C >
struct pts
{
typedef BOOST_RANGE_DEDUCED_TYPENAME C::value_type type;
};
};
template<>
struct range_value_type_<std_pair_>
{
template< typename P >
struct pts
{
typedef BOOST_RANGE_DEDUCED_TYPENAME boost::iterator_value< BOOST_RANGE_DEDUCED_TYPENAME P::first_type >::type type;
};
};
template<>
struct range_value_type_<array_>
{
template< typename T >
struct pts
{
typedef BOOST_DEDUCED_TYPENAME remove_extent<T>::type type;
};
};
}
template< typename C >
class range_value
{
typedef BOOST_DEDUCED_TYPENAME range_detail::range<C>::type c_type;
public:
typedef BOOST_DEDUCED_TYPENAME range_detail::range_value_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;
};
}
#endif

View File

@ -17,10 +17,6 @@
#include <boost/range/config.hpp>
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
#include <boost/range/detail/end.hpp>
#else
#include <boost/range/detail/implementation_help.hpp>
#include <boost/range/iterator.hpp>
#include <boost/range/const_iterator.hpp>
@ -30,7 +26,7 @@
namespace boost
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
namespace range_detail
{
#endif
@ -82,7 +78,7 @@ namespace range_detail
return range_detail::array_end<T,sz>( a );
}
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
} // namespace 'range_detail'
#endif
@ -95,7 +91,7 @@ BOOST_CONSTEXPR
#endif
inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r )
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
using namespace range_detail;
#endif
return range_end( r );
@ -107,7 +103,7 @@ BOOST_CONSTEXPR
#endif
inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
using namespace range_detail;
#endif
return range_end( r );
@ -116,8 +112,6 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
} // namespace range_adl_barrier
} // namespace 'boost'
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
namespace boost
{
namespace range_adl_barrier

View File

@ -637,8 +637,6 @@ public:
return iterator_range_detail::greater_or_equal_than( l, r );
}
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
#else
template< class Iterator1T, class Iterator2T >
inline bool
operator==( const iterator_range<Iterator1T>& l, const iterator_range<Iterator2T>& r )
@ -743,8 +741,6 @@ public:
return iterator_range_detail::greater_or_equal_than( l, r );
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
// iterator range utilities -----------------------------------------//
//! iterator_range construct helper
@ -769,17 +765,6 @@ public:
return iterator_range<IteratorT>(first, boost::next(first, n));
}
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< typename Range >
inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
make_iterator_range( Range& r )
{
return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
( boost::begin( r ), boost::end( r ) );
}
#else
//! iterator_range construct helper
/*!
Construct an \c iterator_range from a \c Range containing the begin
@ -801,8 +786,6 @@ public:
( r, iterator_range_detail::const_range_tag() );
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
namespace iterator_range_detail
{
template< class Range >
@ -827,19 +810,6 @@ public:
}
}
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class Range >
inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
make_iterator_range( Range& r,
BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
{
return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
}
#else
template< class Range >
inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
make_iterator_range( Range& r,
@ -858,8 +828,6 @@ public:
return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
//! copy a range into a sequence
/*!
Construct a new sequence of the specified type from the elements

View File

@ -17,10 +17,7 @@
#include <boost/range/iterator.hpp>
#include <boost/range/has_range_iterator.hpp>
#include <boost/range/result_iterator.hpp>
#include <boost/range/reverse_iterator.hpp>
#include <boost/range/const_reverse_iterator.hpp>
#include <boost/range/reverse_result_iterator.hpp>
#include <boost/range/value_type.hpp>
#include <boost/range/size_type.hpp>
#include <boost/range/difference_type.hpp>

View File

@ -292,11 +292,8 @@ namespace boost { namespace range_detail_microsoft {
struct meta
{
typedef list_iterator<X, ::CObject *> mutable_iterator;
#if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF)
typedef list_iterator<X const, ::CObject const *> const_iterator;
#else
// const CObList and const CPtrList both return a value (and probably always will)
typedef list_iterator<X const, ::CObject const * const, ::CObject const * const> const_iterator;
#endif
};
};
@ -309,11 +306,8 @@ namespace boost { namespace range_detail_microsoft {
struct meta
{
typedef list_iterator<X, void *> mutable_iterator;
#if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF)
typedef list_iterator<X const, void const *> const_iterator;
#else
// const CObList and const CPtrList both return a value (and probably always will)
typedef list_iterator<X const, void const * const, void const * const> const_iterator;
#endif
};
};

View File

@ -21,17 +21,6 @@
namespace boost
{
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class C >
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
rbegin( C& c )
{
return BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( boost::end( c ) );
}
#else
template< class C >
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
rbegin( C& c )
@ -50,8 +39,6 @@ rbegin( const C& c )
return iter_type( boost::end( c ) );
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class T >
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const T>::type
const_rbegin( const T& r )

View File

@ -21,17 +21,6 @@
namespace boost
{
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class C >
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
rend( C& c )
{
return BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( boost::begin( c ) );
}
#else
template< class C >
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
rend( C& c )
@ -50,8 +39,6 @@ rend( const C& c )
return iter_type( boost::begin( c ) );
}
#endif
template< class T >
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const T>::type
const_rend( const T& r )

View File

@ -15,6 +15,10 @@
# pragma once
#endif
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/range/iterator.hpp>")
#include <boost/range/iterator.hpp>
namespace boost

View File

@ -15,6 +15,10 @@
# pragma once
#endif
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/range/reverse_iterator.hpp>")
#include <boost/range/reverse_iterator.hpp>
namespace boost

View File

@ -62,7 +62,7 @@ namespace boost
BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept<SinglePassRange>));
#endif
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) && \
!BOOST_WORKAROUND(__GNUC__, < 3) \
/**/
using namespace range_detail;

View File

@ -12,5 +12,6 @@
"maintainers": [
"Neil Groves <neilgroves -at- googlemail.com>",
"Nathan Ridge <zeratul976 -at- hotmail.com>"
]
],
"cxxstd": "03"
}

View File

@ -81,6 +81,7 @@ test-suite range :
[ range-test adaptor_test/type_erased_forward ]
[ range-test adaptor_test/type_erased_bidirectional ]
[ range-test adaptor_test/type_erased_random_access ]
[ range-test adaptor_test/type_erased_transformed ]
[ range-test adaptor_test/uniqued ]
[ range-test adaptor_test/adjacent_filtered_example ]
[ range-test adaptor_test/copied_example ]

View File

@ -19,7 +19,7 @@
#include <boost/range/adaptor/transformed.hpp>
#include <boost/range/adaptor/filtered.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/test/test_tools.hpp>
#include <boost/test/unit_test.hpp>
@ -88,6 +88,8 @@ void chained_adaptors_test()
std::set<foo> foos;
using namespace boost::placeholders;
boost::copy(sep
| boost::adaptors::transformed(boost::bind(&foo::from_string, _1))
| boost::adaptors::filtered(boost::bind(&foo::is_valid, _1)),

View File

@ -14,7 +14,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/range/algorithm_ext.hpp>
#include <algorithm>
@ -140,6 +140,7 @@ namespace boost
void transformed_bind()
{
using namespace boost::adaptors;
using namespace boost::placeholders;
std::vector<foo_bind> input(5);
std::vector<int> output;

View File

@ -0,0 +1,67 @@
// Boost.Range library
//
// Copyright Neil Groves 2014. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/range/adaptor/type_erased.hpp>
#include <boost/range/adaptor/transformed.hpp>
#include <boost/range/numeric.hpp>
#include "type_erased_test.hpp"
#include <boost/test/unit_test.hpp>
#include <vector>
namespace boost_range_adaptor_type_erased_test
{
namespace
{
typedef boost::any_range<
int,
boost::random_access_traversal_tag,
int,
std::ptrdiff_t
> any_integer_value_range;
struct get_fn
{
typedef boost::int32_t result_type;
boost::int32_t operator()(const MockType& val) const
{
return val.get();
}
};
int accumulate_any_integer_value_range(any_integer_value_range rng)
{
return boost::accumulate(rng, 0);
}
void test_type_erased_transformed()
{
std::vector<MockType> v(5, MockType(3));
const int sum = accumulate_any_integer_value_range(
v | boost::adaptors::transformed(get_fn()));
BOOST_CHECK_EQUAL(15, sum);
}
} // anonymous namespace
} // namespace boost_range_adaptor_type_erased_test
boost::unit_test::test_suite*
init_unit_test_suite(int, char*[])
{
boost::unit_test::test_suite* test
= BOOST_TEST_SUITE("RangeTestSuite.adaptor.type_erased_transformed");
test->add(
BOOST_TEST_CASE(
&boost_range_adaptor_type_erased_test::test_type_erased_transformed));
return test;
}

View File

@ -10,7 +10,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif

View File

@ -35,9 +35,8 @@
#endif
#include <boost/assign.hpp>
#include <boost/config.hpp>
#include <boost/config.hpp>
#include <boost/array.hpp>
#include <boost/bind.hpp>
#include <boost/range/numeric.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/range/value_type.hpp>

View File

@ -10,7 +10,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif

View File

@ -112,6 +112,64 @@ namespace
test_remove_erase_if_impl<std::list<int> >();
}
template< class Container >
void test_unique_erase_impl()
{
Container source;
source.push_back(1);
source.push_back(1);
source.push_back(1);
source.push_back(2);
source.push_back(3);
source.push_back(3);
Container reference;
reference.push_back(1);
reference.push_back(2);
reference.push_back(3);
boost::unique_erase(source);
BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
source.begin(), source.end() );
}
void test_unique_erase()
{
test_unique_erase_impl<std::vector<int> >();
test_unique_erase_impl<std::list<int> >();
}
struct distance_smaller_2
{
typedef bool result_type;
typedef int argument_type;
bool operator()(int x, int y) const { return std::abs(x - y) < 2; }
};
template< class Container >
void test_unique_erase_pred_impl()
{
Container source;
for (int i = 0; i < 10; ++i)
source.push_back(i);
Container reference;
for (int i = 0; i < 10; i += 2)
reference.push_back(i);
boost::unique_erase(source, distance_smaller_2());
BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
source.begin(), source.end() );
}
void test_unique_erase_pred()
{
test_unique_erase_pred_impl<std::vector<int> >();
test_unique_erase_pred_impl<std::list<int> >();
}
}
boost::unit_test::test_suite*
@ -123,6 +181,8 @@ init_unit_test_suite(int argc, char* argv[])
test->add( BOOST_TEST_CASE( &test_erase ) );
test->add( BOOST_TEST_CASE( &test_remove_erase ) );
test->add( BOOST_TEST_CASE( &test_remove_erase_if ) );
test->add( BOOST_TEST_CASE( &test_unique_erase ) );
test->add( BOOST_TEST_CASE( &test_unique_erase_pred ) );
return test;
}

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -14,7 +14,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -11,7 +11,6 @@
#include <boost/test/test_tools.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <boost/range/algorithm/lower_bound.hpp>
#include "../test_driver/range_return_test_driver.hpp"
#include <algorithm>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <boost/range/iterator.hpp>
#include "../test_driver/range_return_test_driver.hpp"
#include <algorithm>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <boost/range/iterator.hpp>
#include "../test_driver/range_return_test_driver.hpp"
#include <algorithm>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -14,7 +14,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include "../test_driver/range_return_test_driver.hpp"
#include <algorithm>
#include <functional>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include "../test_function/counted_function.hpp"
#include <algorithm>
#include <functional>

View File

@ -14,7 +14,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -14,7 +14,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -14,7 +14,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>
@ -64,6 +64,8 @@ namespace
template< class Container >
void test_remove_copy_if_( const Container& c, int to_remove )
{
using namespace boost::placeholders;
test_remove_copy_if_impl(c, boost::bind(std::equal_to<int>(), _1, to_remove));
test_remove_copy_if_impl(c, boost::bind(std::not_equal_to<int>(), _1, to_remove));
}

View File

@ -14,7 +14,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>
@ -59,6 +59,8 @@ namespace boost
template< class Container >
void test_remove_if_( const Container& c, int to_remove )
{
using namespace boost::placeholders;
test_remove_if_impl(c, boost::bind(std::equal_to<int>(), _1, to_remove));
test_remove_if_impl(c, boost::bind(std::not_equal_to<int>(), _1, to_remove));
}

View File

@ -14,7 +14,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -14,7 +14,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>
@ -66,6 +66,8 @@ namespace
template< class Container >
void test_replace_copy_if_( const Container& c, int to_replace )
{
using namespace boost::placeholders;
test_replace_copy_if_impl(c, boost::bind(std::equal_to<int>(), _1, to_replace));
test_replace_copy_if_impl(c, boost::bind(std::not_equal_to<int>(), _1, to_replace));
}

View File

@ -14,7 +14,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>
@ -29,6 +29,8 @@ namespace boost
template< class Container, class UnaryPredicate >
void test_replace_if_impl(Container& cont, UnaryPredicate pred)
{
using namespace boost::placeholders;
const int what = 2;
const int with_what = 5;

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include "../test_driver/range_return_test_driver.hpp"
#include <algorithm>
#include <functional>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -14,7 +14,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -15,7 +15,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <boost/config.hpp>
#include "../test_driver/range_overload_test_driver.hpp"
#include <algorithm>

View File

@ -14,7 +14,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@ -12,7 +12,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include "../test_driver/range_return_test_driver.hpp"
#include <algorithm>
#include <functional>

View File

@ -11,7 +11,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif
@ -35,7 +35,7 @@ void check_array()
// BOOST_RANGE_NO_STATIC_ASSERT
#if !defined( __BORLANDC__ )
#if !defined( BOOST_BORLANDC )
#else
BOOST_STATIC_ASSERT(( is_same< range_value<array_t>::type, int >::value ));
BOOST_STATIC_ASSERT(( is_same< range_iterator<array_t>::type, int* >::value ));

View File

@ -10,7 +10,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif

View File

@ -11,7 +11,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif

View File

@ -8,6 +8,7 @@
// For more information, see http://www.boost.org/libs/range/
//
#define BOOST_ALLOW_DEPRECATED_HEADERS
#include <boost/range/const_reverse_iterator.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_same.hpp>

View File

@ -10,7 +10,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif

View File

@ -11,7 +11,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif

View File

@ -11,7 +11,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif

View File

@ -10,7 +10,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif

View File

@ -12,7 +12,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif
@ -47,7 +47,7 @@ void check_iterator_range()
BOOST_CHECK( !r.empty() );
BOOST_CHECK( !r2.empty() );
//#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
//#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
// if( !(bool)r )
// BOOST_CHECK( false );
// if( !(bool)r2 )

View File

@ -13,7 +13,7 @@
#include <boost/range/detail/implementation_help.hpp>
#include <boost/test/test_tools.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif

View File

@ -8,6 +8,7 @@
// For more information, see http://www.boost.org/libs/range/
//
#define BOOST_ALLOW_DEPRECATED_HEADERS
#include <boost/range/result_iterator.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_same.hpp>

View File

@ -8,6 +8,7 @@
// For more information, see http://www.boost.org/libs/range/
//
#define BOOST_ALLOW_DEPRECATED_HEADERS
#include <boost/range/reverse_result_iterator.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_same.hpp>

View File

@ -11,7 +11,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif

View File

@ -11,7 +11,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif

View File

@ -12,7 +12,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif
@ -28,6 +28,7 @@
#include <boost/config.hpp>
#include <vector>
#include <fstream>
#include <iterator>
#include <algorithm>
namespace
@ -146,7 +147,7 @@ void check_char()
char* char_s2 = a_string.mutable_sz();
BOOST_STATIC_ASSERT(( is_same< range_value<char_iterator_t>::type,
detail::iterator_traits<char_iterator_t>::value_type>::value ));
std::iterator_traits<char_iterator_t>::value_type>::value ));
BOOST_STATIC_ASSERT(( is_same< range_iterator<char_iterator_t>::type, char_iterator_t >::value ));
BOOST_STATIC_ASSERT(( is_same< range_difference<char_iterator_t>::type,
@ -225,11 +226,11 @@ void check_string()
wchar_t* char_ws2 = a_wide_string.mutable_sz();
BOOST_STATIC_ASSERT(( is_same< range_value<wchar_iterator_t>::type,
detail::iterator_traits<wchar_iterator_t>::value_type>::value ));
std::iterator_traits<wchar_iterator_t>::value_type>::value ));
BOOST_STATIC_ASSERT(( is_same< range_iterator<wchar_iterator_t>::type, wchar_iterator_t >::value ));
BOOST_STATIC_ASSERT(( is_same< range_iterator<const wchar_t*>::type, const wchar_t* >::value ));
BOOST_STATIC_ASSERT(( is_same< range_difference<wchar_iterator_t>::type,
detail::iterator_traits<wchar_iterator_t>::difference_type >::value ));
std::iterator_traits<wchar_iterator_t>::difference_type >::value ));
BOOST_STATIC_ASSERT(( is_same< range_size<wchar_iterator_t>::type, std::size_t >::value ));
BOOST_STATIC_ASSERT(( is_same< range_iterator<wchar_iterator_t>::type, wchar_iterator_t >::value ));
BOOST_STATIC_ASSERT(( is_same< range_iterator<const wchar_t*>::type, const wchar_t* >::value ));

View File

@ -11,7 +11,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif
@ -65,7 +65,7 @@ void check_sub_range()
BOOST_CHECK_EQUAL( r.size(), s.size() );
BOOST_CHECK_EQUAL( r2.size(), s2.size() );
//#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
//#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
// if( !(bool)r )
// BOOST_CHECK( false );
// if( !(bool)r2 )