Fix StringPiece ostream overloads to properly not rely on <ostream>
authorAndrew Krieger <andrew.krieger@oculus.com>
Fri, 28 Jul 2017 15:20:06 +0000 (08:20 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 28 Jul 2017 15:27:19 +0000 (08:27 -0700)
commitcd2511afa674f917cbfe39fc8ea4cc7838184720
tree37188350c6a4a2c09cd9bae748333b2b87420d80
parent8dde913d5369b884adc95dac86f825facc8d5244
Fix StringPiece ostream overloads to properly not rely on <ostream>

Summary:
std::ostream may be incomplete because Range.h doesn't use <ostream>,
only <iosfwd>. Changing the operator<< overloads to be templated on the char
type defers typechecking until callsites, which will avoid the potential problem.

Reviewed By: yfeldblum, ericniebler

Differential Revision: D5494648

fbshipit-source-id: e59b6fdfba6c08ec70ebb1e10c14a43307a1119f
folly/Range.h