mirror of
https://github.com/Expand-sys/CCash
synced 2026-03-22 20:47:10 +11:00
divisible static_assert only if max_log != 0
This commit is contained in:
parent
819a77a299
commit
0dae1c3a74
1 changed files with 2 additions and 4 deletions
6
main.cpp
6
main.cpp
|
|
@ -23,10 +23,8 @@ void SaveSig(int s)
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
static_assert(pre_log_size <= max_log_size, "`max_log_size` must be larger than `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)
|
static_assert(!(max_log_size % pre_log_size) + (!max_log_size), "`max_log_size` must be a multiple of `pre_log_size`.");
|
||||||
{
|
|
||||||
static_assert(!(max_log_size % pre_log_size), "`max_log_size` must be a multiple of `pre_log_size`.");
|
|
||||||
}
|
|
||||||
if (argc != 4)
|
if (argc != 4)
|
||||||
{
|
{
|
||||||
std::cerr << "Usage: sudo ./bank <admin password> <saving frequency in minutes> <threads>\n";
|
std::cerr << "Usage: sudo ./bank <admin password> <saving frequency in minutes> <threads>\n";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue