diff options
author | 2013-04-18 16:54:39 +0200 | |
---|---|---|
committer | 2013-04-28 00:19:21 +0200 | |
commit | 149850cb8bc0d261dd9f93161e5bf1f132fe6ed2 (patch) | |
tree | 1c67b193c15a090942d6ecf58eaa18b6d0bf24e4 | |
parent | eb5bcb8eaf1a971491541ed646db224c3136063b (diff) | |
download | paludis-149850cb8bc0d261dd9f93161e5bf1f132fe6ed2.tar.gz paludis-149850cb8bc0d261dd9f93161e5bf1f132fe6ed2.tar.xz |
Mark ~RunningProcessHandle() as noexcept(false)
-rw-r--r-- | configure.ac | 14 | ||||
-rw-r--r-- | paludis/util/attributes.hh | 6 | ||||
-rw-r--r-- | paludis/util/process.cc | 2 | ||||
-rw-r--r-- | paludis/util/process.hh | 2 |
4 files changed, 22 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index cc5eeb459..e405672f2 100644 --- a/configure.ac +++ b/configure.ac @@ -896,6 +896,20 @@ enum class C : long { c }; ]) dnl }}} +dnl {{{ c++0x noexcept +AC_MSG_CHECKING([for c++0x noexcept]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +struct C { ~C() noexcept(false); }; +C::~C() noexcept(false) {} +])], + [AC_MSG_RESULT([yes]) + PALUDIS_CXXFLAGS="${PALUDIS_CXXFLAGS} -DPALUDIS_HAVE_NOEXCEPT=1" + PALUDIS_PC_CFLAGS="${PALUDIS_PC_CFLAGS} -DPALUDIS_HAVE_NOEXCEPT=1" + ], + [AC_MSG_RESULT([no]) + ]) +dnl }}} + CXXFLAGS="$save_CXXFLAGS" AC_MSG_CHECKING([whether to enable visibility]) diff --git a/paludis/util/attributes.hh b/paludis/util/attributes.hh index fa0f0302d..4fe4cef82 100644 --- a/paludis/util/attributes.hh +++ b/paludis/util/attributes.hh @@ -72,6 +72,12 @@ # define PALUDIS_HIDDEN #endif +#if defined(PALUDIS_HAVE_NOEXCEPT) +# define PALUDIS_NOEXCEPT(x) noexcept(x) +#else +# define PALUDIS_NOEXCEPT(x) +#endif + #define PALUDIS_TLS static __thread #endif diff --git a/paludis/util/process.cc b/paludis/util/process.cc index bf256fe57..ff0cf5a3d 100644 --- a/paludis/util/process.cc +++ b/paludis/util/process.cc @@ -1012,7 +1012,7 @@ RunningProcessHandle::RunningProcessHandle(pid_t p, std::unique_ptr<RunningProce { } -RunningProcessHandle::~RunningProcessHandle() +RunningProcessHandle::~RunningProcessHandle() PALUDIS_NOEXCEPT(false) { if (-1 != _imp->pid) { diff --git a/paludis/util/process.hh b/paludis/util/process.hh index 40f1fb0f9..5cebe8c97 100644 --- a/paludis/util/process.hh +++ b/paludis/util/process.hh @@ -125,7 +125,7 @@ namespace paludis const pid_t, std::unique_ptr<RunningProcessThread> &&); - ~RunningProcessHandle(); + ~RunningProcessHandle() PALUDIS_NOEXCEPT(false); RunningProcessHandle(RunningProcessHandle &&); RunningProcessHandle(const RunningProcessHandle &) = delete; |