<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gcc.git/libstdc++-v3/include/std/span, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/'/>
<entry>
<title>libstdc++: Apply LWG4351 to CTAD of span/mdspan.</title>
<updated>2025-09-10T10:46:57+00:00</updated>
<author>
<name>Luc Grosheintz</name>
<email>luc.grosheintz@gmail.com</email>
</author>
<published>2025-09-06T13:11:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=54cc2cb7bc668fa895329970c862bc5475e9e793'/>
<id>54cc2cb7bc668fa895329970c862bc5475e9e793</id>
<content type='text'>
The concept __integral_constant_like doesn't consider traits with a
boolean member `value` as an integer constant. This is done to reject
various completely unrelated traits like is_const, is_abstract, etc.

LWG4351 adjusts the check to strip references and cv qualifiers before
checking if `value` is bool. The immediate context is constant_wrapper
which defines:

    template&lt;...&gt;
    struct constant_wrapper
    {
      static constexpr const auto&amp; value = ...;
    };

Without LWG4351, std::cw&lt;true&gt; and std::cw&lt;false&gt; would both be
considered integer constants (by __integral_constant_like); but both
std::{true,false}_type are not considered integer constants. Hence,
LWG4351 removes inconsistent behaviour between std::integral_constant
and std::constant_wrapper.

libstdc++-v3/ChangeLog:

	* include/std/span (__integral_constant_like): Use
	remove_cvref_t before checking if _Tp::value is boolean.
	* testsuite/23_containers/mdspan/extents/misc.cc: Update test.
	* testsuite/23_containers/mdspan/mdspan.cc: Ditto.
	* testsuite/23_containers/span/deduction.cc: Ditto.

Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
Signed-off-by: Luc Grosheintz &lt;luc.grosheintz@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The concept __integral_constant_like doesn't consider traits with a
boolean member `value` as an integer constant. This is done to reject
various completely unrelated traits like is_const, is_abstract, etc.

LWG4351 adjusts the check to strip references and cv qualifiers before
checking if `value` is bool. The immediate context is constant_wrapper
which defines:

    template&lt;...&gt;
    struct constant_wrapper
    {
      static constexpr const auto&amp; value = ...;
    };

Without LWG4351, std::cw&lt;true&gt; and std::cw&lt;false&gt; would both be
considered integer constants (by __integral_constant_like); but both
std::{true,false}_type are not considered integer constants. Hence,
LWG4351 removes inconsistent behaviour between std::integral_constant
and std::constant_wrapper.

libstdc++-v3/ChangeLog:

	* include/std/span (__integral_constant_like): Use
	remove_cvref_t before checking if _Tp::value is boolean.
	* testsuite/23_containers/mdspan/extents/misc.cc: Update test.
	* testsuite/23_containers/mdspan/mdspan.cc: Ditto.
	* testsuite/23_containers/span/deduction.cc: Ditto.

Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
Signed-off-by: Luc Grosheintz &lt;luc.grosheintz@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Adjust span/mdspan CTAD for P2781R9.</title>
<updated>2025-09-08T07:40:15+00:00</updated>
<author>
<name>Luc Grosheintz</name>
<email>luc.grosheintz@gmail.com</email>
</author>
<published>2025-09-04T12:20:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=71711f8ac3af615fec197e4eb71d0bee8ef44a23'/>
<id>71711f8ac3af615fec197e4eb71d0bee8ef44a23</id>
<content type='text'>
A usecase for P2781R9 is more ergonomic creation of span and mdspan with
mixed static and dynamic extents, e.g.:

    span(ptr, cw&lt;3&gt;)
    extents(cw&lt;3&gt;, 5, cw&lt;7&gt;)
    mdspan(ptr, cw&lt;3&gt;, 5, cw&lt;7&gt;)

should be deduced as:
    span&lt;..., 3&gt;
    extents&lt;..., 3, dyn, 7&gt;
    mdspan&lt;..., extents&lt;..., 3, dyn, 7&gt;&gt;

The change required is to strip cv-qualifiers and references from
`_Tp::value`, because of:

    template&lt;_CwFixedValue _X, typename&gt;
      struct constant_wrapper : _CwOperators
      {
	static constexpr const auto&amp; value = _X._M_data;

libstdc++-v3/ChangeLog:

	* include/std/span (__integral_constant_like): Allow the member
	`value` of a constant wrapping type to be a const reference of
	an integer.
	* testsuite/23_containers/mdspan/extents/misc.cc: Add test for
	cw and constant_wrapper.
	* testsuite/23_containers/mdspan/mdspan.cc: Ditto.
	* testsuite/23_containers/span/deduction.cc: Ditto.

Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
Reviewed-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
Signed-off-by: Luc Grosheintz &lt;luc.grosheintz@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A usecase for P2781R9 is more ergonomic creation of span and mdspan with
mixed static and dynamic extents, e.g.:

    span(ptr, cw&lt;3&gt;)
    extents(cw&lt;3&gt;, 5, cw&lt;7&gt;)
    mdspan(ptr, cw&lt;3&gt;, 5, cw&lt;7&gt;)

should be deduced as:
    span&lt;..., 3&gt;
    extents&lt;..., 3, dyn, 7&gt;
    mdspan&lt;..., extents&lt;..., 3, dyn, 7&gt;&gt;

The change required is to strip cv-qualifiers and references from
`_Tp::value`, because of:

    template&lt;_CwFixedValue _X, typename&gt;
      struct constant_wrapper : _CwOperators
      {
	static constexpr const auto&amp; value = _X._M_data;

libstdc++-v3/ChangeLog:

	* include/std/span (__integral_constant_like): Allow the member
	`value` of a constant wrapping type to be a const reference of
	an integer.
	* testsuite/23_containers/mdspan/extents/misc.cc: Add test for
	cw and constant_wrapper.
	* testsuite/23_containers/mdspan/mdspan.cc: Ditto.
	* testsuite/23_containers/span/deduction.cc: Ditto.

Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
Reviewed-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
Signed-off-by: Luc Grosheintz &lt;luc.grosheintz@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Do not use list-initialization in std::span members [PR120997]</title>
<updated>2025-07-09T16:56:21+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-07-08T13:56:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=a72d0e1a8bf0770ddf1d8d0ebe589f92a4fab4ef'/>
<id>a72d0e1a8bf0770ddf1d8d0ebe589f92a4fab4ef</id>
<content type='text'>
As the bug report shows, for span&lt;const bool&gt; the return statements of
the form `return {data(), count};` will use the new C++26 constructor,
span(initializer_list&lt;element_type&gt;).

Although the conversions from data() to bool and count to bool are
narrowing and should be ill-formed, in system headers the narrowing
diagnostics are suppressed. In any case, even if the compiler diagnosed
them as ill-formed, we still don't want the initializer_list constructor
to be used. We want to use the span(element_type*, size_t) constructor
instead.

Replace the braced-init-list uses with S(data(), count) where S is the
correct return type. We need to make similar changes in the C++26
working draft, which will be taken care of via an LWG issue.

libstdc++-v3/ChangeLog:

	PR libstdc++/120997
	* include/std/span (span::first, span::last, span::subspan): Do
	not use braced-init-list for return statements.
	* testsuite/23_containers/span/120997.cc: New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As the bug report shows, for span&lt;const bool&gt; the return statements of
the form `return {data(), count};` will use the new C++26 constructor,
span(initializer_list&lt;element_type&gt;).

Although the conversions from data() to bool and count to bool are
narrowing and should be ill-formed, in system headers the narrowing
diagnostics are suppressed. In any case, even if the compiler diagnosed
them as ill-formed, we still don't want the initializer_list constructor
to be used. We want to use the span(element_type*, size_t) constructor
instead.

Replace the braced-init-list uses with S(data(), count) where S is the
correct return type. We need to make similar changes in the C++26
working draft, which will be taken care of via an LWG issue.

libstdc++-v3/ChangeLog:

	PR libstdc++/120997
	* include/std/span (span::first, span::last, span::subspan): Do
	not use braced-init-list for return statements.
	* testsuite/23_containers/span/120997.cc: New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Better CTAD for span and mdspan [PR120914].</title>
<updated>2025-07-08T14:48:46+00:00</updated>
<author>
<name>Luc Grosheintz</name>
<email>luc.grosheintz@gmail.com</email>
</author>
<published>2025-07-08T09:49:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=9c600a7e6cc588d2ee79d764cbf69ad677b1bac5'/>
<id>9c600a7e6cc588d2ee79d764cbf69ad677b1bac5</id>
<content type='text'>
This implements P3029R1. In P3029R1, the CTAD for span is refined to
permit deducing the extent of the span from an integral constant, e.g.

  span((T*) ptr, integral_constant&lt;size_t, 5&gt;{});

is deduced as span&lt;T, 5&gt;. Similarly, in

  auto exts = extents(integral_constant&lt;int, 2&gt;);
  auto md = mdspan((T*) ptr, integral_constant&lt;int, 2&gt;);

exts and md have types extents&lt;size_t, 2&gt; and mdspan&lt;double,
extents&lt;size_t, 2&gt;&gt;, respectively.

	PR libstdc++/120914

libstdc++-v3/ChangeLog:

	* include/std/span (span): Update CTAD to enable
	integral constants [P3029R1].
	* include/std/mdspan (extents): ditto.
	(mdspan): ditto.
	* testsuite/23_containers/span/deduction.cc: Test deduction
	guide.
	* testsuite/23_containers/mdspan/extents/misc.cc: ditto.
	* testsuite/23_containers/mdspan/mdspan.cc: ditto.

Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
Reviewed-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
Signed-off-by: Luc Grosheintz &lt;luc.grosheintz@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implements P3029R1. In P3029R1, the CTAD for span is refined to
permit deducing the extent of the span from an integral constant, e.g.

  span((T*) ptr, integral_constant&lt;size_t, 5&gt;{});

is deduced as span&lt;T, 5&gt;. Similarly, in

  auto exts = extents(integral_constant&lt;int, 2&gt;);
  auto md = mdspan((T*) ptr, integral_constant&lt;int, 2&gt;);

exts and md have types extents&lt;size_t, 2&gt; and mdspan&lt;double,
extents&lt;size_t, 2&gt;&gt;, respectively.

	PR libstdc++/120914

libstdc++-v3/ChangeLog:

	* include/std/span (span): Update CTAD to enable
	integral constants [P3029R1].
	* include/std/mdspan (extents): ditto.
	(mdspan): ditto.
	* testsuite/23_containers/span/deduction.cc: Test deduction
	guide.
	* testsuite/23_containers/mdspan/extents/misc.cc: ditto.
	* testsuite/23_containers/mdspan/mdspan.cc: ditto.

Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
Reviewed-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
Signed-off-by: Luc Grosheintz &lt;luc.grosheintz@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Remove redundant std::span destructor</title>
<updated>2025-03-06T16:13:30+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-03-05T18:12:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=21c96f68f760ca303bb462134386ae201add4b44'/>
<id>21c96f68f760ca303bb462134386ae201add4b44</id>
<content type='text'>
This destructor declaration serves no purpose, as pointed out by LWG
3903 which was approved at Varna, June 2023.

libstdc++-v3/ChangeLog:

	* include/std/span (span::~span): Remove, as per LWG 3903.

Reviewed-by: Patrick Palka &lt;ppalka@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This destructor declaration serves no purpose, as pointed out by LWG
3903 which was approved at Varna, June 2023.

libstdc++-v3/ChangeLog:

	* include/std/span (span::~span): Remove, as per LWG 3903.

Reviewed-by: Patrick Palka &lt;ppalka@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Adjust indentation of new std::span constructor</title>
<updated>2025-01-08T12:45:38+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-01-07T09:23:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=21afe12867ed9e13610043ac4d336dc248868bee'/>
<id>21afe12867ed9e13610043ac4d336dc248868bee</id>
<content type='text'>
libstdc++-v3/ChangeLog:

	* include/std/span: Fix indentation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libstdc++-v3/ChangeLog:

	* include/std/span: Fix indentation.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: add initializer_list constructor to std::span (P2447R6)</title>
<updated>2025-01-08T12:45:38+00:00</updated>
<author>
<name>Giuseppe D'Angelo</name>
<email>giuseppe.dangelo@kdab.com</email>
</author>
<published>2024-12-20T12:09:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=5db068738469be8c2bf3cfbda4c54725bd9fe228'/>
<id>5db068738469be8c2bf3cfbda4c54725bd9fe228</id>
<content type='text'>
This commit implements P2447R6. The code is straightforward (just one
extra constructor, with constraints and conditional explicit).

I decided to suppress -Winit-list-lifetime because otherwise it would
give too many false positives. The new constructor is meant to be used
as a parameter-passing interface (this is a design choice, see
P2447R6/§2) and, as such, the initializer_list won't dangle despite
GCC's warnings.

The new constructor isn't 100% backwards compatible. A couple of
examples are included in Annex C, but I have also lifted some more
from R4. A new test checks for the old and the new behaviors.

libstdc++-v3/ChangeLog:

	* include/bits/version.def: Add the new feature-testing macro.
	* include/bits/version.h: Regenerate.
	* include/std/span: Add constructor from initializer_list.
	* testsuite/23_containers/span/init_list_cons.cc: New test.
	* testsuite/23_containers/span/init_list_cons_neg.cc: New test.

Signed-off-by: Giuseppe D'Angelo &lt;giuseppe.dangelo@kdab.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit implements P2447R6. The code is straightforward (just one
extra constructor, with constraints and conditional explicit).

I decided to suppress -Winit-list-lifetime because otherwise it would
give too many false positives. The new constructor is meant to be used
as a parameter-passing interface (this is a design choice, see
P2447R6/§2) and, as such, the initializer_list won't dangle despite
GCC's warnings.

The new constructor isn't 100% backwards compatible. A couple of
examples are included in Annex C, but I have also lifted some more
from R4. A new test checks for the old and the new behaviors.

libstdc++-v3/ChangeLog:

	* include/bits/version.def: Add the new feature-testing macro.
	* include/bits/version.h: Regenerate.
	* include/std/span: Add constructor from initializer_list.
	* testsuite/23_containers/span/init_list_cons.cc: New test.
	* testsuite/23_containers/span/init_list_cons_neg.cc: New test.

Signed-off-by: Giuseppe D'Angelo &lt;giuseppe.dangelo@kdab.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Avoid redundant assertions in std::span constructors</title>
<updated>2025-01-08T12:45:37+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2024-12-11T22:56:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=cbef2c1dbd0a609f68862c0a9aa9bf80a502411e'/>
<id>cbef2c1dbd0a609f68862c0a9aa9bf80a502411e</id>
<content type='text'>
Any std::span&lt;T, N&gt; constructor with a runtime length has a precondition
that the length is equal to N (except when N == std::dynamic_extent).

Currently every constructor with a runtime length does:

if constexpr (extent != dynamic_extent)
  __glibcxx_assert(n == extent);

We can move those assertions into the __detail::__extent_storage&lt;N&gt;
constructor so they are only done in one place. To avoid checking the
assertions when we have a constant length we can add a second
constructor which is consteval and takes a integral_constant&lt;size_t, N&gt;
argument. The std::span constructors can pass a size_t for runtime
lengths and a std::integral_constant&lt;size_t, N&gt; for constant lengths
that don't need to be checked.

The __detail::__extent_storage&lt;dynamic_extent&gt; specialization only needs
one constructor, as a std::integral_constant&lt;size_t, N&gt; argument can
implicitly convert to size_t.

For the member functions that return a subspan with a constant extent we
return std::span&lt;T,C&gt;(ptr, C) which is redundant in two ways. Repeating
the constant length C when it's already a template argument is
redundant, and using the std::span(T*, size_t) constructor implies a
runtime length which will do a redundant assertion check.  Even though
that assertion won't fail and should be optimized away, it's still
unnecessary code that doesn't need to be instantiated and then optimized
away again. We can avoid that by adding a new private constructor that
only takes a pointer (wrapped in a custom tag struct to avoid
accidentally using that constructor) and automatically sets _M_extent to
the correct value.

libstdc++-v3/ChangeLog:

	* include/std/span (__detail::__extent_storage): Check
	precondition in constructor. Add consteval constructor for valid
	lengths and deleted constructor for invalid constant lengths.
	Make member functions always_inline.
	(__detail::__span_ptr): New class template.
	(span): Adjust constructors to use a std::integral_constant
	value for constant lengths. Declare all specializations of
	std::span as friends.
	(span::first&lt;C&gt;, span::last&lt;C&gt;, span::subspan&lt;O,C&gt;): Use new
	private constructor.
	(span(__span_ptr&lt;T&gt;)): New private constructor for constant
	lengths.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Any std::span&lt;T, N&gt; constructor with a runtime length has a precondition
that the length is equal to N (except when N == std::dynamic_extent).

Currently every constructor with a runtime length does:

if constexpr (extent != dynamic_extent)
  __glibcxx_assert(n == extent);

We can move those assertions into the __detail::__extent_storage&lt;N&gt;
constructor so they are only done in one place. To avoid checking the
assertions when we have a constant length we can add a second
constructor which is consteval and takes a integral_constant&lt;size_t, N&gt;
argument. The std::span constructors can pass a size_t for runtime
lengths and a std::integral_constant&lt;size_t, N&gt; for constant lengths
that don't need to be checked.

The __detail::__extent_storage&lt;dynamic_extent&gt; specialization only needs
one constructor, as a std::integral_constant&lt;size_t, N&gt; argument can
implicitly convert to size_t.

For the member functions that return a subspan with a constant extent we
return std::span&lt;T,C&gt;(ptr, C) which is redundant in two ways. Repeating
the constant length C when it's already a template argument is
redundant, and using the std::span(T*, size_t) constructor implies a
runtime length which will do a redundant assertion check.  Even though
that assertion won't fail and should be optimized away, it's still
unnecessary code that doesn't need to be instantiated and then optimized
away again. We can avoid that by adding a new private constructor that
only takes a pointer (wrapped in a custom tag struct to avoid
accidentally using that constructor) and automatically sets _M_extent to
the correct value.

libstdc++-v3/ChangeLog:

	* include/std/span (__detail::__extent_storage): Check
	precondition in constructor. Add consteval constructor for valid
	lengths and deleted constructor for invalid constant lengths.
	Make member functions always_inline.
	(__detail::__span_ptr): New class template.
	(span): Adjust constructors to use a std::integral_constant
	value for constant lengths. Declare all specializations of
	std::span as friends.
	(span::first&lt;C&gt;, span::last&lt;C&gt;, span::subspan&lt;O,C&gt;): Use new
	private constructor.
	(span(__span_ptr&lt;T&gt;)): New private constructor for constant
	lengths.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright years.</title>
<updated>2025-01-02T10:59:57+00:00</updated>
<author>
<name>Jakub Jelinek</name>
<email>jakub@redhat.com</email>
</author>
<published>2025-01-02T10:59:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=6441eb6dc020faae0672ea724dfdb38c6a9bf6a1'/>
<id>6441eb6dc020faae0672ea724dfdb38c6a9bf6a1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Skip redundant assertions in std::span construction [PR117966]</title>
<updated>2024-12-11T21:50:46+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2024-12-09T17:35:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=e95bda027e0b81922c1bf44770674190bdf787e8'/>
<id>e95bda027e0b81922c1bf44770674190bdf787e8</id>
<content type='text'>
As PR c++/117966 shows, the Debug Mode checks cause a compilation error
for a global constexpr std::span. Those debug checks are redundant when
constructing from an array or a range, because we already know we have a
valid range and we know its size. Instead of delegating to the
std::span(contiguous_iterator, contiguous_iterator) constructor, just
initialize the data members directly.

libstdc++-v3/ChangeLog:

	PR libstdc++/117966
	* include/std/span (span(T (&amp;)[N])): Do not delegate to
	constructor that performs redundant checks.
	(span(array&lt;T, N&gt;&amp;), span(const array&lt;T, N&gt;&amp;)): Likewise.
	(span(Range&amp;&amp;), span(const span&lt;T, N&gt;&amp;)): Likewise.
	* testsuite/23_containers/span/117966.cc: New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As PR c++/117966 shows, the Debug Mode checks cause a compilation error
for a global constexpr std::span. Those debug checks are redundant when
constructing from an array or a range, because we already know we have a
valid range and we know its size. Instead of delegating to the
std::span(contiguous_iterator, contiguous_iterator) constructor, just
initialize the data members directly.

libstdc++-v3/ChangeLog:

	PR libstdc++/117966
	* include/std/span (span(T (&amp;)[N])): Do not delegate to
	constructor that performs redundant checks.
	(span(array&lt;T, N&gt;&amp;), span(const array&lt;T, N&gt;&amp;)): Likewise.
	(span(Range&amp;&amp;), span(const span&lt;T, N&gt;&amp;)): Likewise.
	* testsuite/23_containers/span/117966.cc: New test.
</pre>
</div>
</content>
</entry>
</feed>
