Add simple constructor for stateless slist_iterator

This commit is contained in:
Ion Gaztañaga
2022-05-04 22:55:24 +02:00
parent dbde900bf9
commit 1d6576e6d5

View File

@@ -65,10 +65,14 @@ class slist_iterator
BOOST_INTRUSIVE_FORCEINLINE slist_iterator()
{}
BOOST_INTRUSIVE_FORCEINLINE explicit slist_iterator(node_ptr nodeptr, const_value_traits_ptr traits_ptr)
BOOST_INTRUSIVE_FORCEINLINE slist_iterator(node_ptr nodeptr, const_value_traits_ptr traits_ptr)
: members_(nodeptr, traits_ptr)
{}
BOOST_INTRUSIVE_FORCEINLINE explicit slist_iterator(node_ptr nodeptr)
: members_(nodeptr, const_value_traits_ptr())
{ BOOST_STATIC_ASSERT((stateful_value_traits == false)); }
BOOST_INTRUSIVE_FORCEINLINE slist_iterator(const slist_iterator &other)
: members_(other.pointed_node(), other.get_value_traits())
{}