Compare commits

...

9 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
4 changed files with 8 additions and 12 deletions

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

@ -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

@ -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
};
};