29 template <
typename E,
typename Assessable,
typename... Args>
30 inline auto enforce(Assessable &&value, Args &&... args)
33 throw E(std::forward<Args>(args)...);
34 return std::forward<Assessable>(value);
42 #define ENFORCE(cond, ex_type, ...) ::details::enforce<ex_type>((cond), __VA_ARGS__)
47 #define LEOSAC_ENFORCE(cond, ...) \
48 ::details::enforce<LEOSACException>((cond), __VA_ARGS__)
59 #define LEOSAC_ENFORCE_ARGUMENT(cond, var, msg) \
60 ::details::enforce<InvalidArgument>((cond), #var, var, msg, #cond)