<div dir="ltr">LGTM. Thanks.</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Jul 7, 2025 at 11:09 PM Nathan Myers <<a href="mailto:ncm@cantrip.org">ncm@cantrip.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This adds the new bitset constructor from string_view<br>
defined in P2697 to the debug version of the type.<br>
<br>
libstdc++-v3/Changelog:<br>
PR libstdc++/119742<br>
* include/debug/bitset: Add new ctor.<br>
---<br>
libstdc++-v3/include/debug/bitset | 12 ++++++++++++<br>
1 file changed, 12 insertions(+)<br>
<br>
diff --git a/libstdc++-v3/include/debug/bitset b/libstdc++-v3/include/debug/bitset<br>
index ad9b7b5c4b0..43656a4efd3 100644<br>
--- a/libstdc++-v3/include/debug/bitset<br>
+++ b/libstdc++-v3/include/debug/bitset<br>
@@ -164,6 +164,18 @@ namespace __debug<br>
_CharT __zero, _CharT __one = _CharT('1'))<br>
: _Base(__str, __pos, __n, __zero, __one) { }<br>
<br>
+#ifdef __cpp_lib_bitset // ... from string_view<br>
+ template<class _CharT, class _Traits><br>
+ constexpr explicit<br>
+ bitset(std::basic_string_view<_CharT, _Traits> __s,<br>
+ std::basic_string_view<_CharT, _Traits>::size_type __position = 0,<br>
+ std::basic_string_view<_CharT, _Traits>::size_type __n =<br>
+ std::basic_string_view<_CharT, _Traits>::npos,<br>
+ _CharT __zero = _CharT('0'), _CharT __one = _CharT('1'))<br>
+ : _Base(__s.data() + std::min(__position, __s.size()),<br>
+ std::min(__n, __s.size()), __zero, __one) { }<br>
+#endif<br>
+<br>
_GLIBCXX23_CONSTEXPR<br>
bitset(const _Base& __x) : _Base(__x) { }<br>
<br>
-- <br>
2.50.0<br>
<br>
</blockquote></div>