1127 Commits

Author SHA1 Message Date
Andrey Semashev
6428e552e4 Nonessential. 2025-04-23 02:55:50 +03:00
Andrey Semashev
766c881f9a Removed usage of obsolete ubuntu-20.04 GHA image. 2025-04-19 18:36:04 +03:00
Andrey Semashev
c2b846c57d Added a test for filter_iterator converting constructor. boost-1.88.0 2025-04-02 00:13:07 +03:00
Andrey Semashev
1a7996ebd0 Fixed compilation of filter_iterator conversion constructor.
The constructor would attempt to access a private member of the source
iterator, which could have a different type and therefore have that
member inaccessible. Also, the storage forwarding constructor had incorrect
types used in the forwarding expressions, which caused further compilation
errors.

Fixes https://github.com/boostorg/iterator/issues/90.
2025-04-02 00:09:36 +03:00
Andrey Semashev
eee670608e Revert "Added a workaround for the missing MPL includes in Range."
This reverts commit dfb1fd9bed90ff6279e4f65d9bcf24f25147a5d0.

The missing includes were added to Boost.Range, the workaround is
no longer needed.
boost-1.88.0.beta1
2025-02-07 14:10:12 +03:00
Andrey Semashev
c89e2b325a Removed use of std::unary_function from docs example. 2025-02-07 13:46:19 +03:00
Andrey Semashev
a7150173ed Moved shared_container_iterator.hpp in iterator directory, modernized code.
shared_container_iterator now uses std::shared_ptr to store the reference
to the container. boost::shared_ptr is still supported and is wrapped
into std::shared_ptr on construction, so there is overhead due to allocation
of std::shared_ptr state. Going forward, std::shared_ptr is expected
to be the primary use case. As a bonus, this eliminates the dependency
on Boost.SmartPtr.

Moved shared_container_iterator.hpp into the iterator directory and left
a forwarding header for backward compatibility.
2025-02-07 13:36:40 +03:00
Andrey Semashev
e446c6e05c Added indirect_reference_t alias. 2025-02-07 13:36:40 +03:00
Andrey Semashev
8998179e9d Added pointee_t alias. 2025-02-07 13:36:40 +03:00
Andrey Semashev
d35869cd25 Moved generator_iterator.hpp in iterator directory and modernized.
generator_iterator now uses decltype approach to deduce value and reference
types instead of the legacy result_type typedef, which was required to be
defined by the generator function.

The default constructor of generator_iterator now value initializes its
data members to avoid using uninitialized data.
2025-02-07 13:36:33 +03:00
Andrey Semashev
6e6def930f Modernized transform_iterator.hpp, use EBO to store the transform function. 2025-02-07 01:17:55 +03:00
Andrey Semashev
1a58ca89d1 Reformatted reverse_iterator.hpp. 2025-02-07 01:17:55 +03:00
Andrey Semashev
34f703cfb6 Removed workarounds for older compilers from permutation_iterator.hpp. 2025-02-07 01:17:55 +03:00
Andrey Semashev
a91fc06bb4 Prohibit default construction of function_output_iterator on function pointers.
Default-constructed function_output_iterator with function pointers is unusable
and previously would have contained an uninitialized function pointer.
Disable the default constructor using SFINAE to prevent misuse.

Also reformat code.
2025-02-07 01:17:55 +03:00
Andrey Semashev
fd1445140f Removed usage of FunctionTypes in function_input_iterator.hpp.
This effectively removes usage of MPL in function_input_iterator.hpp and
also simplifies implementation.
2025-02-07 01:17:50 +03:00
Andrey Semashev
8c2fdf6053 Use variadic template expansion in min category deduction in zip_iterator.
This results in marginally faster compile times in modern code bases
where tuples are variadic.
2025-02-06 01:47:49 +03:00
Andrey Semashev
aadd90df45 Removed direct usage of MPL from zip_iterator.hpp.
MPL is still used through Boost.Fusion, but that is a matter of
optimizing Boost.Fusion now.
2025-02-06 01:47:49 +03:00
Andrey Semashev
dc57bcf319 Modernized filter_iterator.hpp.
Use EBO to minimize wasted storage space if the predicate is an empty class.

Disable default constructing non-class predicates using SFINAE instead
of a static_assert. This will help type traits like is_constructible,
when applied to the iterator type.
2025-02-06 01:47:49 +03:00
Andrey Semashev
baf6d06cc2 Modernized iterator_traits.hpp.
Added *_t type traits and removed an oudated macro that was used with
ancient compilers.
2025-02-06 01:47:49 +03:00
Andrey Semashev
6e60ea7a88 Extracted and unified default template parameter handling helpers.
The new eval_if_default helper replaces both ia_dflt_help and
ia_eval_if_default helpers. Additionally, added a new if_default
helper, which expands to the type or the default parameter directly.

The new helpers are placed in separate headers which can be used
without the iterator_adaptor template.
2025-02-06 01:47:43 +03:00
Andrey Semashev
cb81a1dfc3 Extracted enable_if_convertible trait to a separate header.
Keep including the new header in iterator_adaptor.hpp for backward
compatibility, until downstream users are updated to include the new
header.
2025-02-06 01:38:24 +03:00
Andrey Semashev
c22af90b60 Reformat advance.hpp and distance.hpp. 2025-02-06 01:38:24 +03:00
Andrey Semashev
b6a41e325c Added a missing include in interoperable.hpp. 2025-02-06 01:38:24 +03:00
Andrey Semashev
0c2eda4bb8 Removed MPL usage from indirect_iterator.hpp. 2025-02-06 01:38:16 +03:00
Andrey Semashev
dfb1fd9bed Added a workaround for the missing MPL includes in Range.
This is a temporary workaround until Boost.Range is fixed by:

https://github.com/boostorg/range/pull/154
2025-02-05 18:51:44 +03:00
Andrey Semashev
b12874b6ca Removed MPL usage from iterator_facade.hpp. 2025-02-05 18:51:44 +03:00
Andrey Semashev
1875d95019 Removed MPL usage from iterator_adaptor.hpp. 2025-02-05 18:51:44 +03:00
Andrey Semashev
4f5f61e37b Slightly optimized iterator_facade_default_category compilation speed. 2025-02-05 18:51:44 +03:00
Andrey Semashev
5aa1c9fef3 Removed workarounds for older compilers from is_readable_iterator.hpp. 2025-02-05 18:51:44 +03:00
Andrey Semashev
d6a68dc6eb Removed workarounds for older compilers from counting_iterator.hpp. 2025-02-05 18:51:44 +03:00
Andrey Semashev
e5ee9a6168 Removed unneeded include. 2025-02-05 18:51:44 +03:00
Andrey Semashev
82703b7c14 Moved input_output_iterator_tag to unit tests.
The class was not used anywhere else and was an implementation detail.
2025-02-05 18:51:44 +03:00
Andrey Semashev
d8ce9ddfc7 Removed MPL usage from facade_iterator_category.hpp. 2025-02-05 18:51:44 +03:00
Andrey Semashev
5f713e9b14 Use std::type_identity when possible in counting_iterator.hpp. 2025-02-05 18:51:44 +03:00
Andrey Semashev
12ee53d441 Added type_identity forwarding header. 2025-02-05 18:51:44 +03:00
Andrey Semashev
ef40faf620 Replaced leftover boost::true/false_type with std in counting_iterator.hpp.
Also made (unsigned) long long support mandatory.
2025-02-05 18:51:44 +03:00
Andrey Semashev
fc99b7a15d Added missing includes for use_default. 2025-02-05 18:51:44 +03:00
Andrey Semashev
241c28018e Converted leftover boost::true/false_type to std in iterator_facade.hpp. 2025-02-05 18:51:44 +03:00
Andrey Semashev
83905b219e Reduced dependency on MPL in iterator_categories.hpp.
Also simplified implementation of type traits using Boost.MP11.
2025-02-05 18:51:44 +03:00
Andrey Semashev
6fab3bbfa4 Removed dependency on MPL from is_lvalue_iterator.hpp.
Also removed workarounds for older compilers and simplified implementation.
2025-02-05 18:51:44 +03:00
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
b30cbf634c Reduced dependency on MPL in minimum_category.hpp. 2025-01-26 20:00:53 +03:00
Andrey Semashev
7ddbf15868 Removed MPL usage from iterator_archetypes.hpp. 2025-01-26 19:08:40 +03:00
Andrey Semashev
4fc0165034 Removed support for ancient complilers for MPL lambdas in is_readable_iterator. 2025-01-26 17:58:48 +03:00
Andrey Semashev
bcf94f9e5d Removed MPL usage from pointee and indirect_reference. 2025-01-26 17:57:47 +03:00
Andrey Semashev
d6297a553b Removed the BOOST_ITERATOR_CONVERTIBLE helper macro. 2025-01-26 15:55:52 +03:00
Andrey Semashev
32d19a72e1 Trim trailing spaces. 2025-01-26 15:45:03 +03:00
Andrey Semashev
cf43da4286 Removed useless #if 1. 2025-01-26 15:42:30 +03:00
Andrey Semashev
10e89b3e4c Restored brace formatting in new_iterator_tests.hpp. 2025-01-26 15:25:28 +03:00
Andrey Semashev
5ed3144969 Restored the original static assert check. 2025-01-26 15:22:53 +03:00