object-introspection/test/integration/folly_shims.cpp
Alastair Robertson 99462b2132 Types: Fix folly::small_vector and folly::sorted_vector_map
folly::sorted_vector_map's results are not completely accurate, but at
least CodeGen v2 matches CodeGen v1 for it now.
2023-07-26 10:07:30 +01:00

28 lines
768 B
C++

#include <folly/ScopeGuard.h>
#include <folly/lang/SafeAssert.h>
namespace folly {
namespace detail {
// The FOLLY_SAFE_DCHECK macro is peppered throughout the folly headers. When
// building in release mode this macro does nothing, but in debug builds it
// requires safe_assert_terminate() to be defined. To avoid building and
// linking against folly, we define our own no-op version of this function here.
template <>
void safe_assert_terminate<false>(safe_assert_arg const* /*arg*/,
...) noexcept {
abort();
}
template <>
void safe_assert_terminate<true>(safe_assert_arg const* /*arg*/, ...) noexcept {
abort();
}
void ScopeGuardImplBase::terminate() noexcept {
abort();
}
} // namespace detail
} // namespace folly