File tree 3 files changed +7
-4
lines changed
include_all_in_one/include/fplus
3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -836,7 +836,7 @@ std::function<X(X)> divide_by(const X& x)
836
836
// API search type: div_pos_int_ceil : (a, a) -> a
837
837
// Positive integer division, but rounding up instead of down.
838
838
// div_pos_int_ceil(5, 3) == 2
839
- template <typename X>
839
+ template <typename X>
840
840
static auto div_pos_int_ceil (X numerator, X denominator)
841
841
{
842
842
static_assert (std::is_integral<X>::value, " type must be integral" );
Original file line number Diff line number Diff line change @@ -8354,8 +8354,9 @@ std::function<X(X)> divide_by(const X& x)
8354
8354
// API search type: div_pos_int_ceil : (a, a) -> a
8355
8355
// Positive integer division, but rounding up instead of down.
8356
8356
// div_pos_int_ceil(5, 3) == 2
8357
- template<typename X>
8358
- static auto div_pos_int_ceil(X numerator, X denominator) {
8357
+ template <typename X>
8358
+ static auto div_pos_int_ceil(X numerator, X denominator)
8359
+ {
8359
8360
static_assert(std::is_integral<X>::value, "type must be integral");
8360
8361
static_assert(!std::is_signed<X>::value, "type must be unsigned");
8361
8362
return numerator / denominator + (numerator % denominator != 0);
Original file line number Diff line number Diff line change @@ -289,7 +289,9 @@ TEST_CASE("numeric_test - ceil_to_int_mult")
289
289
TEST_CASE (" numeric_test - div_pos_int_ceil" )
290
290
{
291
291
using namespace fplus ;
292
- REQUIRE_EQ (div_pos_int_ceil (5 , 3 ), 2 );
292
+ const std::uint64_t numerator = 5 ;
293
+ const std::uint64_t denominator = 3 ;
294
+ REQUIRE_EQ (div_pos_int_ceil (numerator, denominator), 2 );
293
295
}
294
296
295
297
TEST_CASE (" numeric_test - reference_interval" )
You can’t perform that action at this time.
0 commit comments