Compare commits

...

16 Commits

Author SHA1 Message Date
24b7c98ca1 Merge pull request #156 from boostorg/develop
Merge Range 20250208 master to develop
2025-02-08 16:31:29 +00:00
a18dbf5d33 Merge pull request #155 from Lastique/feature/add_enable_if_convertible_include
Add a dedicated include for enable_if_convertible
2025-02-07 19:15:20 +00:00
55aab1f437 Added a dedicated include for enable_if_convertible.
enable_if_convertible is now defined in a separate header in Boost.Iterator.
Also qualify iterators namespace for enable_if_convertible.
2025-02-07 14:04:57 +03:00
f142776ac2 Merge pull request #154 from Lastique/feature/fix_mpl_includes
Fix missing and unneeded Boost.MPL includes
2025-02-07 10:57:30 +00:00
c9ebed771c Fix missing and unneeded Boost.MPL includes.
Also update Boost.Core includes to use up to date headers instead
of the deprecated forwarding stubs.
2025-02-01 02:13:04 +03:00
bee1538a77 Merge pull request #153 from boostorg/develop
Merge Boost.Range develop -> master
2025-01-26 18:25:16 +00:00
acb5648eac Merge pull request #150 from gogagum/develop
Fix missing include in `boost/range/concepts.hpp`.
2024-10-10 23:10:32 +01:00
bc2127c9a9 Fix missing include. 2024-06-09 17:59:07 +03:00
2bb6b63679 Merge pull request #148 from boostorg/develop
20240115_develop_to_master
2024-01-15 18:44:43 +00:00
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
19 changed files with 41 additions and 31 deletions

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

@ -14,6 +14,7 @@
#include <boost/range/adaptor/argument_fwd.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/iterator/enable_if_convertible.hpp>
#include <iterator>
namespace boost
@ -66,7 +67,7 @@ namespace boost
template<class OtherIterator>
strided_iterator(
const strided_iterator<OtherIterator, Category>& other,
typename enable_if_convertible<
typename iterators::enable_if_convertible<
OtherIterator,
base_iterator
>::type* = 0
@ -110,7 +111,7 @@ namespace boost
template<class OtherIterator>
bool equal(
const strided_iterator<OtherIterator, Category>& other,
typename enable_if_convertible<
typename iterators::enable_if_convertible<
OtherIterator,
base_iterator
>::type* = 0) const
@ -177,7 +178,7 @@ namespace boost
OtherIterator,
bidirectional_traversal_tag
>& other,
typename enable_if_convertible<
typename iterators::enable_if_convertible<
OtherIterator,
base_iterator
>::type* = 0
@ -239,7 +240,7 @@ namespace boost
OtherIterator,
bidirectional_traversal_tag
>& other,
typename enable_if_convertible<
typename iterators::enable_if_convertible<
OtherIterator,
base_iterator
>::type* = 0) const
@ -308,7 +309,7 @@ namespace boost
OtherIterator,
random_access_traversal_tag
>& other,
typename enable_if_convertible<
typename iterators::enable_if_convertible<
OtherIterator,
base_iterator
>::type* = 0
@ -372,7 +373,7 @@ namespace boost
OtherIterator,
random_access_traversal_tag
>& other,
typename enable_if_convertible<
typename iterators::enable_if_convertible<
OtherIterator, base_iterator>::type* = 0) const
{
BOOST_ASSERT((other.m_index - m_index) % m_stride == difference_type());
@ -385,7 +386,7 @@ namespace boost
OtherIterator,
random_access_traversal_tag
>& other,
typename enable_if_convertible<
typename iterators::enable_if_convertible<
OtherIterator, base_iterator>::type* = 0) const
{
return m_index == other.m_index;

View File

@ -13,8 +13,8 @@
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/concepts.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/ref.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/core/ref.hpp>
#include <algorithm>
#if BOOST_WORKAROUND(BOOST_MSVC, == 1600)

View File

@ -10,6 +10,8 @@
#define BOOST_RANGE_ANY_RANGE_HPP_INCLUDED
#include <boost/config.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/iterator/iterator_categories.hpp>
#include <boost/iterator/iterator_traits.hpp>
#include <boost/iterator/iterator_facade.hpp>

View File

@ -23,7 +23,9 @@
#include <boost/range/iterator.hpp>
#include <boost/range/value_type.hpp>
#include <boost/range/detail/misc_concept.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/is_integral.hpp>
#include <iterator>

View File

@ -13,6 +13,7 @@
#include <boost/mpl/and.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/not.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_reference.hpp>
@ -20,7 +21,7 @@
#include <boost/range/detail/any_iterator_buffer.hpp>
#include <boost/range/detail/any_iterator_interface.hpp>
#include <boost/range/detail/any_iterator_wrapper.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/core/enable_if.hpp>
namespace boost
{

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

@ -10,6 +10,7 @@
#ifndef BOOST_RANGE_DETAIL_ANY_ITERATOR_INTERFACE_HPP_INCLUDED
#define BOOST_RANGE_DETAIL_ANY_ITERATOR_INTERFACE_HPP_INCLUDED
#include <boost/mpl/if.hpp>
#include <boost/range/detail/any_iterator_buffer.hpp>
#include <boost/iterator/iterator_categories.hpp>
#include <boost/type_traits/is_convertible.hpp>

View File

@ -20,10 +20,7 @@
#include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/remove_pointer.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/mpl/fold.hpp>
#include <boost/mpl/if.hpp>
// Container traits implementation ---------------------------------------------------------

View File

@ -13,6 +13,7 @@
#include <boost/type_traits/is_class.hpp>
#include <boost/type_traits/is_member_function_pointer.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/cstdint.hpp>

View File

@ -19,6 +19,7 @@
#include <iterator>
#include <boost/assert.hpp>
#include <boost/mpl/if.hpp>
#include <boost/iterator/iterator_traits.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/range/begin.hpp>

View File

@ -56,8 +56,8 @@
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/utility/addressof.hpp>
#include <boost/utility/enable_if.hpp> // disable_if
#include <boost/core/addressof.hpp>
#include <boost/core/enable_if.hpp> // disable_if
#include <boost/next_prior.hpp>
#if !defined(BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1)

View File

@ -20,6 +20,8 @@
#endif
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
#include <boost/mpl/bool.hpp>
namespace boost
{
namespace cb_details

View File

@ -18,7 +18,7 @@
#include <boost/mpl/has_xxx.hpp>
#include <boost/range/iterator.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/core/enable_if.hpp>
namespace boost
{

View File

@ -22,6 +22,7 @@
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/if.hpp>
namespace boost
{

View File

@ -26,8 +26,11 @@
#include <boost/iterator/iterator_traits.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/not.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/type_traits/is_abstract.hpp>
#include <boost/type_traits/is_array.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
@ -41,7 +44,7 @@
#include <boost/range/has_range_iterator.hpp>
#include <boost/range/algorithm/equal.hpp>
#include <boost/range/detail/safe_bool.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/next_prior.hpp>
#include <iterator>
#include <algorithm>

View File

@ -90,7 +90,7 @@ class CTypedPtrMap;
#include <boost/iterator/transform_iterator.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/remove_pointer.hpp>
#include <boost/utility/addressof.hpp>
#include <boost/core/addressof.hpp>
#include <afx.h> // legacy CString
#include <afxcoll.h> // CXXXArray, CXXXList, CMapXXXToXXX
#include <tchar.h>
@ -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

@ -20,7 +20,7 @@
#include <boost/range/concepts.hpp>
#include <boost/range/has_range_iterator.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/type_traits/make_unsigned.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <cstddef>

View File

@ -27,6 +27,8 @@
#include <boost/range/reference.hpp>
#include <boost/range/algorithm/equal.hpp>
#include <boost/assert.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/type_traits/is_reference.hpp>
#include <boost/type_traits/remove_reference.hpp>