From: Orvid King Date: Wed, 29 Jul 2015 21:46:30 +0000 (-0700) Subject: Handle MSVC in FBString.h X-Git-Tag: v0.53.0~32 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1009fdcd8d20cf938ecc24ead4d9c477686284e5;p=folly.git Handle MSVC in FBString.h Summary: Specifically, MSVC doesn't define `std::__ostream_insert`, so just write to the stream instead. Closes #270 Reviewed By: @yfeldblum Differential Revision: D2283960 Pulled By: @sgolemon --- diff --git a/folly/FBString.h b/folly/FBString.h index 53ade9b7..4afce748 100644 --- a/folly/FBString.h +++ b/folly/FBString.h @@ -2370,6 +2370,9 @@ operator<<( os.setstate(std::ios_base::badbit | std::ios_base::failbit); } } +#elif defined(_MSC_VER) + // MSVC doesn't define __ostream_insert + os.write(str.data(), str.size()); #else std::__ostream_insert(os, str.data(), str.size()); #endif