From 1b7d9457c07ce7cb267712d649c66274c3ebcc8e Mon Sep 17 00:00:00 2001 From: Steffen Schuemann Date: Fri, 22 Mar 2019 22:30:01 +0100 Subject: [PATCH] Fix for compiler errors on allocator variant test for generic_string() on GCC8 std::filesystem. --- test/filesystem_test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/filesystem_test.cpp b/test/filesystem_test.cpp index a951101..a985dc0 100644 --- a/test/filesystem_test.cpp +++ b/test/filesystem_test.cpp @@ -462,16 +462,20 @@ TEST_CASE("30.10.8.4.7 path generic format observers", "[filesystem][path][fs.pa { #ifdef GHC_OS_WINDOWS CHECK(fs::u8path("\xc3\xa4\\\xe2\x82\xac").generic_string() == std::string("\xc3\xa4/\xe2\x82\xac")); +#ifndef USE_STD_FS auto t = fs::u8path("\xc3\xa4\\\xe2\x82\xac").generic_string, TestAllocator>() CHECK(t.c_str() == std::string("\xc3\xa4/\xe2\x82\xac")); +#endif CHECK(fs::u8path("\xc3\xa4\\\xe2\x82\xac").generic_wstring() == std::wstring(L"\U000000E4/\U000020AC")); CHECK(fs::u8path("\xc3\xa4\\\xe2\x82\xac").generic_u8string() == std::string("\xc3\xa4/\xe2\x82\xac")); CHECK(fs::u8path("\xc3\xa4\\\xe2\x82\xac").generic_u16string() == std::u16string(u"\u00E4/\u20AC")); CHECK(fs::u8path("\xc3\xa4\\\xe2\x82\xac").generic_u32string() == std::u32string(U"\U000000E4/\U000020AC")); #else CHECK(fs::u8path("\xc3\xa4/\xe2\x82\xac").generic_string() == std::string(u8"\xc3\xa4/\xe2\x82\xac")); +#ifndef USE_STD_FS auto t = fs::u8path("\xc3\xa4/\xe2\x82\xac").generic_string, TestAllocator>(); CHECK(t.c_str() == std::string(u8"\xc3\xa4/\xe2\x82\xac")); +#endif CHECK(fs::u8path("\xc3\xa4/\xe2\x82\xac").generic_wstring() == std::wstring(L"ä/€")); CHECK(fs::u8path("\xc3\xa4/\xe2\x82\xac").generic_u8string() == std::string(u8"\xc3\xa4/\xe2\x82\xac")); CHECK(fs::u8path("\xc3\xa4/\xe2\x82\xac").generic_u16string() == std::u16string(u"\u00E4/\u20AC"));