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 ...@@ -412,13 +412,17 @@ struct BasePolicy
// BaseIter is a convenience for concrete set and map implementations // BaseIter is a convenience for concrete set and map implementations
template <typename ValuePtr, typename Item> template <typename ValuePtr, typename Item>
class BaseIter : public std::iterator< class BaseIter {
std::forward_iterator_tag, private:
std::remove_const_t< using pointee = typename std::pointer_traits<ValuePtr>::element_type;
typename std::pointer_traits<ValuePtr>::element_type>,
std::ptrdiff_t, public:
ValuePtr, using iterator_category = std::forward_iterator_tag;
decltype(*std::declval<ValuePtr>())> { using value_type = std::remove_const_t<pointee>;
using difference_type = std::ptrdiff_t;
using pointer = ValuePtr;
using reference = pointee&;
protected: protected:
using Chunk = F14Chunk<Item>; using Chunk = F14Chunk<Item>;
using ChunkPtr = 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