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
48c4d73cbc
commit
819a77a299
1 changed files with 4 additions and 2 deletions
4
main.cpp
4
main.cpp
|
|
@ -23,8 +23,10 @@ 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` 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