Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/cpp/src/thrift/Thrift.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@
namespace apache {
namespace thrift {

class TEnumIterator
: public std::iterator<std::forward_iterator_tag, std::pair<int, const char*> > {
class TEnumIterator {
public:
using iterator_category = std::forward_iterator_tag;
using value_type = std::pair<int, const char*>;

TEnumIterator(int n, int* enums, const char** names)
: ii_(0), n_(n), enums_(enums), names_(names) {}

Expand Down
5 changes: 4 additions & 1 deletion lib/cpp/src/thrift/transport/TSocketUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ struct AddressResolutionHelper {
public:
using PtrOwnedList = std::unique_ptr<addrinfo, addrinfo_deleter>;

struct Iter : std::iterator<std::forward_iterator_tag, const addrinfo*> {
struct Iter {
using iterator_category = std::forward_iterator_tag;
using value_type = const addrinfo*;

value_type ptr = nullptr;

Iter() = default;
Expand Down
Loading