IceShard
1
A personal game engine project, with development focused on 2D/2.5D games.
Toggle main menu visibility
Loading...
Searching...
No Matches
logger
public
ice
assert.hxx
Go to the documentation of this file.
1
3
4
#pragma once
5
#include <
ice/log.hxx
>
6
7
#ifdef assert
8
#error Assert is defined!
9
#endif
10
11
namespace
ice::detail
12
{
13
14
void
assert
(
15
ice::String
condition,
16
ice::String
message,
17
fmt::format_args args,
18
ice::detail::LogLocation
location
19
)
noexcept
;
20
21
void
terminate
() noexcept;
22
23
}
// namespace ice
24
25
#if defined ICE_ASSERT
26
#error "Found existing definition of 'ICE_ASSERT'!"
27
#endif
28
29
#define ICE_ASSERT(condition, message, ...) \
30
do{ \
31
if constexpr(ice::LogSeverity::Error <= ice::lowest_compiled_log_severity) \
32
{ \
33
if (!(condition)) \
34
{ \
35
ice::detail::assert( \
36
#condition, \
37
message, \
38
ice::detail::log_make_args(__VA_ARGS__), \
39
ice::detail::LogLocation{ .file = __FILE__, .line = __LINE__ } \
40
); \
41
ice::detail::terminate(); \
42
} \
43
} \
44
} while(false)
log.hxx
ice::detail
Definition
hashmap_details.hxx:13
ice::detail::assert
void assert(ice::String condition, ice::String message, fmt::format_args args, ice::detail::LogLocation location) noexcept
ice::detail::terminate
void terminate() noexcept
ice::String
ice::BasicString< char > String
Definition
string.hxx:82
ice::detail::LogLocation
Definition
log.hxx:15
Generated by
1.18.0