Skip to content

Commit

Permalink
tests/unit: drop support of C++17
Browse files Browse the repository at this point in the history
since we've dropped support for C++17, there is no need to check
for the existance of C++20 headers or check for the macros which
are defined for checking C++20 library support -- they should be
available for a C++20 compiler and standard library.

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov authored and avikivity committed Aug 25, 2024
1 parent 7fe1a04 commit 3c70194
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
6 changes: 0 additions & 6 deletions tests/unit/chunked_fifo_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,19 @@
#include <chrono>
#include <deque>
#include <iterator>
#if __has_include(<ranges>)
#include <ranges>
#endif
#if __has_include(<version>)
#include <version>
#endif

using namespace seastar;

#ifdef __cpp_lib_concepts
static_assert(std::weakly_incrementable<chunked_fifo<int>::iterator>);
static_assert(std::weakly_incrementable<chunked_fifo<int>::const_iterator>);
static_assert(std::sentinel_for<chunked_fifo<int>::iterator, chunked_fifo<int>::iterator>);
static_assert(std::sentinel_for<chunked_fifo<int>::const_iterator, chunked_fifo<int>::const_iterator>);
#endif

#ifdef __cpp_lib_ranges
static_assert(std::ranges::range<chunked_fifo<const int>>);
#endif

BOOST_AUTO_TEST_CASE(chunked_fifo_small) {
// Check all the methods of chunked_fifo but with a trivial type (int) and
Expand Down
4 changes: 0 additions & 4 deletions tests/unit/circular_buffer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
#include <chrono>
#include <deque>
#include <random>
#if __has_include(<ranges>)
#include <ranges>
#endif
#if __has_include(<version>)
#include <version>
#endif
Expand All @@ -38,9 +36,7 @@

using namespace seastar;

#ifdef __cpp_lib_ranges
static_assert(std::ranges::range<circular_buffer<int>>);
#endif

BOOST_AUTO_TEST_CASE(test_erasing) {
circular_buffer<int> buf;
Expand Down

0 comments on commit 3c70194

Please sign in to comment.