[libcxx-commits] [libcxx] [libc++][sstream] P2495R3: Interfacing `stringstream`s with `string_view` (PR #80552)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 12 05:00:32 PST 2024


================
@@ -822,6 +894,25 @@ public:
       : basic_istream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(__s, __wch | ios_base::in) {}
 #endif // _LIBCPP_STD_VER >= 20
 
+#if _LIBCPP_STD_VER >= 26
+
+  template <class _Tp>
+    requires is_convertible_v<const _Tp&, basic_string_view<_CharT, _Traits>>
+  _LIBCPP_HIDE_FROM_ABI explicit basic_istringstream(const _Tp& __t, ios_base::openmode __which = ios_base::in)
+      : basic_istringstream(__t, __which | ios_base::in, _Allocator()) {}
----------------
H-G-Hristov wrote:

I followed what was on lines 872-873.

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


More information about the libcxx-commits mailing list