This is an automated email from the ASF dual-hosted git repository.
jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new 8ef4ed1 workaround MSVC compiler bug Client: cpp
8ef4ed1 is described below
commit 8ef4ed1b2a0b28f27d35516cfb56a16c2583de0c
Author: Leon Scharnowski <[email protected]>
AuthorDate: Thu Mar 10 23:29:52 2022 +0100
workaround MSVC compiler bug
Client: cpp
---
compiler/cpp/src/thrift/generate/t_generator.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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 @@ public:
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()) {