From 8ef4ed1b2a0b28f27d35516cfb56a16c2583de0c Mon Sep 17 00:00:00 2001 From: Leon Scharnowski Date: Thu, 10 Mar 2022 23:29:52 +0100 Subject: 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 f82463d0c..21c2798e5 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() << 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()) { -- cgit v1.2.1