[libcxx-commits] [libcxx] [libc++] Implement LWG3430 avoid implicit conversion of the source arguments to `std::filesystem::path` when constructing `std::basic_*fstream` (PR #85079)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Mar 16 08:06:26 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)
----------------
mordante wrote:
Please include `__type_traits/enable_if.h` and `__type_traits/is_same.h` in this header.
https://github.com/llvm/llvm-project/pull/85079
More information about the libcxx-commits
mailing list