You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Kartik S (Jira)" <ji...@apache.org> on 2021/02/03 00:16:00 UTC

[jira] [Created] (AVRO-3034) [avro-cpp] avro::ostreamOutputStream doesn't flush the ostream object

Kartik S created AVRO-3034:
------------------------------

             Summary: [avro-cpp] avro::ostreamOutputStream doesn't flush the ostream object
                 Key: AVRO-3034
                 URL: https://issues.apache.org/jira/browse/AVRO-3034
             Project: Apache Avro
          Issue Type: Bug
            Reporter: Kartik S


{code:java}
auto avro_os = ::avro::ostreamOutputStream(*os);
::avro::EncoderPtr encoder = ::avro::binaryEncoder();
encoder->init(*avro_os);
....{code}
{code:java}
encoder->flush();{code}
When the above code is compiled with clang-10.0.0 (c++), ostreamOutputStream doesn't flush the ostream object (os) when encoder->flush() is invoked. To get around this I had to explicitly invoke the destructor using a block:


{code:java}
{
  std::ofstream out(filename);
  ....
}{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)