summaryrefslogtreecommitdiff
path: root/asl/assert.hpp
blob: 2322a5b46e2fc39a16e2f49f169517d944ea01d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#pragma once

#include "asl/config.hpp"

#if ASL_COMPILER_CLANG_CL
    #define ASL_DEBUG_BREAK() __debugbreak()
#elif ASL_COMPILER_CLANG
    #define ASL_DEBUG_BREAK() __builtin_debug_trap()
#endif

#define ASL_ASSERT(...)                                                 \
    if (__VA_ARGS__) {}                                                 \
    else { ASL_DEBUG_BREAK(); }