[libcxx-commits] [PATCH] D97084: [libcxx] Make path::format a non-class enum
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Feb 20 14:26:03 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG26005c788b06: [libcxx] Make path::format a non-class enum (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97084/new/
https://reviews.llvm.org/D97084
Files:
libcxx/include/filesystem
libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp
libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp
Index: libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp
+++ libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp
@@ -23,9 +23,7 @@
typedef fs::path::format E;
static_assert(std::is_enum<E>::value, "");
- // Check that E is a scoped enum by checking for conversions.
typedef std::underlying_type<E>::type UT;
- LIBCPP_STATIC_ASSERT(!std::is_convertible<E, UT>::value, "");
LIBCPP_ONLY(static_assert(std::is_same<UT, unsigned char>::value, "")); // Implementation detail
Index: libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp
+++ libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp
@@ -87,6 +87,9 @@
RunTestCaseImpl<CharT>(MS, fs::path::format::auto_format);
RunTestCaseImpl<CharT>(MS, fs::path::format::native_format);
RunTestCaseImpl<CharT>(MS, fs::path::format::generic_format);
+ RunTestCaseImpl<CharT>(MS, fs::path::auto_format);
+ RunTestCaseImpl<CharT>(MS, fs::path::native_format);
+ RunTestCaseImpl<CharT>(MS, fs::path::generic_format);
}
void test_sfinae() {
Index: libcxx/include/filesystem
===================================================================
--- libcxx/include/filesystem
+++ libcxx/include/filesystem
@@ -921,7 +921,7 @@
typedef basic_string<value_type> string_type;
typedef basic_string_view<value_type> __string_view;
- enum class _LIBCPP_ENUM_VIS format : unsigned char {
+ enum _LIBCPP_ENUM_VIS format : unsigned char {
auto_format,
native_format,
generic_format
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97084.325247.patch
Type: text/x-patch
Size: 1907 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210220/1812a933/attachment-0001.bin>
More information about the libcxx-commits
mailing list