39#ifndef INCLUDED_DISTI_ASSERT_H
40#define INCLUDED_DISTI_ASSERT_H
72#ifdef DISTI_HAS_RVAL_REFS
81 virtual DISTI_EXPORT
const char*
what()
const;
121#if defined( GLS_DEBUG )
122# define DistiAssert( exp ) (void)( ( exp ) || ( ::disti::DistiAssertDebug( # exp, __FILE__, __LINE__ ), 0 ) )
124# define DistiAssert( exp ) (void)( ( exp ) || ( ::disti::DistiAssertRelease( # exp, __FILE__, __LINE__ ), 0 ) )
128#define GLS_UNUSED( exp ) \
131 (void)sizeof( exp ); \
148#if defined( GLS_DEBUG ) || !defined( NDEBUG )
149# define GLS_ASSERT( exp ) \
152 (void)( ( exp ) || ( ::disti::GlsAssert( #exp, __FILE__, __LINE__ ), 0 ) ); \
155# define GLS_ASSERT( exp ) GLS_UNUSED( exp )
169#define GLS_VERIFY( exp ) (void)( ( exp ) || ( ::disti::GlsVerify( #exp, __FILE__, __LINE__ ), 0 ) )
176DISTI_EXPORT
void DistiAssertDebug(
const char* expression,
const char* filename,
unsigned int lineNumber );
183DISTI_EXPORT
void DistiAssertRelease(
const char* expression,
const char* filename,
unsigned int lineNumber );
189DISTI_EXPORT
void GlsVerify(
const char* expression,
const char* filename,
unsigned int lineNumber );
195DISTI_EXPORT
void GlsAssert(
const char* expression,
const char* filename,
unsigned int lineNumber );
Definition: disti_assert.h:57
virtual const char * what() const
DistiException & operator=(DistiException other)
friend void swap(DistiException &first, DistiException &second)
DistiException(const char *what)
#define DistiAssert(exp)
Definition: disti_assert.h:124
A file for all GL Studio files to include.
Macros and helper code to determine what subset of C++11/14/17 is available.
#define DISTI_FUNC_NOEXCEPT
Macro to wrap the noexcept keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:239
Definition: bmpimage.h:46
void GlsAssert(const char *expression, const char *filename, unsigned int lineNumber)
void(* DistiAssertHandler)(const char *errMessage)
Definition: disti_assert.h:91
void DistiAssertRelease(const char *expression, const char *filename, unsigned int lineNumber)
void GlsVerify(const char *expression, const char *filename, unsigned int lineNumber)
T * ValidatePointer(const T *const p)
Definition: disti_assert.h:201
void SetGlsAssertHandler(DistiAssertHandler)
void DistiAssertDebug(const char *expression, const char *filename, unsigned int lineNumber)
void swap(DistiException &first, DistiException &second)
void SetGlsVerifyHandler(DistiAssertHandler)
void SetDistiAssertHandler(DistiAssertHandler)