diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-12-02 15:32:29 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-12-02 15:32:29 +0100 |
commit | 08e6c03c2864657ae24faec8dde2389d640aaa23 (patch) | |
tree | 4d90ec5f4073a46a03c5e726f5872169a76c732a | |
parent | 0699ce86d640791ab67494cf6e56b6314da1170c (diff) |
compat: fix usage outside namespace floormat
-rw-r--r-- | compat/exception.hpp | 32 |
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) |