rotgen/include/rotgen/detail/assert.hpp
Joel Falcou 8e80d1d083 More specific fixes
See merge request oss/rotgen!47
2025-12-02 14:40:01 +01:00

22 lines
628 B
C++

//==================================================================================================
/*
ROTGEN - Runtime Overlay for Eigen
Copyright : CODE RECKONS
SPDX-License-Identifier: BSL-1.0
*/
//==================================================================================================
#pragma once
#if defined(ROTGEN_USE_LIBASSERT)
#include <libassert/assert.hpp>
#define ROTGEN_ASSERT(COND, ...) DEBUG_ASSERT(COND, __VA_ARGS__)
#else
#include <cassert>
#if !defined(NDEBUG)
#define ROTGEN_ASSERT(COND, MSG, ...) assert((COND) && (MSG))
#else
#define ROTGEN_ASSERT(COND, ...) (void)(COND)
#endif
#endif