2015-10-03 Jonathan Wakely <jwakely@redhat.com>
+ * testsuite/21_strings/basic_string/literals/types.cc: Guard use of
+ wchar_t with _GLIBCXX_USE_WCHAR_T.
+ * testsuite/21_strings/basic_string/literals/values.cc: Likewise.
+ * testsuite/21_strings/basic_string/requirements/citerators.cc:
+ Likewise.
+ * testsuite/22_locale/messages/13631.cc: Likewise.
+ * testsuite/experimental/string_view/literals/types.cc: Likewise.
+ * testsuite/experimental/string_view/literals/values.cc: Likewise.
+
* src/filesystem/Makefile.am: Add cxx11_abi_sources.
* src/filesystem/Makefile.in: Regenerate.
* src/filesystem/cow-dir.cc: New.
static_assert(std::is_same<decltype(u8"Hello"s), std::string>::value,
"u8\"Hello\"s is std::string");
+#ifdef _GLIBCXX_USE_WCHAR_T
static_assert(std::is_same<decltype(L"Hello"s), std::wstring>::value,
"L\"Hello\"s is std::wstring");
+#endif
static_assert(std::is_same<decltype(u"Hello"s), std::u16string>::value,
"u\"Hello\"s is std::u16string");
using namespace std::literals::string_literals;
std::string planet = "Mercury"s;
+#ifdef _GLIBCXX_USE_WCHAR_T
std::wstring wplanet = L"Venus"s;
+#endif
std::string u8planet = u8"Mars"s;
- std::u16string u16planet = u"Juiter"s;
+ std::u16string u16planet = u"Jupiter"s;
std::u32string u32planet = U"Saturn"s;
VERIFY( planet == std::string("Mercury") );
+#ifdef _GLIBCXX_USE_WCHAR_T
VERIFY( wplanet == std::wstring(L"Venus") );
+#endif
VERIFY( u8planet == std::string(u8"Mars") );
- VERIFY( u16planet == std::u16string(u"Juiter") );
+ VERIFY( u16planet == std::u16string(u"Jupiter") );
VERIFY( u32planet == std::u32string(U"Saturn") );
}
int main()
{
__gnu_test::citerator<std::string> test1;
+#ifdef _GLIBCXX_USE_WCHAR_T
__gnu_test::citerator<std::wstring> test2;
+#endif
return 0;
}
void test02()
{
+#ifdef _GLIBCXX_USE_WCHAR_T
bool test __attribute__((unused)) = true;
// This is defined through CXXFLAGS in scripts/testsuite_flags[.in].
msgs_facet.close(msgs);
VERIFY( translation1 == translation2 );
+#endif
}
int main()
static_assert(std::is_same<decltype(u8"Hello"sv), std::experimental::string_view>::value,
"u8\"Hello\"s is std::string_view");
+#ifdef _GLIBCXX_USE_WCHAR_T
static_assert(std::is_same<decltype(L"Hello"sv), std::experimental::wstring_view>::value,
"L\"Hello\"s is std::wstring_view");
+#endif
static_assert(std::is_same<decltype(u"Hello"sv), std::experimental::u16string_view>::value,
"u\"Hello\"s is std::u16string_view");
using namespace std::experimental::literals::string_view_literals;
std::experimental::string_view planet = "Mercury"sv;
+#ifdef _GLIBCXX_USE_WCHAR_T
std::experimental::wstring_view wplanet = L"Venus"sv;
+#endif
std::experimental::string_view u8planet = u8"Mars"sv;
- std::experimental::u16string_view u16planet = u"Juiter"sv;
+ std::experimental::u16string_view u16planet = u"Jupiter"sv;
std::experimental::u32string_view u32planet = U"Saturn"sv;
VERIFY( planet == std::experimental::string_view("Mercury") );
+#ifdef _GLIBCXX_USE_WCHAR_T
VERIFY( wplanet == std::experimental::wstring_view(L"Venus") );
+#endif
VERIFY( u8planet == std::experimental::string_view(u8"Mars") );
- VERIFY( u16planet == std::experimental::u16string_view(u"Juiter") );
+ VERIFY( u16planet == std::experimental::u16string_view(u"Jupiter") );
VERIFY( u32planet == std::experimental::u32string_view(U"Saturn") );
}