From e47a91bf7cdeb96ffcdbd1b4bc92de6123e6699f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Wed, 5 Apr 2023 08:57:16 +0300 Subject: [PATCH] =?UTF-8?q?mdbx-test:=20=D1=81=D0=BE=D0=B2=D0=BC=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D1=8C=20=D1=81=D0=BE?= =?UTF-8?q?=20libstdc++=20=D0=B1=D0=B5=D0=B7=20`std::string=5Fview`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/extra/maindb_ordinal.c++ | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/extra/maindb_ordinal.c++ b/test/extra/maindb_ordinal.c++ index e9918fd3..14742f14 100644 --- a/test/extra/maindb_ordinal.c++ +++ b/test/extra/maindb_ordinal.c++ @@ -37,6 +37,7 @@ int main(int argc, const char *argv[]) { txn = env.start_read(); auto cursor = txn.open_cursor(map); +#if defined(__cpp_lib_string_view) && __cpp_lib_string_view >= 201606L if (cursor.to_first().value.string_view() == "a" && cursor.to_next().value.string_view() == "b" && cursor.to_next().value.string_view() == "c" && @@ -47,9 +48,12 @@ int main(int argc, const char *argv[]) { cursor.to_next().value.string_view() == "h" && !cursor.to_next(false).done && cursor.eof()) { std::cout << "OK\n"; - return 0; + return EXIT_SUCCESS; } - std::cerr << "Fail\n"; return EXIT_FAILURE; +#else + std::cerr << "Skipped since no std::string_view\n"; + return EXIT_SUCCESS; +#endif /* __cpp_lib_string_view >= 201606L */ }