Mercurial > octave
comparison libinterp/corefcn/oct-stream.h @ 32776:8de10f0e1ded
maint: Merge stable to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Thu, 18 Jan 2024 19:29:12 +0100 |
parents | 2ff4e63bdd18 0983439079bc |
children |
comparison
equal
deleted
inserted
replaced
32773:33e36b56656e | 32776:8de10f0e1ded |
---|---|
125 | 125 |
126 // wrap the output stream with encoding conversion facet | 126 // wrap the output stream with encoding conversion facet |
127 std::ostream *os = output_stream (); | 127 std::ostream *os = output_stream (); |
128 if (os && *os) | 128 if (os && *os) |
129 { | 129 { |
130 // FIXME: Using std::make_unique could simplify the following | |
131 // expressions once we require C++14. | |
130 m_converter | 132 m_converter |
131 = std::make_unique<std::wbuffer_convert<convfacet_u8, char>> | 133 = std::unique_ptr<std::wbuffer_convert<convfacet_u8, char>> |
132 (os->rdbuf (), new convfacet_u8 (m_encoding)); | 134 (new std::wbuffer_convert<convfacet_u8, char> |
133 m_conv_ostream = std::make_unique<std::ostream> (m_converter.get ()); | 135 (os->rdbuf (), new convfacet_u8 (m_encoding))); |
136 m_conv_ostream = std::unique_ptr<std::ostream> | |
137 (new std::ostream (m_converter.get ())); | |
134 } | 138 } |
135 | 139 |
136 return (m_conv_ostream ? m_conv_ostream.get () : output_stream ()); | 140 return (m_conv_ostream ? m_conv_ostream.get () : output_stream ()); |
137 } | 141 } |
138 | 142 |