From: Tudor Bosman <tudorb@fb.com> Date: Fri, 13 Jul 2012 03:18:29 +0000 (-0700) Subject: Unbreak build. X-Git-Tag: v0.22.0~1241 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8508742ea60336ea43d7d762f525ae17ca6f8de0;p=folly.git Unbreak build. Summary: I could have sworn I undid that un-templatification of the constructor. Test Plan: build folly/test Reviewed By: andrei.alexandrescu@fb.com FB internal diff: D518981 --- diff --git a/folly/Range.h b/folly/Range.h index 9ddf0452..65b7441d 100644 --- a/folly/Range.h +++ b/folly/Range.h @@ -188,9 +188,10 @@ public: // Allow implicit conversion from Range<const char*> (aka StringPiece) to // Range<const unsigned char*> (aka ByteRange), as they're both frequently // used to represent ranges of bytes. - template <typename std::enable_if< - (std::is_same<Iter, const unsigned char*>::value), int>::type = 0> - /* implicit */ Range(const Range<const char*>& other) + template <class OtherIter, typename std::enable_if< + (std::is_same<Iter, const unsigned char*>::value && + std::is_same<OtherIter, const char*>::value), int>::type = 0> + /* implicit */ Range(const Range<OtherIter>& other) : b_(reinterpret_cast<const unsigned char*>(other.begin())), e_(reinterpret_cast<const unsigned char*>(other.end())) { }