From 48ad3452ba965b4071428b531a724e14b7573ed2 Mon Sep 17 00:00:00 2001 From: Artem Yarulin Date: Thu, 8 Aug 2024 17:57:58 +0300 Subject: [PATCH] Fix compilation Fixed error ``` error: field 'streambuf' will be initialized after base 'std::basic_iostream' [-Werror,-Wreorder-ctor] streambuf(RustStreamBuffer(buf)), std::basic_iostream(&streambuf) { } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ std::basic_iostream(&streambuf) streambuf(RustStreamBuffer(buf)) 1 error generated. ``` Signed-off-by: Artem Yarulin --- bindgen/src/bindings/cpp/templates/rust_buf_stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindgen/src/bindings/cpp/templates/rust_buf_stream.cpp b/bindgen/src/bindings/cpp/templates/rust_buf_stream.cpp index 2538b7e..194c5d7 100644 --- a/bindgen/src/bindings/cpp/templates/rust_buf_stream.cpp +++ b/bindgen/src/bindings/cpp/templates/rust_buf_stream.cpp @@ -17,7 +17,7 @@ struct RustStreamBuffer: std::basic_streambuf { struct RustStream: std::basic_iostream { RustStream(RustBuffer *buf): - streambuf(RustStreamBuffer(buf)), std::basic_iostream(&streambuf) { } + std::basic_iostream(&streambuf), streambuf(RustStreamBuffer(buf)) { } template >> RustStream &operator>>(T &val) {