From fa664ed95dbf1ae9bf159793c3d40fae6bc76a63 Mon Sep 17 00:00:00 2001 From: Andrew Gallagher Date: Mon, 5 Aug 2013 16:42:39 -0700 Subject: [PATCH] Revert "[clang support] removed superfluous declarations from header files" Summary: This reverts commit 49b197dfd02443e958906bac45059cea460e4e10. Test Plan: contbuild Reviewed By: akhilravidas@fb.com FB internal diff: D915386 @override-unit-failures --- folly/Range.h | 16 ++++++++++++---- folly/dynamic.h | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/folly/Range.h b/folly/Range.h index 94a3d825..107bdb00 100644 --- a/folly/Range.h +++ b/folly/Range.h @@ -43,6 +43,17 @@ namespace folly { template class Range; +/** + * Finds the first occurrence of needle in haystack. The algorithm is on + * average faster than O(haystack.size() * needle.size()) but not as fast + * as Boyer-Moore. On the upside, it does not do any upfront + * preprocessing and does not allocate memory. + */ +template ::value_type>> +inline size_t qfind(const Range & haystack, + const Range & needle, + Comp eq = Comp()); + /** * Finds the first occurrence of needle in haystack. The result is the * offset reported to the beginning of haystack, or string::npos if @@ -554,10 +565,7 @@ struct StringPieceHash { }; /** - * Finds the first occurrence of needle in haystack. The algorithm is on - * average faster than O(haystack.size() * needle.size()) but not as fast - * as Boyer-Moore. On the upside, it does not do any upfront - * preprocessing and does not allocate memory. + * Finds substrings faster than brute force by borrowing from Boyer-Moore */ template size_t qfind(const Range& haystack, diff --git a/folly/dynamic.h b/folly/dynamic.h index 6334cf2a..6ab5ca1b 100644 --- a/folly/dynamic.h +++ b/folly/dynamic.h @@ -443,6 +443,7 @@ public: private: friend struct TypeError; struct ObjectImpl; + struct ObjectMaker; template struct TypeInfo; template struct CompareOp; template struct GetAddrImpl; -- 2.34.1