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