diff --git a/.clang-tidy b/.clang-tidy index 7b497724..e88b9d0f 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -65,7 +65,6 @@ Checks: > -google-readability-namespace-comments, -misc-non-private-member-variables-in-classes, -misc-const-correctness, - -misc-include-cleaner, -modernize-return-braced-init-list, -modernize-use-trailing-return-type, -modernize-avoid-c-arrays, diff --git a/BUILD.bazel b/BUILD.bazel index 62fc2fa4..ea4de615 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -379,7 +379,9 @@ cc_library( hdrs = ["include/fixed_containers/fixed_unordered_set_raw_view.hpp"], includes = ["include"], deps = [ + ":concepts", ":fixed_doubly_linked_list_raw_view", + ":map_entry", ], copts = ["-std=c++20"], ) @@ -864,6 +866,7 @@ cc_test( srcs = ["test/circular_indexing_test.cpp"], deps = [ ":circular_indexing", + ":integer_range", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -876,6 +879,9 @@ cc_test( deps = [ ":concepts", ":circular_integer_range_iterator", + ":integer_range", + ":iterator_utils", + ":random_access_iterator", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -914,6 +920,8 @@ cc_test( ":enum_array", ":enums_test_common", ":mock_testing_types", + ":ranges", + "@com_github_neargye_magic_enum//:magic_enum", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -924,7 +932,9 @@ cc_test( name = "enum_map_test", srcs = ["test/enum_map_test.cpp"], deps = [ + ":arrow_proxy", ":assert_or_abort", + ":concepts", ":consteval_compare", ":enum_map", ":enums_test_common", @@ -944,6 +954,7 @@ cc_test( srcs = ["test/enum_set_test.cpp"], deps = [ ":assert_or_abort", + ":concepts", ":consteval_compare", ":enum_set", ":enums_test_common", @@ -959,6 +970,7 @@ cc_test( name = "enum_utils_test", srcs = ["test/enum_utils_test.cpp"], deps = [ + ":concepts", ":consteval_compare", ":enum_utils", ":enums_test_common", @@ -972,7 +984,10 @@ cc_test( name = "filtered_integer_range_iterator_test", srcs = ["test/filtered_integer_range_iterator_test.cpp"], deps = [ + ":bidirectional_iterator", ":concepts", + ":integer_range", + ":iterator_utils", ":filtered_integer_range_iterator", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", @@ -985,6 +1000,7 @@ cc_test( srcs = ["test/fixed_circular_deque_test.cpp"], deps = [ ":assert_or_abort", + ":concepts", ":fixed_circular_deque", ":instance_counter", ":max_size", @@ -1000,6 +1016,7 @@ cc_test( name = "fixed_circular_queue_test", srcs = ["test/fixed_circular_queue_test.cpp"], deps = [ + ":concepts", ":fixed_circular_queue", ":fixed_vector", ":max_size", @@ -1057,7 +1074,10 @@ cc_test( srcs = ["test/fixed_map_perf_test.cpp"], deps = [ ":consteval_compare", + ":fixed_index_based_storage", ":fixed_map", + ":fixed_red_black_tree", + "@com_google_googletest//:gtest_main", "@com_google_benchmark//:benchmark_main", ], copts = ["-std=c++20"], @@ -1085,6 +1105,7 @@ cc_test( name = "fixed_map_test", srcs = ["test/fixed_map_test.cpp"], deps = [ + ":arrow_proxy", ":assert_or_abort", ":concepts", ":consteval_compare", @@ -1104,8 +1125,10 @@ cc_test( name = "fixed_unordered_map_test", srcs = ["test/fixed_unordered_map_test.cpp"], deps = [ + ":arrow_proxy", ":concepts", ":consteval_compare", + ":fixed_map_adapter", ":fixed_unordered_map", ":instance_counter", ":max_size", @@ -1139,6 +1162,7 @@ cc_test( deps = [ ":concepts", ":consteval_compare", + ":fixed_set_adapter", ":fixed_unordered_set", ":instance_counter", ":max_size", @@ -1171,6 +1195,7 @@ cc_test( deps = [ ":concepts", ":consteval_compare", + ":fixed_index_based_storage", ":fixed_red_black_tree", ":mock_testing_types", "@com_google_googletest//:gtest", @@ -1184,7 +1209,9 @@ cc_test( srcs = ["test/fixed_red_black_tree_view_test.cpp"], deps = [ ":fixed_red_black_tree_view", + ":fixed_red_black_tree", ":fixed_set", + ":fixed_vector", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -1417,6 +1444,7 @@ cc_test( name = "queue_adapter_test", srcs = ["test/queue_adapter_test.cpp"], deps = [ + ":concepts", ":fixed_deque", ":queue_adapter", "@com_google_googletest//:gtest", @@ -1429,6 +1457,7 @@ cc_test( name = "optional_reference_test", srcs = ["test/optional_reference_test.cpp"], deps = [ + ":concepts", ":optional_reference", ":mock_testing_types", "@com_google_googletest//:gtest", @@ -1456,6 +1485,7 @@ cc_test( name = "stack_adapter_test", srcs = ["test/stack_adapter_test.cpp"], deps = [ + ":concepts", ":fixed_stack", ":stack_adapter", "@com_google_googletest//:gtest", diff --git a/test/circular_indexing_test.cpp b/test/circular_indexing_test.cpp index 990dc528..22120f13 100644 --- a/test/circular_indexing_test.cpp +++ b/test/circular_indexing_test.cpp @@ -1,7 +1,11 @@ #include "fixed_containers/circular_indexing.hpp" +#include "fixed_containers/integer_range.hpp" + #include +#include + namespace fixed_containers::circular_indexing { TEST(CyclesAndInteger, IncrementIndexWithWraparound) diff --git a/test/circular_integer_range_iterator_test.cpp b/test/circular_integer_range_iterator_test.cpp index 4a880928..35f56f71 100644 --- a/test/circular_integer_range_iterator_test.cpp +++ b/test/circular_integer_range_iterator_test.cpp @@ -1,6 +1,9 @@ #include "fixed_containers/circular_integer_range_iterator.hpp" #include "fixed_containers/concepts.hpp" +#include "fixed_containers/integer_range.hpp" +#include "fixed_containers/iterator_utils.hpp" +#include "fixed_containers/random_access_iterator.hpp" #include diff --git a/test/concepts_test.cpp b/test/concepts_test.cpp index b494b666..261b01d3 100644 --- a/test/concepts_test.cpp +++ b/test/concepts_test.cpp @@ -2,6 +2,8 @@ #include "fixed_containers/assert_or_abort.hpp" +#include + namespace fixed_containers { static_assert(!IsTransparent>); diff --git a/test/enum_array_test.cpp b/test/enum_array_test.cpp index 29d0f216..7ad3b34d 100644 --- a/test/enum_array_test.cpp +++ b/test/enum_array_test.cpp @@ -5,10 +5,16 @@ #include "fixed_containers/concepts.hpp" #include "fixed_containers/consteval_compare.hpp" +#include "fixed_containers/ranges.hpp" #include +#include +#include +#include +#include #include +#include namespace fixed_containers { diff --git a/test/enum_map_test.cpp b/test/enum_map_test.cpp index af4a5ff5..d3de8184 100644 --- a/test/enum_map_test.cpp +++ b/test/enum_map_test.cpp @@ -5,16 +5,23 @@ #include "mock_testing_types.hpp" #include "test_utilities_common.hpp" +#include "fixed_containers/arrow_proxy.hpp" #include "fixed_containers/assert_or_abort.hpp" +#include "fixed_containers/concepts.hpp" #include "fixed_containers/consteval_compare.hpp" #include "fixed_containers/max_size.hpp" #include #include +#include #include +#include +#include #include +#include #include +#include #include #include diff --git a/test/enum_set_test.cpp b/test/enum_set_test.cpp index 1aad5d03..ff2e555c 100644 --- a/test/enum_set_test.cpp +++ b/test/enum_set_test.cpp @@ -3,13 +3,17 @@ #include "enums_test_common.hpp" #include "fixed_containers/assert_or_abort.hpp" +#include "fixed_containers/concepts.hpp" #include "fixed_containers/consteval_compare.hpp" #include "fixed_containers/max_size.hpp" #include +#include #include #include +#include +#include #include #include diff --git a/test/enum_utils_test.cpp b/test/enum_utils_test.cpp index 5b36692c..191be90d 100644 --- a/test/enum_utils_test.cpp +++ b/test/enum_utils_test.cpp @@ -2,11 +2,13 @@ #include "enums_test_common.hpp" +#include "fixed_containers/concepts.hpp" #include "fixed_containers/consteval_compare.hpp" #include #include +#include #include namespace fixed_containers::rich_enums_detail diff --git a/test/filtered_integer_range_iterator_test.cpp b/test/filtered_integer_range_iterator_test.cpp index e4f035f6..ac4dc7b9 100644 --- a/test/filtered_integer_range_iterator_test.cpp +++ b/test/filtered_integer_range_iterator_test.cpp @@ -1,11 +1,15 @@ #include "fixed_containers/filtered_integer_range_iterator.hpp" +#include "fixed_containers/bidirectional_iterator.hpp" #include "fixed_containers/concepts.hpp" +#include "fixed_containers/integer_range.hpp" +#include "fixed_containers/iterator_utils.hpp" #include #include #include +#include #include #include diff --git a/test/fixed_circular_deque_test.cpp b/test/fixed_circular_deque_test.cpp index 61dc37d1..85ae7ed6 100644 --- a/test/fixed_circular_deque_test.cpp +++ b/test/fixed_circular_deque_test.cpp @@ -5,12 +5,18 @@ #include "test_utilities_common.hpp" #include "fixed_containers/assert_or_abort.hpp" +#include "fixed_containers/concepts.hpp" #include "fixed_containers/max_size.hpp" #include #include +#include +#include #include +#include +#include +#include namespace fixed_containers { diff --git a/test/fixed_circular_queue_test.cpp b/test/fixed_circular_queue_test.cpp index 555d3b8f..056989f2 100644 --- a/test/fixed_circular_queue_test.cpp +++ b/test/fixed_circular_queue_test.cpp @@ -1,10 +1,13 @@ #include "fixed_containers/fixed_circular_queue.hpp" +#include "fixed_containers/concepts.hpp" #include "fixed_containers/fixed_vector.hpp" #include "fixed_containers/max_size.hpp" #include +#include + namespace fixed_containers { diff --git a/test/fixed_deque_test.cpp b/test/fixed_deque_test.cpp index 02cb8719..865fed13 100644 --- a/test/fixed_deque_test.cpp +++ b/test/fixed_deque_test.cpp @@ -11,7 +11,13 @@ #include #include +#include +#include #include +#include +#include +#include +#include namespace fixed_containers { @@ -1201,7 +1207,7 @@ TEST(FixedDeque, Resize_ExceedsCapacity) auto v1 = Factory::template create(); EXPECT_DEATH(v1.resize(6), ""); EXPECT_DEATH(v1.resize(6, 5), ""); - const size_t to_size = 7; + const std::size_t to_size = 7; EXPECT_DEATH(v1.resize(to_size), ""); EXPECT_DEATH(v1.resize(to_size, 5), ""); }; diff --git a/test/fixed_doubly_linked_list_raw_view_test.cpp b/test/fixed_doubly_linked_list_raw_view_test.cpp index 832c1ab7..9d049c7c 100644 --- a/test/fixed_doubly_linked_list_raw_view_test.cpp +++ b/test/fixed_doubly_linked_list_raw_view_test.cpp @@ -7,6 +7,11 @@ #include +#include +#include +#include +#include + namespace fixed_containers::fixed_doubly_linked_list_detail { namespace diff --git a/test/fixed_doubly_linked_list_test.cpp b/test/fixed_doubly_linked_list_test.cpp index deb51d6e..3d981ef1 100644 --- a/test/fixed_doubly_linked_list_test.cpp +++ b/test/fixed_doubly_linked_list_test.cpp @@ -2,6 +2,8 @@ #include +#include + namespace fixed_containers::fixed_doubly_linked_list_detail { namespace diff --git a/test/fixed_list_test.cpp b/test/fixed_list_test.cpp index 6437cd9f..17a6528f 100644 --- a/test/fixed_list_test.cpp +++ b/test/fixed_list_test.cpp @@ -9,14 +9,19 @@ #include "fixed_containers/max_size.hpp" #include -#include #include #include +#include #include #include #include +#include +#include #include +#include +#include +#include namespace fixed_containers { @@ -1039,7 +1044,7 @@ TEST(FixedList, Resize_ExceedsCapacity) FixedList v1{}; EXPECT_DEATH(v1.resize(6), ""); EXPECT_DEATH(v1.resize(6, 5), ""); - const size_t to_size = 7; + const std::size_t to_size = 7; EXPECT_DEATH(v1.resize(to_size), ""); EXPECT_DEATH(v1.resize(to_size, 5), ""); } @@ -1539,11 +1544,11 @@ TEST(FixedList, EraseRange) EXPECT_TRUE(std::ranges::equal(v2, std::array{{2, 5, 0, 3}})); } { - FixedList, 8> v = {{1, 2, 3}, {4, 5}, {}, {6, 7, 8}}; + FixedList, 8> v = {{1, 2, 3}, {4, 5}, {}, {6, 7, 8}}; auto it = v.erase(v.begin(), std::next(v.begin(), 2)); EXPECT_EQ(it, v.begin()); EXPECT_EQ(v.size(), 2u); - EXPECT_TRUE(std::ranges::equal(v, std::vector>{{}, {6, 7, 8}})); + EXPECT_TRUE(std::ranges::equal(v, std::list>{{}, {6, 7, 8}})); } } @@ -1609,19 +1614,19 @@ TEST(FixedList, EraseOne) EXPECT_TRUE(std::ranges::equal(v2, std::array{{1, 4, 0}})); } { - FixedList, 8> v = {{1, 2, 3}, {4, 5}, {}, {6, 7, 8}}; + FixedList, 8> v = {{1, 2, 3}, {4, 5}, {}, {6, 7, 8}}; auto it = v.erase(v.begin()); EXPECT_EQ(it, v.begin()); EXPECT_EQ(v.size(), 3u); - EXPECT_TRUE(std::ranges::equal(v, std::vector>{{4, 5}, {}, {6, 7, 8}})); + EXPECT_TRUE(std::ranges::equal(v, std::list>{{4, 5}, {}, {6, 7, 8}})); it = v.erase(std::next(v.begin(), 1)); EXPECT_EQ(it, std::next(v.begin(), 1)); EXPECT_EQ(v.size(), 2u); - EXPECT_TRUE(std::ranges::equal(v, std::vector>{{4, 5}, {6, 7, 8}})); + EXPECT_TRUE(std::ranges::equal(v, std::list>{{4, 5}, {6, 7, 8}})); it = v.erase(std::next(v.begin(), 1)); EXPECT_EQ(it, v.end()); EXPECT_EQ(v.size(), 1u); - EXPECT_TRUE(std::ranges::equal(v, std::vector>{{4, 5}})); + EXPECT_TRUE(std::ranges::equal(v, std::list>{{4, 5}})); } } diff --git a/test/fixed_map_perf_test.cpp b/test/fixed_map_perf_test.cpp index 5870ea75..364fcb13 100644 --- a/test/fixed_map_perf_test.cpp +++ b/test/fixed_map_perf_test.cpp @@ -1,10 +1,15 @@ #include "fixed_containers/consteval_compare.hpp" +#include "fixed_containers/fixed_index_based_storage.hpp" #include "fixed_containers/fixed_map.hpp" +#include "fixed_containers/fixed_red_black_tree_nodes.hpp" #include #include #include +#include +#include +#include namespace fixed_containers { diff --git a/test/fixed_map_test.cpp b/test/fixed_map_test.cpp index 8a6cc2bd..89124cc3 100644 --- a/test/fixed_map_test.cpp +++ b/test/fixed_map_test.cpp @@ -4,6 +4,7 @@ #include "mock_testing_types.hpp" #include "test_utilities_common.hpp" +#include "fixed_containers/arrow_proxy.hpp" #include "fixed_containers/assert_or_abort.hpp" #include "fixed_containers/concepts.hpp" #include "fixed_containers/consteval_compare.hpp" @@ -11,13 +12,22 @@ #include #include +#include #include #include +#include #include +#include +#include +#include #include #include +#include +#include #include +#include +#include namespace fixed_containers { diff --git a/test/fixed_queue_test.cpp b/test/fixed_queue_test.cpp index 72cbeadf..d9cd5ee1 100644 --- a/test/fixed_queue_test.cpp +++ b/test/fixed_queue_test.cpp @@ -1,10 +1,13 @@ #include "fixed_containers/fixed_queue.hpp" +#include "fixed_containers/concepts.hpp" #include "fixed_containers/fixed_vector.hpp" #include "fixed_containers/max_size.hpp" #include +#include + namespace fixed_containers { using QueueType = FixedQueue; diff --git a/test/fixed_red_black_tree_test.cpp b/test/fixed_red_black_tree_test.cpp index 17eb7ec0..1966cc7d 100644 --- a/test/fixed_red_black_tree_test.cpp +++ b/test/fixed_red_black_tree_test.cpp @@ -4,12 +4,22 @@ #include "fixed_containers/concepts.hpp" #include "fixed_containers/consteval_compare.hpp" +#include "fixed_containers/fixed_index_based_storage.hpp" +#include "fixed_containers/fixed_red_black_tree_nodes.hpp" +#include "fixed_containers/fixed_red_black_tree_ops.hpp" +#include "fixed_containers/fixed_red_black_tree_storage.hpp" +#include "fixed_containers/fixed_red_black_tree_types.hpp" #include +#include +#include #include +#include +#include #include #include +#include namespace fixed_containers::fixed_red_black_tree_detail { diff --git a/test/fixed_red_black_tree_view_test.cpp b/test/fixed_red_black_tree_view_test.cpp index 12d00d00..1480311c 100644 --- a/test/fixed_red_black_tree_view_test.cpp +++ b/test/fixed_red_black_tree_view_test.cpp @@ -1,11 +1,19 @@ #include "fixed_containers/fixed_red_black_tree_view.hpp" +#include "fixed_containers/fixed_index_based_storage.hpp" +#include "fixed_containers/fixed_red_black_tree_nodes.hpp" +#include "fixed_containers/fixed_red_black_tree_types.hpp" #include "fixed_containers/fixed_set.hpp" +#include "fixed_containers/fixed_vector.hpp" #include +#include #include +#include #include +#include +#include #include namespace fixed_containers diff --git a/test/fixed_robinhood_hashtable_test.cpp b/test/fixed_robinhood_hashtable_test.cpp index 15eed6cf..ab194c01 100644 --- a/test/fixed_robinhood_hashtable_test.cpp +++ b/test/fixed_robinhood_hashtable_test.cpp @@ -4,6 +4,10 @@ #include +#include +#include +#include + namespace fixed_containers::fixed_robinhood_hashtable_detail { namespace diff --git a/test/fixed_set_test.cpp b/test/fixed_set_test.cpp index d9b4d875..ac3c7596 100644 --- a/test/fixed_set_test.cpp +++ b/test/fixed_set_test.cpp @@ -8,11 +8,17 @@ #include "fixed_containers/max_size.hpp" #include -#include +#include #include #include +#include #include +#include +#include +#include +#include +#include namespace fixed_containers { diff --git a/test/fixed_stack_test.cpp b/test/fixed_stack_test.cpp index 8874d007..6b612201 100644 --- a/test/fixed_stack_test.cpp +++ b/test/fixed_stack_test.cpp @@ -6,6 +6,8 @@ #include +#include + namespace fixed_containers { using StackType = FixedStack; diff --git a/test/fixed_string_test.cpp b/test/fixed_string_test.cpp index 282a1e7e..fa4c18db 100644 --- a/test/fixed_string_test.cpp +++ b/test/fixed_string_test.cpp @@ -9,9 +9,13 @@ #include #include +#include +#include +#include #include #include #include +#include namespace fixed_containers { @@ -1470,7 +1474,7 @@ TEST(FixedString, Resize_ExceedsCapacity) FixedString<3> v1{}; EXPECT_DEATH(v1.resize(6), ""); EXPECT_DEATH(v1.resize(6, 5), ""); - const size_t to_size = 7; + const std::size_t to_size = 7; EXPECT_DEATH(v1.resize(to_size), ""); EXPECT_DEATH(v1.resize(to_size, 5), ""); } diff --git a/test/fixed_unordered_map_raw_view_test.cpp b/test/fixed_unordered_map_raw_view_test.cpp index 6b9d51a4..707a62ce 100644 --- a/test/fixed_unordered_map_raw_view_test.cpp +++ b/test/fixed_unordered_map_raw_view_test.cpp @@ -6,7 +6,13 @@ #include "fixed_containers/fixed_unordered_map.hpp" #include "fixed_containers/map_entry.hpp" +#include + #include +#include +#include +#include +#include namespace fixed_containers { diff --git a/test/fixed_unordered_map_test.cpp b/test/fixed_unordered_map_test.cpp index a63c4883..01d479a9 100644 --- a/test/fixed_unordered_map_test.cpp +++ b/test/fixed_unordered_map_test.cpp @@ -4,20 +4,30 @@ #include "mock_testing_types.hpp" #include "test_utilities_common.hpp" +#include "fixed_containers/arrow_proxy.hpp" #include "fixed_containers/assert_or_abort.hpp" #include "fixed_containers/concepts.hpp" #include "fixed_containers/consteval_compare.hpp" +#include "fixed_containers/fixed_map_adapter.hpp" #include "fixed_containers/max_size.hpp" #include #include +#include #include #include +#include #include +#include +#include #include +#include +#include #include +#include #include +#include namespace fixed_containers { diff --git a/test/fixed_unordered_set_raw_view_test.cpp b/test/fixed_unordered_set_raw_view_test.cpp index 7d59d7e2..68ced28c 100644 --- a/test/fixed_unordered_set_raw_view_test.cpp +++ b/test/fixed_unordered_set_raw_view_test.cpp @@ -2,11 +2,16 @@ #include "mock_testing_types.hpp" +#include "fixed_containers/concepts.hpp" #include "fixed_containers/fixed_unordered_set.hpp" #include "fixed_containers/map_entry.hpp" #include +#include +#include +#include + namespace fixed_containers { namespace diff --git a/test/fixed_unordered_set_test.cpp b/test/fixed_unordered_set_test.cpp index e649d438..f2a76aaa 100644 --- a/test/fixed_unordered_set_test.cpp +++ b/test/fixed_unordered_set_test.cpp @@ -5,14 +5,20 @@ #include "fixed_containers/assert_or_abort.hpp" #include "fixed_containers/concepts.hpp" #include "fixed_containers/consteval_compare.hpp" +#include "fixed_containers/fixed_set_adapter.hpp" #include "fixed_containers/max_size.hpp" #include -#include +#include #include #include +#include #include +#include +#include +#include +#include namespace fixed_containers { diff --git a/test/fixed_vector_test.cpp b/test/fixed_vector_test.cpp index b5b50b62..8a15094e 100644 --- a/test/fixed_vector_test.cpp +++ b/test/fixed_vector_test.cpp @@ -9,14 +9,20 @@ #include "fixed_containers/max_size.hpp" #include -#include #include #include +#include #include #include #include +#include +#include +#include +#include #include +#include +#include #include namespace fixed_containers @@ -1165,7 +1171,7 @@ TEST(FixedVector, Resize_ExceedsCapacity) FixedVector v1{}; EXPECT_DEATH(v1.resize(6), ""); EXPECT_DEATH(v1.resize(6, 5), ""); - const size_t to_size = 7; + const std::size_t to_size = 7; EXPECT_DEATH(v1.resize(to_size), ""); EXPECT_DEATH(v1.resize(to_size, 5), ""); } diff --git a/test/int_math_test.cpp b/test/int_math_test.cpp index 90ffa55d..96f7866e 100644 --- a/test/int_math_test.cpp +++ b/test/int_math_test.cpp @@ -2,6 +2,8 @@ #include +#include + namespace fixed_containers { TEST(IntMath, UnsignedIntegralAndSign) diff --git a/test/integer_range_iterator_test.cpp b/test/integer_range_iterator_test.cpp index 207ff283..163a1774 100644 --- a/test/integer_range_iterator_test.cpp +++ b/test/integer_range_iterator_test.cpp @@ -1,9 +1,13 @@ #include "fixed_containers/integer_range_iterator.hpp" #include "fixed_containers/concepts.hpp" +#include "fixed_containers/integer_range.hpp" +#include "fixed_containers/iterator_utils.hpp" +#include "fixed_containers/random_access_iterator.hpp" #include +#include #include #include diff --git a/test/optional_reference_test.cpp b/test/optional_reference_test.cpp index 8c234d18..455025c7 100644 --- a/test/optional_reference_test.cpp +++ b/test/optional_reference_test.cpp @@ -2,8 +2,14 @@ #include "mock_testing_types.hpp" +#include "fixed_containers/concepts.hpp" + #include +#include +#include +#include + namespace fixed_containers { TEST(OptionalReference, FixedContainerProperties) diff --git a/test/pair_view_test.cpp b/test/pair_view_test.cpp index b8ae300a..285d05cb 100644 --- a/test/pair_view_test.cpp +++ b/test/pair_view_test.cpp @@ -6,6 +6,11 @@ #include +#include +#include +#include +#include + namespace fixed_containers { diff --git a/test/queue_adapter_test.cpp b/test/queue_adapter_test.cpp index 9da9b631..39faeda6 100644 --- a/test/queue_adapter_test.cpp +++ b/test/queue_adapter_test.cpp @@ -1,5 +1,6 @@ #include "fixed_containers/queue_adapter.hpp" +#include "fixed_containers/concepts.hpp" #include "fixed_containers/fixed_deque.hpp" #include @@ -22,4 +23,10 @@ static_assert(StandardLayout); static_assert(IsStructuralType); static_assert(ConstexprDefaultConstructible); +TEST(StackAdapter, DefaultConstructor) +{ + constexpr QueueAdapter> v1{}; + static_assert(v1.empty()); +} + } // namespace fixed_containers diff --git a/test/reflection_test.cpp b/test/reflection_test.cpp index 30a780c7..53cedb80 100644 --- a/test/reflection_test.cpp +++ b/test/reflection_test.cpp @@ -11,6 +11,7 @@ #include #include +#include namespace fixed_containers { diff --git a/test/stack_adapter_test.cpp b/test/stack_adapter_test.cpp index b646b6e2..38fc60f5 100644 --- a/test/stack_adapter_test.cpp +++ b/test/stack_adapter_test.cpp @@ -1,5 +1,6 @@ #include "fixed_containers/stack_adapter.hpp" +#include "fixed_containers/concepts.hpp" #include "fixed_containers/fixed_vector.hpp" #include @@ -22,4 +23,10 @@ static_assert(StandardLayout); static_assert(IsStructuralType); static_assert(ConstexprDefaultConstructible); +TEST(StackAdapter, DefaultConstructor) +{ + constexpr StackAdapter> v1{}; + static_assert(v1.empty()); +} + } // namespace fixed_containers diff --git a/test/string_literal_test.cpp b/test/string_literal_test.cpp index b3024e31..ba5d7584 100644 --- a/test/string_literal_test.cpp +++ b/test/string_literal_test.cpp @@ -3,6 +3,8 @@ #include #include +#include +#include namespace fixed_containers { diff --git a/test/tuples_test.cpp b/test/tuples_test.cpp index a248530e..b6290008 100644 --- a/test/tuples_test.cpp +++ b/test/tuples_test.cpp @@ -5,6 +5,12 @@ #include #include +#include +#include +#include +#include +#include +#include namespace fixed_containers::tuples::as_tuple_codegen {