Commit ee8d0a53 authored by Pranjal Raihan's avatar Pranjal Raihan Committed by Facebook GitHub Bot

Make ThreadLocalPtr::Accessor::Iterator default construct as singular

Reviewed By: yfeldblum, mshneer

Differential Revision: D29578762

fbshipit-source-id: 2aa9af8f68825997db8b71fc97dda5477fa57413
parent af7df254
......@@ -253,8 +253,8 @@ class ThreadLocalPtr {
// The iterators obtained from Accessor are bidirectional iterators.
class Iterator {
friend class Accessor;
const Accessor* accessor_;
threadlocal_detail::ThreadEntryNode* e_;
const Accessor* accessor_{nullptr};
threadlocal_detail::ThreadEntryNode* e_{nullptr};
void increment() {
e_ = e_->getNext();
......@@ -311,6 +311,8 @@ class ThreadLocalPtr {
using pointer = T const*;
using iterator_category = std::bidirectional_iterator_tag;
Iterator() = default;
Iterator& operator++() {
increment();
return *this;
......
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