diff --git a/.github/workflows/test-ubuntu.yml b/.github/workflows/test-ubuntu.yml index 49160e7..c5f431e 100644 --- a/.github/workflows/test-ubuntu.yml +++ b/.github/workflows/test-ubuntu.yml @@ -30,6 +30,11 @@ jobs: cmake_options: "-DUPA_TEST_VALGRIND=ON" install: "valgrind" + - name: g++-14 C++23 + cxx_compiler: g++-14 + cxx_standard: 23 + cmake_options: "" + - name: g++-12 C++20 cxx_compiler: g++-12 cxx_standard: 20 diff --git a/test/test-url_search_params.cpp b/test/test-url_search_params.cpp index 070f923..6dfa1a6 100644 --- a/test/test-url_search_params.cpp +++ b/test/test-url_search_params.cpp @@ -1,4 +1,4 @@ -// Copyright 2016-2023 Rimas Misevičius +// Copyright 2016-2024 Rimas Misevičius // Distributed under the BSD-style license that can be // found in the LICENSE file. // @@ -14,23 +14,18 @@ # include #endif -#if defined(__cpp_impl_coroutine) -#if __has_include() -# include +// Use libc++ or the Microsoft C++ Standard Library to test code that +// contains coroutines and ranges when compiling with Clang +#if !defined(__clang__) || defined(_LIBCPP_VERSION) || defined(_MSC_VER) +#if defined(__cpp_lib_generator) +# include # define TEST_COROUTINE_GENERATOR -using std::experimental::generator; #endif -#endif - -// ranges requires libc++ when compile with Clang -#if !defined(__clang__) || defined(_LIBCPP_VERSION) #if defined(__cpp_lib_ranges) -#if __has_include() # include # define TEST_RANGES #endif #endif -#endif #endif // defined(__has_include) @@ -88,7 +83,7 @@ TEST_CASE_TEMPLATE_DEFINE("Various string pairs iterable containers", CharT, tes #ifdef TEST_COROUTINE_GENERATOR SUBCASE("coroutine generator") { - auto pairs_gen = []() -> generator> { + auto pairs_gen = []() -> std::generator> { const pairs_list_t lst_pairs = TEST_ITERABLES_DATA; for (const auto& p : lst_pairs) co_yield p;