@ -5,6 +5,7 @@
# define LIBPEPDATATYPES_WRAPPER_HH
# include <initializer_list>
# include <iterator>
namespace pEp
{
@ -129,14 +130,15 @@ public:
static Element T : : * const Value ; // to access the current value
// does not own the *value
class iterator
class iterator : public std : : iterator < std : : forward_iterator_tag , Element , ptrdiff_t >
{
public :
iterator ( ) = default ;
iterator operator + + ( ) { return ( value ? value = value - > next : value ) ; }
Element operator * ( ) { return value - > * LW : : Value ; }
Element operator - > ( ) { return ( value - > * LW : : Value ) ; }
iterator operator + + ( ) { return ( value ? value = value - > next : value ) ; }
Element operator * ( ) { return value - > * LW : : Value ; }
Element operator - > ( ) { return value - > * LW : : Value ; }
bool operator = = ( const iterator & other ) const { return value = = other . value ; }
bool operator ! = ( const iterator & other ) const { return value ! = other . value ; }