1138 Commits

Author SHA1 Message Date
2a0b753691 Use Azure mirrors of Ubuntu .deb repositories in containers.
This reduces the likelihood of spurious CI failures caused by DDoS filters
being triggered by massive numbers of concurrent CI jobs.
2025-06-13 03:48:03 +03:00
0087a426d9 Added new gcc and clang jobs to GitHub Actions. 2025-06-13 03:47:38 +03:00
c409288ff5 Removed windows-2019 GitHub Actions jobs.
The windows-2019 image is deprecated and is about to be removed.
2025-06-13 03:45:12 +03:00
01ac4e1a47 Disable operator_brackets_proxy assignment if reference is not assignable.
Use SFINAE to disable operator_brackets_proxy assignment operator is reference
is not assignable from the assignment argument. Also fix the iterator type
in std::declval in noexcept specification.
2025-06-09 12:01:39 +03:00
e968c3312b Forward dereferencing operators in operator_brackets_proxy.
This allows for expressions like it[n]->foo() and (*it[n]).foo() to compile.
2025-06-09 04:58:45 +03:00
da00617e56 Use perfect forwarding in assignment to operator_brackets_proxy.
Also apply noexcept markup to all of the proxy operators.
2025-06-09 04:58:27 +03:00
7c77e52509 Always use operator_brackets_proxy in iterator_facade.
This avoids returning a copy of the value from operator[], which can
be unexpected by users wanting to obtain an address of the value
referenced by the iterator.

We still want to return a proxy instead of the iterator's reference
since the iterator may be holding the value internally, and the iterator
gets destroyed after returning from operator[], so the returned
reference would be dangling.

Closes https://github.com/boostorg/iterator/issues/61.
2025-06-09 03:22:08 +03:00
256004a446 Remove gcc 4.8 and 4.9 GitHub Actions jobs.
These compilers don't provide std::is_trivially_copyable type trait,
which is now required.
2025-06-09 02:53:18 +03:00
7e3e9a584e Replace is_copy_constructible+is_trivial with is_trivially_copyable.
For the purpose of selecting operator[] result type, we don't care
whether the value type is trivially default-constructible. So, in order
to avoid using the deprecated in C++26 is_trivial, use is_trivially_copyable
instead of is_copy_constructible+is_trivial.

Closes https://github.com/boostorg/iterator/issues/93.
2025-06-09 02:36:26 +03:00
3767696513 Removed legacy MinGW32 AppVeyor CI job.
Boost.Regex develop no longer builds on legacy MinGW32 due to missing
definitions of std::mutex etc.
2025-05-25 03:57:17 +03:00
1372e9afb6 Fix filter_iterator copy/converting constructor.
The constructed iterator would have an invalid end iterator because of
a typo in storage initialization.

Fixes https://github.com/boostorg/iterator/issues/92.
2025-05-24 23:19:45 +03:00
6428e552e4 Nonessential. 2025-04-23 02:55:50 +03:00
766c881f9a Removed usage of obsolete ubuntu-20.04 GHA image. 2025-04-19 18:36:04 +03:00
c2b846c57d Added a test for filter_iterator converting constructor. boost-1.88.0 2025-04-02 00:13:07 +03:00
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
eee670608e Revert "Added a workaround for the missing MPL includes in Range."
This reverts commit dfb1fd9bed.

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
c89e2b325a Removed use of std::unary_function from docs example. 2025-02-07 13:46:19 +03:00
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
e446c6e05c Added indirect_reference_t alias. 2025-02-07 13:36:40 +03:00
8998179e9d Added pointee_t alias. 2025-02-07 13:36:40 +03:00
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
6e6def930f Modernized transform_iterator.hpp, use EBO to store the transform function. 2025-02-07 01:17:55 +03:00
1a58ca89d1 Reformatted reverse_iterator.hpp. 2025-02-07 01:17:55 +03:00
34f703cfb6 Removed workarounds for older compilers from permutation_iterator.hpp. 2025-02-07 01:17:55 +03:00
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
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
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
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
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
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
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
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
c22af90b60 Reformat advance.hpp and distance.hpp. 2025-02-06 01:38:24 +03:00
b6a41e325c Added a missing include in interoperable.hpp. 2025-02-06 01:38:24 +03:00
0c2eda4bb8 Removed MPL usage from indirect_iterator.hpp. 2025-02-06 01:38:16 +03:00
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
b12874b6ca Removed MPL usage from iterator_facade.hpp. 2025-02-05 18:51:44 +03:00
1875d95019 Removed MPL usage from iterator_adaptor.hpp. 2025-02-05 18:51:44 +03:00
4f5f61e37b Slightly optimized iterator_facade_default_category compilation speed. 2025-02-05 18:51:44 +03:00
5aa1c9fef3 Removed workarounds for older compilers from is_readable_iterator.hpp. 2025-02-05 18:51:44 +03:00
d6a68dc6eb Removed workarounds for older compilers from counting_iterator.hpp. 2025-02-05 18:51:44 +03:00
e5ee9a6168 Removed unneeded include. 2025-02-05 18:51:44 +03:00
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
d8ce9ddfc7 Removed MPL usage from facade_iterator_category.hpp. 2025-02-05 18:51:44 +03:00
5f713e9b14 Use std::type_identity when possible in counting_iterator.hpp. 2025-02-05 18:51:44 +03:00
12ee53d441 Added type_identity forwarding header. 2025-02-05 18:51:44 +03:00
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
fc99b7a15d Added missing includes for use_default. 2025-02-05 18:51:44 +03:00
241c28018e Converted leftover boost::true/false_type to std in iterator_facade.hpp. 2025-02-05 18:51:44 +03:00
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