[libcxx-commits] [libcxx] [libc++] Implement LWG3430 avoid implicit conversion of the source arguments to `std::filesystem::path` when constructing `std::basic_*fstream` (PR #85079)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Mar 17 08:28:31 PDT 2024


================
@@ -1043,8 +1041,9 @@ public:
 #  endif
   _LIBCPP_HIDE_FROM_ABI explicit basic_ifstream(const string& __s, ios_base::openmode __mode = ios_base::in);
 #  if _LIBCPP_STD_VER >= 17
+  template <class _Tp, class = enable_if_t<is_same_v<_Tp, filesystem::path>>>
   _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_HIDE_FROM_ABI explicit basic_ifstream(
-      const filesystem::path& __p, ios_base::openmode __mode = ios_base::in)
+      const _Tp& __p, ios_base::openmode __mode = ios_base::in)
----------------
yronglin wrote:

done

https://github.com/llvm/llvm-project/pull/85079


More information about the libcxx-commits mailing list