UdonLibrary 1.0.0
機械システム研究部 C++ ライブラリ
読み取り中…
検索中…
一致する文字列を見つけられません
Assert.hpp
[詳解]
1#pragma once
2
4
5namespace Udon
6{
7
9 enum class AssertAction
10 {
11 Skip, // プログラムを中断しない
12 Abort // プログラムを中断する (無限ループに陥る)
13 };
14
15
20 inline void Assert(bool expression, const char* const message = "", AssertAction action = AssertAction::Abort)
21 {
22 if (expression)
23 {
24 return;
25 }
26
27 // アサート発生
28 switch (action)
29 {
31 Udon::ShowRaw(message, " (continue..)\n");
32
34 Udon::ShowRaw(message, " (abort..)\n");
35 for (;;)
36 ;
37 }
38 }
39
40} // namespace Udon
Definition Bit.hpp:12
void Assert(bool expression, const char *const message="", AssertAction action=AssertAction::Abort)
アサート
Definition Assert.hpp:20
AssertAction
アサートが発生した場合の挙動
Definition Assert.hpp:10
void ShowRaw(Args &&... args)
改行、区切り文字なしで出力する
Definition Show.hpp:362