diff --git a/main.cpp b/main.cpp index a2a72fc..7f85baf 100644 --- a/main.cpp +++ b/main.cpp @@ -22,9 +22,15 @@ void SaveSig(int s) int main(int argc, char **argv) { - // Static assertations for logging only (!max_log_size) - static_assert(!max_log_size || pre_log_size < max_log_size, "`max_log_size` must be larger than `pre_log_size`."); - static_assert(!max_log_size || !(max_log_size % pre_log_size), "`max_log_size` must be a multiple of `pre_log_size`."); + static_assert(pre_log_size <= max_log_size, "`max_log_size` must be larger than `pre_log_size`."); + if constexpr (max_log_size && pre_log_size) + { + if (max_log_size % pre_log_size) + { + std::cerr << "`max_log_size` must be a multiple of `pre_log_size`."; + return 0; + } + } if (argc != 4) {