workaround MSVC compiler bug
Client: cpp
diff --git a/compiler/cpp/src/thrift/generate/t_generator.h b/compiler/cpp/src/thrift/generate/t_generator.h
index f82463d..21c2798 100644
--- a/compiler/cpp/src/thrift/generate/t_generator.h
+++ b/compiler/cpp/src/thrift/generate/t_generator.h
@@ -419,7 +419,9 @@
     old_file.open(output_file_path.c_str(), std::ios::in);
 
     if (old_file) {
-      std::string const old_file_contents(static_cast<std::ostringstream const&>(std::ostringstream() << old_file.rdbuf()).str());
+      std::ostringstream oss;
+      oss << old_file.rdbuf();
+      std::string const old_file_contents(oss.str());
       old_file.close();
 
       if (old_file_contents != str()) {