diff --git a/luna/include/luna/Check.h b/luna/include/luna/Check.h index 37c3b13f..faf75bd7 100644 --- a/luna/include/luna/Check.h +++ b/luna/include/luna/Check.h @@ -1,5 +1,4 @@ #pragma once -#include [[noreturn]] extern bool __check_failed(const char* file, const char* line, const char* func, const char* expr); @@ -23,3 +22,6 @@ __check_failed(__FILE__, STRINGIZE_VALUE_OF(__LINE__), __PRETTY_FUNCTION__, #expr); \ } \ } while (0) + +#define unreachable() \ + __check_failed(__FILE__, STRINGIZE_VALUE_OF(__LINE__), __PRETTY_FUNCTION__, "Reached unreachable code")