Explicitly initialize the base class of LogStream
authorChristopher Dykes <cdykes@fb.com>
Thu, 15 Jun 2017 23:51:24 +0000 (16:51 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 16 Jun 2017 00:05:33 +0000 (17:05 -0700)
Summary:
The standard does not define that `std::ostream` should have a default constructor, so this was invalid and was an error on Windows.
This explicitly initializes the base class by passing a `nullptr`.

Reviewed By: simpkins

Differential Revision: D5259690

fbshipit-source-id: b8914d73ff2682e1a4447b8338860259778b2247

folly/experimental/logging/LogStream.cpp

index 947d76d..3bf4acf 100644 (file)
@@ -46,7 +46,7 @@ LogStreamBuffer::int_type LogStreamBuffer::overflow(int_type ch) {
   }
 }
 
-LogStream::LogStream() {
+LogStream::LogStream() : std::ostream(nullptr) {
   rdbuf(&buffer_);
 }