From e86fd669a02388f3614be4f15c112cd738e1b6eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 20 Oct 2013 00:33:42 +0200 Subject: [PATCH] external: std::optional with Emscripten support. --- external/Optional/optional.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);