Commit d50ff184 authored by Jordan DeLong's avatar Jordan DeLong

Remove a bit of debug code in folly::Range

Summary:
Seems like we can drop this, as the case that motivated
adding it wouldn't have been caught by it.

Test Plan: Compiled folly/test.

Reviewed By: tudorb@fb.com

FB internal diff: D684200
parent a60c8646
......@@ -127,26 +127,9 @@ public:
Range() : b_(), e_() {
}
private:
static bool reachable(Iter b, Iter e, std::forward_iterator_tag) {
for (; b != e; ++b) {
LOG_EVERY_N(INFO, 100000) << __FILE__ ":" << __LINE__
<< " running reachability test ("
<< google::COUNTER << " iterations)...";
}
return true;
}
static bool reachable(Iter b, Iter e, std::random_access_iterator_tag) {
return b <= e;
}
public:
// Works for all iterators
Range(Iter start, Iter end)
: b_(start), e_(end) {
assert(reachable(b_, e_,
typename std::iterator_traits<Iter>::iterator_category()));
Range(Iter start, Iter end) : b_(start), e_(end) {
}
// Works only for random-access iterators
......
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