Summary:
Complains about
```
In file included from crypto/lib/cpp/CryptoException.cpp:1:
In file included from crypto/lib/cpp/CryptoException.h:5:
In file included from ./folly/Conv.h:30:
./folly/Range.h:573:19: error: redefinition of default argument
Comp eq = Comp()) {
^ ~~~~~~
./folly/Range.h:55:26: note: previous definition is here
Comp eq = Comp());
^ ~~~~~~
```
Redefinition of default arguments is not allowed in C++.
Test Plan:
```
fbconfig --clang admarket/adpublisher && fbmake dbg
```
contbuild, etc.
Reviewed By: lucian@fb.com
FB internal diff:
D910800
/**
* Finds substrings faster than brute force by borrowing from Boyer-Moore
*/
-template <class T, class Comp = std::equal_to<typename Range<T>::value_type>>
+template <class T, class Comp>
size_t qfind(const Range<T>& haystack,
const Range<T>& needle,
- Comp eq = Comp()) {
+ Comp eq) {
// Don't use std::search, use a Boyer-Moore-like trick by comparing
// the last characters first
auto const nsize = needle.size();