X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fthread.hpp;h=640cb66a06e2f3aac0c6e4ed750ab8b8e21fb356;hb=e0165c033349179841bd1658f4068a9e4c075f66;hp=b09da7fcef266821e83eed7b5798368dc1b0b570;hpb=cc7f3ad60dd92d7e41e0efbf922bb4f6fc9a848f;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)))