mirror of
https://github.com/boostorg/iterator.git
synced 2025-05-09 23:23:54 +00:00
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.
This commit is contained in:
parent
eee670608e
commit
1a7996ebd0
@ -46,6 +46,9 @@ class filter_iterator :
|
||||
{
|
||||
friend class iterator_core_access;
|
||||
|
||||
template< typename, typename >
|
||||
friend class filter_iterator;
|
||||
|
||||
private:
|
||||
using super_t = detail::filter_iterator_base_t< Predicate, Iterator >;
|
||||
|
||||
@ -75,7 +78,7 @@ private:
|
||||
|
||||
template< typename Pred, typename Iter >
|
||||
storage(Pred&& pred, Iter&& end) :
|
||||
predicate_base(boost::empty_init_t{}, static_cast< Predicate&& >(pred)), m_end(static_cast< Iterator&& >(end))
|
||||
predicate_base(boost::empty_init_t{}, static_cast< Pred&& >(pred)), m_end(static_cast< Iter&& >(end))
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user