Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions source/compatibility.tex
Original file line number Diff line number Diff line change
Expand Up @@ -258,32 +258,6 @@
Valid \CppXXIII{} code that calls \tcode{realloc}
with a non-null pointer and a size of zero is erroneous and may change behavior.

\rSec2[diff.cpp23.containers]{\ref{containers}: containers library}

\diffref{span.overview}
\change
\tcode{span<const T>} is constructible from \tcode{initializer_list<T>}.
\rationale
Permit passing a braced initializer list to a function taking \tcode{span}.
\effect
Valid \CppXXIII{} code that relies on the lack of this constructor
may refuse to compile, or change behavior in this revision of \Cpp{}.
\begin{example}
\begin{codeblock}
void one(pair<int, int>); // \#1
void one(span<const int>); // \#2
void t1() { one({1, 2}); } // ambiguous between \#1 and \#2; previously called \#1

void two(span<const int, 2>);
void t2() { two({{1, 2}}); } // ill-formed; previously well-formed

void *a[10];
int x = span<void* const>{a, 0}.size(); // \tcode{x} is \tcode{2}; previously \tcode{0}
any b[10];
int y = span<const any>{b, b + 10}.size(); // \tcode{y} is \tcode{2}; previously \tcode{10}
\end{codeblock}
\end{example}

\rSec2[diff.cpp23.strings]{\ref{strings}: strings library}

\diffref{string.conversions}
Expand Down
24 changes: 0 additions & 24 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -20381,8 +20381,6 @@

\indexheader{span}%
\begin{codeblock}
#include <initializer_list> // see \ref{initializer.list.syn}

// mostly freestanding
namespace std {
// constants
Expand Down Expand Up @@ -20469,7 +20467,6 @@
constexpr span(const array<T, N>& arr) noexcept;
template<class R>
constexpr explicit(extent != dynamic_extent) span(R&& r);
constexpr explicit(extent != dynamic_extent) span(std::initializer_list<value_type> il);
constexpr span(const span& other) noexcept = default;
template<class OtherElementType, size_t OtherExtent>
constexpr explicit(@\seebelow@) span(const span<OtherElementType, OtherExtent>& s) noexcept;
Expand Down Expand Up @@ -20730,27 +20727,6 @@
What and when \tcode{ranges::data(r)} and \tcode{ranges::size(r)} throw.
\end{itemdescr}

\indexlibraryctor{span}%
\begin{itemdecl}
constexpr explicit(extent != dynamic_extent) span(std::initializer_list<value_type> il);
\end{itemdecl}

\begin{itemdescr}
\pnum
\constraints
\tcode{is_const_v<element_type>} is \tcode{true}.

\pnum
\hardexpects
If \tcode{extent} is not equal to \tcode{dynamic_extent},
then \tcode{il.size() == extent} is \tcode{true}.

\pnum
\effects
Initializes \exposid{data_} with \tcode{il.data()} and
\exposid{size_} with \tcode{il.size()}.
\end{itemdescr}

\indexlibraryctor{span}%
\begin{itemdecl}
constexpr span(const span& other) noexcept = default;
Expand Down
1 change: 0 additions & 1 deletion source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,6 @@
#define @\defnlibxname{cpp_lib_smart_ptr_owner_equality}@ 202306L // also in \libheader{memory}
#define @\defnlibxname{cpp_lib_source_location}@ 201907L // freestanding, also in \libheader{source_location}
#define @\defnlibxname{cpp_lib_span}@ 202311L // freestanding, also in \libheader{span}
#define @\defnlibxname{cpp_lib_span_initializer_list}@ 202311L // freestanding, also in \libheader{span}
#define @\defnlibxname{cpp_lib_spanstream}@ 202106L // also in \libheader{iosfwd}, \libheader{spanstream}
#define @\defnlibxname{cpp_lib_ssize}@ 201902L // freestanding, also in \libheader{iterator}
#define @\defnlibxname{cpp_lib_sstream_from_string_view}@ 202306L // also in \libheader{sstream}
Expand Down
Loading