From 44fde85b2496750b78939247d1d19a67c5b3dc71 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 14 Nov 2016 15:24:14 +0200 Subject: C++11-compatibility fixes and improvements --- cutl/fs/exception.cxx | 2 +- cutl/fs/exception.hxx | 4 +++- cutl/fs/path.cxx | 2 +- cutl/fs/path.hxx | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) (limited to 'cutl/fs') diff --git a/cutl/fs/exception.cxx b/cutl/fs/exception.cxx index 3fbd26b..c3f8da2 100644 --- a/cutl/fs/exception.cxx +++ b/cutl/fs/exception.cxx @@ -9,7 +9,7 @@ namespace cutl namespace fs { char const* error:: - what () const throw () + what () const LIBCUTL_NOTHROW_NOEXCEPT { return "filesystem error"; } diff --git a/cutl/fs/exception.hxx b/cutl/fs/exception.hxx index d6c9601..de0e8f9 100644 --- a/cutl/fs/exception.hxx +++ b/cutl/fs/exception.hxx @@ -7,6 +7,8 @@ #include +#include + namespace cutl { namespace fs @@ -24,7 +26,7 @@ namespace cutl } virtual char const* - what () const throw (); + what () const LIBCUTL_NOTHROW_NOEXCEPT; private: int code_; diff --git a/cutl/fs/path.cxx b/cutl/fs/path.cxx index b106ea0..4faf401 100644 --- a/cutl/fs/path.cxx +++ b/cutl/fs/path.cxx @@ -24,7 +24,7 @@ namespace cutl namespace fs { char const* invalid_path_base:: - what () const throw () + what () const LIBCUTL_NOTHROW_NOEXCEPT { return "invalid filesystem path"; } diff --git a/cutl/fs/path.hxx b/cutl/fs/path.hxx index d7d2c0c..b1cf92d 100644 --- a/cutl/fs/path.hxx +++ b/cutl/fs/path.hxx @@ -10,6 +10,7 @@ #include +#include #include namespace cutl @@ -121,7 +122,7 @@ namespace cutl { public: virtual char const* - what () const throw (); + what () const LIBCUTL_NOTHROW_NOEXCEPT; }; template @@ -132,7 +133,6 @@ namespace cutl invalid_basic_path (C const* p): path_ (p) {} invalid_basic_path (string_type const& p): path_ (p) {} - ~invalid_basic_path () throw () {} string_type const& path () const -- cgit v1.1