summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-12-02 15:32:29 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-12-02 15:32:29 +0100
commit08e6c03c2864657ae24faec8dde2389d640aaa23 (patch)
tree4d90ec5f4073a46a03c5e726f5872169a76c732a
parent0699ce86d640791ab67494cf6e56b6314da1170c (diff)
compat: fix usage outside namespace floormat
-rw-r--r--compat/exception.hpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/compat/exception.hpp b/compat/exception.hpp
index d0d2ca31..c1315a3c 100644
--- a/compat/exception.hpp
+++ b/compat/exception.hpp
@@ -28,22 +28,22 @@ exception::exception(const Fmt& fmt, Ts&&... args) noexcept
} // namespace floormat
-#define fm_soft_assert(...) \
- do { \
- if (!(__VA_ARGS__)) \
- { \
- if (std::is_constant_evaluated()) \
- throw base_exception{}; \
- else \
- throw exception{"assertion failed: {} in {}:{}"_cf, \
- #__VA_ARGS__, __FILE__, __LINE__}; \
- } \
+#define fm_soft_assert(...) \
+ do { \
+ if (!(__VA_ARGS__)) \
+ { \
+ if (std::is_constant_evaluated()) \
+ throw ::floormat::base_exception{}; \
+ else \
+ throw ::floormat::exception{"assertion failed: {} in {}:{}"_cf, \
+ #__VA_ARGS__, __FILE__, __LINE__}; \
+ } \
} while (false)
-#define fm_throw(fmt, ...) \
- do { \
- if (std::is_constant_evaluated()) \
- throw base_exception{}; \
- else \
- throw exception{fmt, __VA_ARGS__}; \
+#define fm_throw(fmt, ...) \
+ do { \
+ if (std::is_constant_evaluated()) \
+ throw ::floormat::base_exception{}; \
+ else \
+ throw ::floormat::exception{fmt, __VA_ARGS__}; \
} while (false)