[libcxx-commits] [libcxx] [libc++] Implement LWG3430 std::fstream & co. should be constructible from string_view (PR #85079)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 14 06:22:38 PDT 2024
================
@@ -21,11 +21,18 @@
#include <fstream>
#include <filesystem>
#include <cassert>
+#include <type_traits>
+
#include "test_macros.h"
#include "platform_support.h"
namespace fs = std::filesystem;
+struct fake_path {};
+
+static_assert(std::is_constructible_v<std::fstream, fs::path>);
+static_assert(!std::is_constructible_v<std::fstream, fake_path>);
----------------
yronglin wrote:
Good catch! And thanks for your review! I've refined the test cases, also the title need update.
```
Note: the issue description is now a misnomer, as adding a string_view constructor is no longer being considered at this time.
```
https://github.com/llvm/llvm-project/pull/85079
More information about the libcxx-commits
mailing list