Skip to content
Browse files

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
  • Loading branch information...
1 parent 51ef8c7 commit 8508742ea60336ea43d7d762f525ae17ca6f8de0 @tudor tudor committed Jul 12, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 folly/Range.h
View
7 folly/Range.h
@@ -188,9 +188,10 @@ class Range : private boost::totally_ordered<Range<Iter> > {
// 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())) {
}

0 comments on commit 8508742

Please sign in to comment.
Something went wrong with that request. Please try again.