Remove a bit of debug code in folly::Range
authorJordan DeLong <jdelong@fb.com>
Sun, 20 Jan 2013 20:18:07 +0000 (12:18 -0800)
committerJordan DeLong <jdelong@fb.com>
Mon, 4 Feb 2013 17:26:01 +0000 (09:26 -0800)
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

folly/Range.h

index d69d335ec9c504eccd4ef05afb6f6b295d37dcbf..a65cab62ab76b5e4c9f64129f15c069e886d468e 100644 (file)
@@ -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