beagle-3.0.3-fix-c++14.patch 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. Fix building with C++14, where destructors are noexcept(true) by default.
  2. See also: https://bugs.gentoo.org/show_bug.cgi?id=597342
  3. --- a/PACC/Threading/Thread.cpp
  4. +++ b/PACC/Threading/Thread.cpp
  5. @@ -79,6 +79,9 @@
  6. \attention If the destructor in the derived thread class (e.g. MyThread above) does not wait for thread termination, the potential hazardous situation is that the runtime system will have deleted all of its members before calling this destructor (in C++, class destructors are called in reversed sequence). Thus, the still running thread could access deleted data members with unpredictable and unexpected results. So beware!
  7. */
  8. Threading::Thread::~Thread(void)
  9. +#if __cplusplus >= 201103L
  10. + noexcept(false)
  11. +#endif
  12. {
  13. lock();
  14. if(mThread) {
  15. --- a/PACC/Threading/Thread.hpp
  16. +++ b/PACC/Threading/Thread.hpp
  17. @@ -53,7 +53,11 @@
  18. class Thread : public Condition {
  19. public:
  20. Thread(void);
  21. - virtual ~Thread(void);
  22. + virtual ~Thread(void)
  23. +#if __cplusplus >= 201103L
  24. + noexcept(false)
  25. +#endif
  26. + ;
  27. void cancel(void);
  28. bool isRunning(void) const;