diff --git a/external/Optional/optional.hpp b/external/Optional/optional.hpp index 97c3e20b0..55553f3c3 100644 --- a/external/Optional/optional.hpp +++ b/external/Optional/optional.hpp @@ -141,7 +141,9 @@ template inline constexpr typename std::remove_reference::type&& co # define ASSERTED_EXPRESSION(CHECK, EXPR) ((CHECK) ? (EXPR) : (fail(#CHECK, __FILE__, __LINE__), (EXPR))) inline void fail(const char* expr, const char* file, unsigned line) { - # if defined __clang__ || defined __GNU_LIBRARY__ + # if defined(EMSCRIPTEN) && EMSCRIPTEN + __assert_fail(expr, file, line, ""); + # elif defined __clang__ || defined __GNU_LIBRARY__ __assert(expr, file, line); # elif defined __GNUC__ _assert(expr, file, line);