Better support for folly::Range with non-const iterators underneath
authorTudor Bosman <tudorb@fb.com>
Thu, 20 Feb 2014 21:20:00 +0000 (13:20 -0800)
committerDave Watson <davejwatson@fb.com>
Fri, 21 Feb 2014 21:40:49 +0000 (13:40 -0800)
commitc18d575d269443232bdfd116349d9fc450e17b9c
tree0ba4d3175e6269e69959ae72573e6cd6a9b4d2a1
parentc2ed0facc9f626aad63ea68231b28a330bd9d9e5
Better support for folly::Range with non-const iterators underneath

Summary:
Implicitly construct Range<To> from Range<From> if From is implicitly
convertible to To.

Explicitly construct Range<To> from Range<From> if To is (explicitly)
constructible from From.

Add special-cases for Range<char*>, Range<unsigned char*> similar to the
ones for Range<const char*>, Range<const unsigned char*>.

Test Plan: test added

Reviewed By: philipp@fb.com

FB internal diff: D1182999
folly/Range.h
folly/test/RangeTest.cpp