summaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-12-02 17:55:35 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-12-02 17:55:35 +0000
commit25f34eebb0f3eb31e327f1a64d18db2817c6d694 (patch)
tree3717703d31af200669c60510dd5a0612279c3bb4 /document
parent4a7fe355da8efddec055943d7770619efe80cb03 (diff)
c++17 and c++2a need different handling.
Diffstat (limited to 'document')
-rw-r--r--document/src/tests/documentselectparsertest.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/document/src/tests/documentselectparsertest.cpp b/document/src/tests/documentselectparsertest.cpp
index 7e8e3796aaf..ab7f2cf1972 100644
--- a/document/src/tests/documentselectparsertest.cpp
+++ b/document/src/tests/documentselectparsertest.cpp
@@ -1234,17 +1234,24 @@ TEST_F(DocumentSelectParserTest, testDocumentIdsInRemoves)
namespace {
+#if __cplusplus > 201703L
const char *
-bad_cast_from_u8(const char8_t *p) {
+char_from_u8(const char8_t * p) {
return reinterpret_cast<const char *>(p);
}
+#else
+const char *
+char_from_u8(const char * p) {
+ return p;
+}
+#endif
}
TEST_F(DocumentSelectParserTest, testUtf8)
{
createDocs();
- vespalib::string utf8name = bad_cast_from_u8(u8"H\u00e5kon");
+ vespalib::string utf8name = char_from_u8(u8"H\u00e5kon");
EXPECT_EQ(size_t(6), utf8name.size());
/// \todo TODO (was warning): UTF8 test for glob/regex support in selection language disabled. Known not to work