From af705b3203c08442bf6743bf03e4b2fe30eeee9c Mon Sep 17 00:00:00 2001 From: Andrew Tulloch Date: Thu, 1 Aug 2013 14:26:12 -0700 Subject: [PATCH] Fix build break for Clang builds. 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 --- folly/Range.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/Range.h b/folly/Range.h index b0834b8b..107bdb00 100644 --- a/folly/Range.h +++ b/folly/Range.h @@ -567,10 +567,10 @@ struct StringPieceHash { /** * Finds substrings faster than brute force by borrowing from Boyer-Moore */ -template ::value_type>> +template size_t qfind(const Range& haystack, const Range& 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(); -- 2.34.1