based

Opinionated utility library
git clone git://git.dimitrijedobrota.com/based.git
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING

commit d488fb8ef4714a3370fb5aa6788adc9f2069daf1
parent cda6076429cb9a9ec7e504594bf4ef592edf55ba
author Dimitrije Dobrota < mail@dimitrijedobrota.com >
date Sun, 1 Jun 2025 14:50:48 +0200

BASED_ASSERT, typedef for assert, for now...

Diffstat:
A include/based/assert.hpp | ++++++++++++++++++++++++

1 files changed, 24 insertions(+), 0 deletions(-)


diff --git a/ include/based/assert.hpp b/ include/based/assert.hpp

@@ -0,0 +1,24 @@

#pragma once

#include <cassert>

#define BASED_ASSERT assert

/*
#ifdef NDEBUG
# define BASED_ASSERT(EX)
#else
# define BASED_ASSERT(EX) \
(void)((EX) || (based::detail::assert(#EX, __FILE__, __LINE__), 0))
#endif

namespace based::detail
{

[[noreturn]] constexpr void assert(const char* msg, const char* file, int line)
{
throw "assertion failsed";
}

} // namespace based::detail
*/