Andrey Semashev
dec7d0f24c
Extracted min_category as a variadic metafunction.
...
The new min_category is similar to minimum_category but accepts variable
number of iterator categories on input instead of just two, and also does
not depend on Boost.MPL for lambda placeholders. The existing minimum_category
trait has been reimplemented in terms of min_category and deprecated.
We don't yet emit deprecation warnings as there is still code that uses
the old trait which we first need to update. Eventually, minimum_category
will emit warnings and will be removed.
2025-02-05 18:51:37 +03:00
Andrey Semashev
32d19a72e1
Trim trailing spaces.
2025-01-26 15:45:03 +03:00
Andrey Semashev
5ed3144969
Restored the original static assert check.
2025-01-26 15:22:53 +03:00
Georgy Guminov
f9effffb6d
Mostly remove pre-CXX11 workarounds.
...
С++03 support was deprecated in 1.85 and now can be removed. This PR clears
many of workarounds, which are no longer needed now.
* Remove unused workaround macros (many of).
* Remove BOOST_STATIC_ASSERT usages.
* Minimize Boost::type_traits dependency (in favour of STL's type_traits).
Closes https://github.com/boostorg/iterator/pull/82 .
Squashed commit of the following:
commit 741a627b73
Author: Georgy Guminov <gogagum@gmail.com >
Date: Sat Jan 25 12:13:05 2025 +0300
Replace testers with standard metafunctions.
commit bf4cce6114
Author: Georgy Guminov <gogagum@gmail.com >
Date: Sat Jan 25 11:51:32 2025 +0300
Refactor is_lvalue_iterator.hpp.
commit 8d080c6c58
Author: Georgy Guminov <gogagum@gmail.com >
Date: Sat Jan 25 10:27:32 2025 +0300
Remove more workarounds.
commit 5a4ba24d36
Author: Georgy Guminov <gogagum@gmail.com >
Date: Sun Jan 19 16:38:30 2025 +0300
Fixes.
commit fdfafce2b9
Author: Georgy Guminov <gogagum@gmail.com >
Date: Sat Oct 26 15:06:43 2024 +0300
Remove BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
Correct static_assert messages.
Fix messages & replace is_standard_layout with is_copy_constructible.
commit c69ac1408a
Author: Georgy Guminov <gogagum@gmail.com >
Date: Sat Oct 26 14:48:51 2024 +0300
Correct static_assert messages.
commit b5df827151
Author: Georqy Guminov <gogagum@gmail.com >
Date: Sun Jun 23 16:12:29 2024 +0300
Fixes. Remove some Boost.MPL usages. Remove unused includes.
commit 01fd35e9f8
Author: Georgiy Guminov <gogagum@gmail.com >
Date: Wed Jun 12 17:14:21 2024 +0300
abstract conjunction.
commit c02def8acf
Author: Georgiy Guminov <gogagum@gmail.com >
Date: Wed Jun 12 16:35:43 2024 +0300
return addressof & conjunction.
commit 3b3d162575
Author: Georgiy Guminov <gogagum@gmail.com >
Date: Wed Jun 12 16:30:44 2024 +0300
Make macro more readable.
commit 4ab19e045f
Author: Georgiy Guminov <gogagum@gmail.com >
Date: Wed Jun 12 15:56:49 2024 +0300
Add static_assert messages.
commit 82b5c44cd3
Author: Georgiy Guminov <gogagum@gmail.com >
Date: Wed Jun 12 14:12:10 2024 +0300
Return is iterator CXX17 test.
commit 2d58d65462
Author: Georgiy Guminov <gogagum@gmail.com >
Date: Tue Jun 11 14:04:17 2024 +0300
Omitted.
commit a0d04d9491
Author: Georgiy Guminov <gogagum@gmail.com >
Date: Tue Jun 11 14:00:35 2024 +0300
Replace move with static_cast
commit 4a49b8a1a2
Author: Georgiy Guminov <gogagum@gmail.com >
Date: Mon Jun 10 21:38:53 2024 +0300
Return BOOST_NOEXCEPT
commit 054c013bba
Author: Georgiy Guminov <gogagum@gmail.com >
Date: Sun Jun 9 15:20:41 2024 +0300
CXX11
2025-01-26 15:21:16 +03:00
Andrey Semashev
4b40364d6d
Work around compilation errors on clang-10 through 12.
2024-10-11 01:04:21 +03:00
Georgiy Guminov
1ea8087623
Check for compliance with output_iterator in function_output_iterator_test.
2024-10-11 00:29:20 +03:00
René Ferdinand Rivera Morell
ce030ab2c3
Add support for modular build structure. ( #84 )
...
* Make the library modular usable.
* Switch to library requirements instead of source. As source puts extra source in install targets.
* Remove not-needed reference to Conversion dependency.
* Add missing b2 testing module import.
* Add requires-b2 check to top-level build file.
* Bump B2 require to 5.2
* Change all <source> references to <library>.
* Update copyright dates.
* Move inter-lib dependencies to a project variable and into the build targets.
* Update build deps.
2024-08-19 01:22:08 +03:00
Andrey Semashev
ae5d7d8c0c
Added a CMake test.
2023-11-17 17:47:20 +03:00
Andrey Semashev
a9dabd3c65
Removed dependency on Boost.Conversion in tests.
...
This reduces the minimum supported compilers versions.
2023-11-17 04:25:29 +03:00
Andrey Semashev
85b542e1b6
Extracted is_iterator trait to a separate header.
...
Also, reworked is_iterator to be more robust against various corner cases
and added dedicated tests for the type trait.
2023-05-21 15:18:54 +03:00
Alexander Grund
e8fbd92a61
Use BOOST_STATIC_ASSERT instead of BOOST_MPL_ASSERT ( #78 )
...
The MPL version is slower to compile and `BOOST_STATIC_ASSERT` is
already used in some places. So unify that.
This also fixes `Wzero-as-null-pointer-constant` warnings, see https://github.com/boostorg/mpl/pull/75
2023-05-07 15:23:16 +03:00
Andrey Semashev
7c9b4296a1
Fixed accessing members of the dereferenced value after iterator post-increment.
...
The recent commit 5777e9944b broke code such as
(*it++).foo(), where the result of dereferencing would be convertible to
the value type but did not provide the members of the value type. To mitigate
this, return a reference to the value instead of a proxy object. This will only
work for non-writable iterators (and it didn't work for writable iterators
before either) because in that case a proxy is needed to be able to intercept
operator=.
Also fix a similar issue with (it++)->foo() by adding operator-> overloads
to the post-increment result proxies.
Added tests for the fixes.
2022-11-18 00:46:21 +03:00
Andrey Semashev
0a95636faf
Added test for converting func_input_iter increment results to the iterator type.
2022-11-09 21:19:00 +03:00
Andrey Semashev
129245a985
Added tests for function_output_iterator.
2022-07-01 00:14:14 +03:00
Andrey Semashev
eb0d01126a
Added support for int128 to counting_iterator.
2022-01-13 16:59:46 +03:00
Andrey Semashev
abe6fbfd4b
Converted counting_iterator to rely on TypeTraits instead of MPL.
2022-01-13 16:57:52 +03:00
Andrey Semashev
1c6f85d4f9
Fixed a preprocessor condition.
2021-09-12 23:36:59 +03:00
Andrey Semashev
0a59f555ca
Added libc++ 12 to the list of standard libs implementing C++20 std::ostream_iterator.
2021-09-12 22:52:55 +03:00
Andrey Semashev
18337e990b
Disable zip_iterator test with std::tuple on gcc 4.4.
...
libstdc++ from gcc 4.4 has a broken std::tuple that fails to compile
a constructor from a compatible tuple:
/usr/include/c++/4.4/tuple: In constructor 'std::_Head_base<_Idx, _Head, false>::_Head_base(_UHead&&) [with _UHead = std::_Head_base<0ul, const int&, false>, long unsigned int _Idx = 0ul, _Head = int]':
/usr/include/c++/4.4/tuple:179: instantiated from 'std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _UElements ...>&&) [with _UElements = const int&, double&, long unsigned int _Idx = 0ul, _Head = int, _Tail = double]'
/usr/include/c++/4.4/tuple:338: instantiated from 'std::tuple<_T1, _T2>::tuple(std::tuple<_U1, _U2>&&) [with _U1 = const int&, _U2 = double&, _T1 = int, _T2 = double]'
libs/iterator/test/detail/zip_iterator_test_original.ipp:137: instantiated from here
/usr/include/c++/4.4/tuple:94: error: cannot convert 'std::_Head_base<0ul, const int&, false>' to 'int' in initialization
2021-09-12 22:40:19 +03:00
Glen Fernandes
f4b47fd266
Switch from deprecated test to Lightweight Test
2021-06-07 22:03:32 -04:00
Casey Carter
32f4f4d086
MSVC also has C++20 output_iterator
...
Tell iterator_traits_test not to fail on MSVC when `std::output_iterator` has `difference_type` of `std::ptrdiff_t`.
2020-10-13 19:23:49 -07:00
Andrey Semashev
72f0ebe8d0
Adjusted the check for C++20 on gcc 10.
...
The compiler defines __cplusplus to a non-standard value less than 202002
in C++20 mode.
2020-05-24 00:29:51 +03:00
Andrey Semashev
d7ad43a925
Updated to support C++20 ostream_iterator::difference_type on gcc 10.
2020-05-23 19:57:54 +03:00
Andrey Semashev
5b18ae976e
Updated code to use distance and iterator_traits from std.
2020-05-10 23:08:14 +03:00
Andrey Semashev
da8604615e
Removed the use of deprecated header boost/detail/iterator.hpp
2020-05-10 23:02:42 +03:00
Edward Diener
dc7bf5cc05
Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost config for the Embarcadero non-clang-based compilers.
2020-03-31 11:21:59 -04:00
Andrey Semashev
80ec58bb3b
Trim trailing spaces.
2020-03-04 01:06:45 +03:00
Andrey Semashev
c2929ea6c6
Updated to use boost/bind/bind.hpp to avoid warnings and compliance with C++20.
...
boost/bind.hpp emits warnings about deprecating global placeholder argument
keywords. C++20 removes std::bind1st/bind2nd, so replaced their usage with
boost::bind.
2020-03-04 01:02:52 +03:00
Andrey Semashev
4fe679bb0d
Updated lightweight_test.hpp includes to the new location.
2020-03-04 00:52:58 +03:00
Andrey Semashev
3cc4107d01
Added a test for compatibility of boost::distance between Range and Iterator.
...
This functionality is used in core Boost components, so it is preferable
to test it in Boost.Iterator, even if it's already tested in Boost.Range,
to discover problems as early as possible.
The test verifies that boost::distance implemented in Boost.Range can invoke
boost::distance in Boost.Iterator (i.e. the function lookup succeeds).
2018-09-23 12:37:21 +03:00
morinmorin
194087e8ca
Merge branch 'develop' into fix/unwanted_adl
2018-09-22 20:47:10 +09:00
morinmorin
b5edc8b64f
Add test for ADL issues.
2018-09-22 20:44:29 +09:00
Daniela Engert
e16f2de233
Inheriting std::iterator is deprecated in c++17.
...
Boost's iterator.hpp is deprecated, too. Therefore get rid of all of that and replace inheritance by lifting std::iterator's members into the derived class.
Signed-off-by: Daniela Engert <dani@ngrt.de >
2017-12-27 09:32:51 +01:00
Peter Dimov
0013c5c4f0
Skip zip_iterator_test_std_pair on g++ in C++03 mode
2017-12-24 04:56:47 +02:00
Peter Dimov
386dbf1054
Skip zip_iterator_test_std_pair on msvc-9.0 and below
2017-12-24 04:38:07 +02:00
Peter Dimov
adecfd94f3
Use lightweight_test in shared_iterator_test.cpp
2017-12-23 23:45:59 +02:00
Peter Dimov
affe7e6d84
Add shared_iterator_test to test/Jamfile
2017-12-23 23:45:33 +02:00
Peter Dimov
91b392a478
Move test files to test/
2017-12-23 22:05:35 +02:00
Peter Dimov
81faa161cf
Add #include <boost/next_prior.hpp>; no longer in utility.hpp
2017-12-02 04:04:32 +02:00
Andrey Semashev
e2f81e9b48
Silenced signed/unsigned mismatch warning.
2017-09-08 18:12:58 +03:00
Andrey Semashev
379200dfd1
Force result_of use decltype whenever possible to maximize testing of function input iterator with lambdas.
2017-09-08 18:12:02 +03:00
Andrey Semashev
a26314dfb9
Added a check for BOOST_RESULT_OF_USE_DECLTYPE in case if tests are run with forced use of decltype in result_of.
2017-09-07 18:51:36 +03:00
Andrey Semashev
e61592c553
Merge pull request #32 from morinmorin/clean_up_function_input_iterator
...
Clean up function_input_iterator
2017-09-07 18:46:07 +03:00
morinmorin
40da532a4d
Suppress signed-unsigned comparison warning.
2017-09-07 20:17:35 +09:00
morinmorin
7ce9f87954
Add more feature checks; lambda test needs decltype-based result_of.
2017-09-07 20:14:39 +09:00
morinmorin
479898d9d5
Remove unnecessary headers in test.
2017-09-06 19:41:24 +09:00
morinmorin
24d2f58f98
Use lightweight_test.hpp instead of <cassert>
2017-09-05 00:32:15 +09:00
Andrey Semashev
25a91d5981
Silenced gcc warnings about unused parameters.
2017-09-01 20:51:07 +03:00
Andrey Semashev
9b78dc1006
Replaced vector::data() with &v[0] for compatibility with older compilers that don't provide this function.
2017-08-30 17:09:19 +03:00
Andrey Semashev
c529399fb1
Reworked the test to avoid bogus warnings from gcc.
2017-08-27 17:48:47 +03:00