[libcxx-commits] [PATCH] D102414: [libc++] Improve make_string test support.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 14 08:43:05 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa85b1320b656: [libc++] Improve make_string test support. (authored by Mordante).
Changed prior to commit:
https://reviews.llvm.org/D102414?vs=345182&id=345450#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102414/new/
https://reviews.llvm.org/D102414
Files:
libcxx/test/support/make_string.h
Index: libcxx/test/support/make_string.h
===================================================================
--- libcxx/test/support/make_string.h
+++ libcxx/test/support/make_string.h
@@ -39,13 +39,13 @@
const char16_t* u16;
const char32_t* u32;
- operator const char*() const { return s; }
- operator const wchar_t*() const { return w; }
+ constexpr operator const char*() const { return s; }
+ constexpr operator const wchar_t*() const { return w; }
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
- operator const char8_t*() const { return u8; }
+ constexpr operator const char8_t*() const { return u8; }
#endif
- operator const char16_t*() const { return u16; }
- operator const char32_t*() const { return u32; }
+ constexpr operator const char16_t*() const { return u16; }
+ constexpr operator const char32_t*() const { return u32; }
};
// Helper to convert a const char* string to a basic_string<CharT>.
@@ -56,4 +56,8 @@
static_cast<const CharT*>(MultiStringType MKSTR(Str)) \
}
+// Like MAKE_STRING but converts to a const CharT*.
+#define MAKE_CSTRING(CharT, Str) \
+ static_cast<const CharT*>(MultiStringType MKSTR(Str))
+
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102414.345450.patch
Type: text/x-patch
Size: 1244 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210514/81c74147/attachment-0001.bin>
More information about the libcxx-commits
mailing list