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.
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.
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.
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.
* 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.
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
The recent commit 5777e9944bf275e7e19e72e88819ec06fea670c3 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.
boost/bind.hpp emits warnings about deprecating global placeholder argument
keywords. C++20 removes std::bind1st/bind2nd, so replaced their usage with
boost::bind.
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).
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>