Commit 8dc2d39f authored by Chad Austin's avatar Chad Austin Committed by Facebook GitHub Bot

stop using deprecated std::iterator

Summary:
std::iterator was deprecated in C++17, so define the iterator trait
properties directly. This fixes warnings during compilation with Clang
on Windows.

Reviewed By: yfeldblum

Differential Revision: D23353495

fbshipit-source-id: 7c6c0b7fb175251260e5b519ce98bd679b6c99c4
parent db7a54ac
......@@ -412,13 +412,17 @@ struct BasePolicy
// BaseIter is a convenience for concrete set and map implementations
template <typename ValuePtr, typename Item>
class BaseIter : public std::iterator<
std::forward_iterator_tag,
std::remove_const_t<
typename std::pointer_traits<ValuePtr>::element_type>,
std::ptrdiff_t,
ValuePtr,
decltype(*std::declval<ValuePtr>())> {
class BaseIter {
private:
using pointee = typename std::pointer_traits<ValuePtr>::element_type;
public:
using iterator_category = std::forward_iterator_tag;
using value_type = std::remove_const_t<pointee>;
using difference_type = std::ptrdiff_t;
using pointer = ValuePtr;
using reference = pointee&;
protected:
using Chunk = F14Chunk<Item>;
using ChunkPtr =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment