aboutsummaryrefslogtreecommitdiff
path: root/butl/fdstream.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-02-17 09:27:02 +0000
committerKaren Arutyunov <karen@codesynthesis.com>2017-02-17 16:25:55 +0300
commit3f2323dae243d7654d3319fe7f53b87062b0d62e (patch)
tree0ea14477825fb301365989460d02150ccf74711b /butl/fdstream.cxx
parent9f7edcab2b1e4bd2c8bd7abc6284bfb7dca86ed2 (diff)
Fix cpfile() to throw system_error only
Diffstat (limited to 'butl/fdstream.cxx')
-rw-r--r--butl/fdstream.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/butl/fdstream.cxx b/butl/fdstream.cxx
index e28eb0f..bdbfa08 100644
--- a/butl/fdstream.cxx
+++ b/butl/fdstream.cxx
@@ -39,8 +39,8 @@ namespace butl
// throw_ios_failure
//
template <bool v>
- static inline void
- throw_ios_failure (error_code e, typename enable_if<v, const char*>::type m)
+ static inline typename enable_if<v>::type
+ throw_ios_failure (error_code e, const char* m)
{
// The idea here is to make an error code to be saved into failure
// exception and to make a string returned by what() to contain the error
@@ -57,9 +57,8 @@ namespace butl
}
template <bool v>
- static inline void
- throw_ios_failure (error_code e,
- typename enable_if<!v, const char*>::type m)
+ static inline typename enable_if<!v>::type
+ throw_ios_failure (error_code e, const char* m)
{
throw ios_base::failure (m != nullptr ? m : e.message ().c_str ());
}