Files
scylladb/utils/div_ceil.hh
Kefu Chai 0660675387 utils/div_ceil: add constraints to template arguments
to better reflect what we expect from the arguments.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#20003
2024-08-04 15:32:01 +03:00

17 lines
265 B
C++

/*
* Copyright (C) 2017-present ScyllaDB
*/
/*
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
#include <concepts>
inline auto
div_ceil(std::integral auto dividend, std::integral auto divisor) {
return (dividend + divisor - 1) / divisor;
}