Skip to content

Commit

Permalink
Fix compilation with libc++
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamStepan committed Jun 3, 2019
1 parent 7c9c8c2 commit 8d7bce6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/superior_mysqlpp/uncaught_exception_counter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ namespace SuperiorMySqlpp
{
inline int uncaughtExceptions() noexcept
{
#if defined(__clang__) && _LIBCPPABI_VERSION >= 1002
return static_cast<int>(__cxxabiv1::__cxa_uncaught_exceptions());
#else
auto* globalsPtr = __cxxabiv1::__cxa_get_globals();
auto* globalsEreasedPtr = reinterpret_cast<char*>(globalsPtr);
auto* uncaughtExceptionsErasedPtr = globalsEreasedPtr + sizeof(void*);
auto* uncaughtExceptionsPtr = reinterpret_cast<int*>(uncaughtExceptionsErasedPtr);
return *uncaughtExceptionsPtr;
#endif
}

class UncaughtExceptionCounter
Expand Down
4 changes: 4 additions & 0 deletions packages/_debian-common/changelog
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
libsuperiormysqlpp (0.4.1) UNRELEASED; urgency=medium

[ Peter Opatril ]
* refactor: Logging system (DRY)
* feat: Default logger logs errors

[ Adam Stepan ]
* Fix compilation with libc++

-- Peter Opatril <[email protected]> Fri, 24 May 2019 14:07:13 +0000

libsuperiormysqlpp (0.4.0) unstable; urgency=medium
Expand Down

0 comments on commit 8d7bce6

Please sign in to comment.