projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
memcp: fix #83
[awesomized/libmemcached]
/
libtest
/
thread.hpp
diff --git
a/libtest/thread.hpp
b/libtest/thread.hpp
index b09da7fcef266821e83eed7b5798368dc1b0b570..640cb66a06e2f3aac0c6e4ed750ab8b8e21fb356 100644
(file)
--- a/
libtest/thread.hpp
+++ b/
libtest/thread.hpp
@@
-38,6
+38,10
@@
#include <pthread.h>
#include <pthread.h>
+#if __cplusplus < 201103L
+# define noexcept(a)
+#endif
+
namespace libtest
{
namespace thread
namespace libtest
{
namespace thread
@@
-52,7
+56,7
@@
public:
_err= pthread_mutex_init(&_mutex, NULL);
}
_err= pthread_mutex_init(&_mutex, NULL);
}
- ~Mutex()
+ ~Mutex()
noexcept(false)
{
if ((_err= pthread_mutex_destroy(&_mutex)))
{
{
if ((_err= pthread_mutex_destroy(&_mutex)))
{
@@
-84,7
+88,7
@@
public:
init();
}
init();
}
- ~ScopedLock()
+ ~ScopedLock()
noexcept(false)
{
int err;
if ((err= pthread_mutex_unlock(_mutex.handle())))
{
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)))
{
int err;
if ((err= pthread_cond_destroy(&_cond)))