diff --git a/src/utils/PugsAssert.hpp b/src/utils/PugsAssert.hpp index def5604de9cd870e0e2abcd67f228b7ce0143f2e..7ac521a51f73df6c5129ddd6ba346bd06453c07f 100644 --- a/src/utils/PugsAssert.hpp +++ b/src/utils/PugsAssert.hpp @@ -102,16 +102,15 @@ struct AssertChecker<std::tuple<Args...> > #else // NDEBUG -#define Assert(...) \ - { \ - using TupleArgs = decltype(std::make_tuple(__VA_ARGS__)); \ - AssertChecker<TupleArgs>::check_args_type(); \ - constexpr int tuple_size = std::tuple_size_v<TupleArgs>; \ - static_assert(tuple_size >= 1 and tuple_size <= 2); \ - auto args = std::forward_as_tuple(__VA_ARGS__); \ - if (not static_cast<bool>(std::get<0>(args))) { \ - throw AssertError(__FILE__, __LINE__, __PRETTY_FUNCTION__, args, #__VA_ARGS__); \ - } \ +#define Assert(...) \ + { \ + using TupleArgs = decltype(std::make_tuple(__VA_ARGS__)); \ + AssertChecker<TupleArgs>::check_args_type(); \ + constexpr int tuple_size = std::tuple_size_v<TupleArgs>; \ + static_assert(tuple_size >= 1 and tuple_size <= 2); \ + if (not static_cast<bool>(std::get<0>(std::forward_as_tuple(__VA_ARGS__)))) { \ + throw AssertError(__FILE__, __LINE__, __PRETTY_FUNCTION__, std::forward_as_tuple(__VA_ARGS__), #__VA_ARGS__); \ + } \ } #endif // NDEBUG