aboutsummaryrefslogtreecommitdiff
path: root/butl/fdstream.ixx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-04-19 02:34:14 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-19 04:18:53 +0200
commitec76db9e858357686885cd078e39350f66adcc9f (patch)
treed8f4d6b942782cac1764ba2f8e2528d04e5d2c3f /butl/fdstream.ixx
parentbab5f9b799e5b64c59ad9c78070a4254fe9ceeab (diff)
Reorder inline functions to keep MinGW GCC happy (export)
Diffstat (limited to 'butl/fdstream.ixx')
-rw-r--r--butl/fdstream.ixx23
1 files changed, 23 insertions, 0 deletions
diff --git a/butl/fdstream.ixx b/butl/fdstream.ixx
index 0d3d098..884d190 100644
--- a/butl/fdstream.ixx
+++ b/butl/fdstream.ixx
@@ -30,6 +30,14 @@ namespace butl
reset ();
}
+ // fdbuf
+ //
+ inline auto_fd fdbuf::
+ release ()
+ {
+ return std::move (fd_);
+ }
+
// ifdstream
//
inline ifdstream::
@@ -104,6 +112,12 @@ namespace butl
open (f.string (), m);
}
+ inline auto_fd ifdstream::
+ release ()
+ {
+ return buf_.release ();
+ }
+
// ofdstream
//
inline ofdstream::
@@ -176,6 +190,15 @@ namespace butl
open (f.string (), m);
}
+ inline auto_fd ofdstream::
+ release ()
+ {
+ if (is_open ())
+ flush ();
+
+ return buf_.release ();
+ }
+
// fdopen()
//
inline auto_fd