Skip to content

Commit

Permalink
no need for move-iterator in DynamicConverter
Browse files Browse the repository at this point in the history
Summary: There are some odd interactions with `boost::iterator_adaptor`.

Differential Revision: D34729880

fbshipit-source-id: 9a791410df0e2c3a9b61b0a94556346c9210664c
  • Loading branch information
yfeldblum authored and facebook-github-bot committed Mar 9, 2022
1 parent aace9fe commit ca8bb53
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions folly/DynamicConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,14 @@ class Transformer

public:
explicit Transformer(const It& it) : Transformer::iterator_adaptor_(it) {}

ttype&& operator*() const { return std::move(dereference()); }
};

// conversion factory
template <typename T, typename It>
inline std::move_iterator<Transformer<T, It>> conversionIterator(const It& it) {
return std::make_move_iterator(Transformer<T, It>(it));
inline Transformer<T, It> conversionIterator(const It& it) {
return Transformer<T, It>(it);
}

} // namespace dynamicconverter_detail
Expand Down

0 comments on commit ca8bb53

Please sign in to comment.