Compare commits

...

15 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
7 changed files with 52 additions and 14 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

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

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

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