This can be fixed by adding
namespace std
{
template<typename Element>
struct iterator_traits<::mapbox::eternal::iterator<Element>>
{
using difference_type = std::size_t;
using value_type = Element;
using pointer = value_type*;
using reference = value_type&;
using iterator_category = std::bidirectional_iterator_tag;
};
} // namespace std
or by adding the typedefs to the type directly.
Note that difference_type should probably be std::ptrdiff_t and not std::size_t, and thus the return type of operator-() should be adapted.
This can be fixed by adding
or by adding the typedefs to the type directly.
Note that
difference_typeshould probably bestd::ptrdiff_tand notstd::size_t, and thus the return type ofoperator-()should be adapted.