Disable implicit conversions from std::string for non-char* Range
Summary:
`Range<Iter>` has an implicit constructors from strings for any
`Iter`, however such constructors are invalid (compilation fails)
if `Iter` is not `[const] char *`.
This can be an issue for overload resolution: for example
struct IsString {
bool operator()(folly::Range<int*>) { return false; }
bool operator()(folly::StringPiece) { return true; }
};
IsString()(std::string());
fails to compile because the overload is ambiguous, even if the
conversion to `ByteRange` is invalid.
This patch disables all the invalid constructors from
`[const] char*`, `std::string`, and `fbstring`.
Test Plan:
fbconfig -r folly && fbmake runtests_opt
Reviewed By: philipp@fb.com
Subscribers: folly-diffs@
FB internal diff:
D1746899
Signature: t1:
1746899:
1418868361:
50784c4993df0bd96eeb62c09c659d5e53964d9b