Skip to content

Commit e0e4319

Browse files
authored
Merge pull request #649 from elbeno/fix-size-t-handling
2 parents 66a6d9d + 9f6b35d commit e0e4319

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

include/lookup/input.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <type_traits>
1212

1313
namespace lookup {
14-
template <typename K, typename V = K, auto N = 0ul> struct input {
14+
template <typename K, typename V = K, std::size_t N = 0> struct input {
1515
using key_type = K;
1616
using value_type = V;
1717

test/lookup/input.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ TEST_CASE("an input with no entries (type deduced)", "[input]") {
99
constexpr auto input = lookup::input{1};
1010
CHECK(input.default_value == 1);
1111
static_assert(
12-
std::is_same_v<decltype(input), lookup::input<int, int, 0ul> const>);
13-
CHECK(std::size(input) == 0ul);
12+
std::is_same_v<decltype(input), lookup::input<int, int, 0> const>);
13+
CHECK(std::size(input) == 0);
1414
}
1515

1616
TEST_CASE("an input with no entries (explicit types)", "[input]") {
1717
constexpr auto input = lookup::input<float, int>{1};
1818
CHECK(input.default_value == 1);
1919
static_assert(
20-
std::is_same_v<decltype(input), lookup::input<float, int, 0ul> const>);
21-
CHECK(std::size(input) == 0ul);
20+
std::is_same_v<decltype(input), lookup::input<float, int, 0> const>);
21+
CHECK(std::size(input) == 0);
2222
}
2323

2424
TEST_CASE("an input with some entries (type deduced)", "[input]") {
2525
constexpr auto input = lookup::input(1, std::array{lookup::entry{1.0f, 2}});
2626
CHECK(input.default_value == 1);
2727
static_assert(
28-
std::is_same_v<decltype(input), lookup::input<float, int, 1ul> const>);
29-
CHECK(std::size(input) == 1ul);
28+
std::is_same_v<decltype(input), lookup::input<float, int, 1> const>);
29+
CHECK(std::size(input) == 1);
3030
}

0 commit comments

Comments
 (0)