X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fthread.hpp;h=640cb66a06e2f3aac0c6e4ed750ab8b8e21fb356;hb=1be11f8bb8fdf368985d9e1c900b250541dc4791;hp=b09da7fcef266821e83eed7b5798368dc1b0b570;hpb=743e893ecbbaacd66d2832e9c3ae16404422a173;p=awesomized%2Flibmemcached diff --git a/libtest/thread.hpp b/libtest/thread.hpp index b09da7fc..640cb66a 100644 --- a/libtest/thread.hpp +++ b/libtest/thread.hpp @@ -38,6 +38,10 @@ #include +#if __cplusplus < 201103L +# define noexcept(a) +#endif + namespace libtest { namespace thread @@ -52,7 +56,7 @@ public: _err= pthread_mutex_init(&_mutex, NULL); } - ~Mutex() + ~Mutex() noexcept(false) { if ((_err= pthread_mutex_destroy(&_mutex))) { @@ -84,7 +88,7 @@ public: init(); } - ~ScopedLock() + ~ScopedLock() noexcept(false) { int err; if ((err= pthread_mutex_unlock(_mutex.handle()))) @@ -124,7 +128,7 @@ public: } } - ~Condition() + ~Condition() noexcept(false) { int err; if ((err= pthread_cond_destroy(&_cond)))