ICU-21107 Remove obsolete conditional use of C++17 std::string_view.

ICU4C now requires C++17 so std::string_view must always be available.
This commit is contained in:
Fredrik Roubert 2024-01-17 16:36:03 +09:00 committed by Fredrik Roubert
parent 9832f48e22
commit ac7e3de879
3 changed files with 0 additions and 17 deletions

View file

@ -913,14 +913,6 @@ else
fi
AC_SUBST(U_HAVE_STRTOD_L)
# Check if C++17 std::string_view is available.
AC_LANG_PUSH([C++])
AC_CHECK_TYPE(std::string_view, [], [], [[#include <string_view>]])
if test "x$ac_cv_type_std__string_view" = xyes; then :
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRING_VIEW=1"
fi
AC_LANG_POP([C++])
# Checks for typedefs
AC_CHECK_TYPE(int8_t,signed char)
AC_CHECK_TYPE(uint8_t,unsigned char)

View file

@ -14,10 +14,7 @@
* created by: Markus W. Scherer
*/
#ifdef U_HAVE_STRING_VIEW
#include <string_view>
#endif
#include <cstddef>
#include <string.h>
#include <limits>
@ -246,9 +243,7 @@ void StringTest::runIndexedTest(int32_t index, UBool exec, const char *&name, ch
TESTCASE_AUTO(TestStringPieceComparisons);
TESTCASE_AUTO(TestStringPieceFind);
TESTCASE_AUTO(TestStringPieceOther);
#ifdef U_HAVE_STRING_VIEW
TESTCASE_AUTO(TestStringPieceStringView);
#endif
TESTCASE_AUTO(TestStringPieceU8);
TESTCASE_AUTO(TestByteSink);
TESTCASE_AUTO(TestCheckedArrayByteSink);
@ -512,7 +507,6 @@ StringTest::TestStringPieceOther() {
assertEquals("data()", piece.data(), other.data());
}
#ifdef U_HAVE_STRING_VIEW
void
StringTest::TestStringPieceStringView() {
static constexpr char msg[] = "Kapow!";
@ -523,7 +517,6 @@ StringTest::TestStringPieceStringView() {
assertEquals("size()", piece.size(), view.size());
assertEquals("data()", piece.data(), view.data());
}
#endif
void
StringTest::TestStringPieceU8() {

View file

@ -46,9 +46,7 @@ private:
void TestStringPieceFind();
void TestStringPieceComparisons();
void TestStringPieceOther();
#ifdef U_HAVE_STRING_VIEW
void TestStringPieceStringView();
#endif
void TestStringPieceU8();
void TestByteSink();
void TestCheckedArrayByteSink();