Skip to content

Commit 467962e

Browse files
committed
Merge 2022-07 LWG Motion 4
2 parents 5406e3e + 165dc29 commit 467962e

File tree

1 file changed

+44
-43
lines changed

1 file changed

+44
-43
lines changed

source/containers.tex

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -15692,7 +15692,7 @@
1569215692
\end{itemdescr}
1569315693

1569415694
\begin{itemdecl}
15695-
m.is_contiguous()
15695+
m.is_exhaustive()
1569615696
\end{itemdecl}
1569715697

1569815698
\begin{itemdescr}
@@ -15708,7 +15708,7 @@
1570815708
\begin{note}
1570915709
A mapping can return \tcode{false} even if the condition is met.
1571015710
For certain layouts, it is possibly not feasible to determine efficiently
15711-
whether the layout is contiguous.
15711+
whether the layout is exhaustive.
1571215712
\end{note}
1571315713
\end{itemdescr}
1571415714

@@ -15779,7 +15779,7 @@
1577915779
\end{itemdescr}
1578015780

1578115781
\begin{itemdecl}
15782-
M::is_always_contiguous()
15782+
M::is_always_exhaustive()
1578315783
\end{itemdecl}
1578415784

1578515785
\begin{itemdescr}
@@ -15789,12 +15789,12 @@
1578915789

1579015790
\pnum
1579115791
\returns
15792-
\tcode{true} only if \tcode{m.is_contiguous()} is \tcode{true}
15792+
\tcode{true} only if \tcode{m.is_exhaustive()} is \tcode{true}
1579315793
for all possible objects \tcode{m} of type \tcode{M}.
1579415794
\begin{note}
1579515795
A mapping can return \tcode{false} even if the above condition is met.
1579615796
For certain layout mappings, it is possibly not feasible to determine
15797-
whether every instance is contiguous.
15797+
whether every instance is exhaustive.
1579815798
\end{note}
1579915799
\end{itemdescr}
1580015800

@@ -15897,11 +15897,11 @@
1589715897
constexpr index_type operator()(Indices...) const noexcept;
1589815898

1589915899
static constexpr bool is_always_unique() noexcept { return true; }
15900-
static constexpr bool is_always_contiguous() noexcept { return true; }
15900+
static constexpr bool is_always_exhaustive() noexcept { return true; }
1590115901
static constexpr bool is_always_strided() noexcept { return true; }
1590215902

1590315903
static constexpr bool is_unique() noexcept { return true; }
15904-
static constexpr bool is_contiguous() noexcept { return true; }
15904+
static constexpr bool is_exhaustive() noexcept { return true; }
1590515905
static constexpr bool is_strided() noexcept { return true; }
1590615906

1590715907
constexpr index_type stride(rank_type) const noexcept;
@@ -16149,11 +16149,11 @@
1614916149
constexpr index_type operator()(Indices...) const noexcept;
1615016150

1615116151
static constexpr bool is_always_unique() noexcept { return true; }
16152-
static constexpr bool is_always_contiguous() noexcept { return true; }
16152+
static constexpr bool is_always_exhaustive() noexcept { return true; }
1615316153
static constexpr bool is_always_strided() noexcept { return true; }
1615416154

1615516155
static constexpr bool is_unique() noexcept { return true; }
16156-
static constexpr bool is_contiguous() noexcept { return true; }
16156+
static constexpr bool is_exhaustive() noexcept { return true; }
1615716157
static constexpr bool is_strided() noexcept { return true; }
1615816158

1615916159
constexpr index_type stride(rank_type) const noexcept;
@@ -16402,11 +16402,11 @@
1640216402
constexpr index_type operator()(Indices...) const noexcept;
1640316403

1640416404
static constexpr bool is_always_unique() noexcept { return true; }
16405-
static constexpr bool is_always_contiguous() noexcept { return false; }
16405+
static constexpr bool is_always_exhaustive() noexcept { return false; }
1640616406
static constexpr bool is_always_strided() noexcept { return true; }
1640716407

1640816408
static constexpr bool is_unique() noexcept { return true; }
16409-
constexpr bool is_contiguous() const noexcept;
16409+
constexpr bool is_exhaustive() const noexcept;
1641016410
static constexpr bool is_strided() noexcept { return true; }
1641116411

1641216412
constexpr index_type stride(rank_type i) const noexcept { return @\exposid{strides_}@[i]; }
@@ -16474,17 +16474,17 @@
1647416474
concept @\defexposconcept{layout-mapping-alike}@ = requires { // \expos
1647516475
requires @\exposid{is-extents}@<typename M::extents_type>;
1647616476
{ M::is_always_strided() } -> same_as<bool>;
16477-
{ M::is_always_contiguous() } -> same_as<bool>;
16477+
{ M::is_always_exhaustive() } -> same_as<bool>;
1647816478
{ M::is_always_unique() } -> same_as<bool>;
1647916479
bool_constant<M::is_always_strided()>::value;
16480-
bool_constant<M::is_always_contiguous()>::value;
16480+
bool_constant<M::is_always_exhaustive()>::value;
1648116481
bool_constant<M::is_always_unique()>::value;
1648216482
};
1648316483
\end{codeblock}
1648416484
\begin{note}
1648516485
This concept checks that the functions
1648616486
\tcode{M::is_always_strided()},
16487-
\tcode{M::is_always_contiguous()}, and
16487+
\tcode{M::is_always_exhaustive()}, and
1648816488
\tcode{M::is_always_unique()} exist,
1648916489
are constant expressions, and
1649016490
have a return type of \tcode{bool}.
@@ -16642,9 +16642,9 @@
1664216642
\end{codeblock}
1664316643
\end{itemdescr}
1664416644

16645-
\indexlibrarymember{is_contiguous}{layout_stride::mapping}%
16645+
\indexlibrarymember{is_exhaustive}{layout_stride::mapping}%
1664616646
\begin{itemdecl}
16647-
constexpr bool is_contiguous() const noexcept;
16647+
constexpr bool is_exhaustive() const noexcept;
1664816648
\end{itemdecl}
1664916649

1665016650
\begin{itemdescr}
@@ -16720,9 +16720,9 @@
1672016720
\item
1672116721
\tcode{a} denotes a value of type \tcode{A} or \tcode{const A}.
1672216722
\item
16723-
\tcode{p} denotes a value of type \tcode{A::pointer} or \tcode{const A::pointer}.
16723+
\tcode{p} denotes a value of type \tcode{A::data_handle_type} or \tcode{const A::data_handle_type}.
1672416724
\begin{note}
16725-
The type \tcode{A::pointer} need not be dereferenceable.
16725+
The type \tcode{A::data_handle_type} need not be dereferenceable.
1672616726
\end{note}
1672716727
\item
1672816728
\tcode{n}, \tcode{i}, and \tcode{j} each denote values of type \tcode{size_t}.
@@ -16757,18 +16757,18 @@
1675716757
\end{itemdescr}
1675816758

1675916759
\begin{itemdecl}
16760-
typename A::pointer
16760+
typename A::data_handle_type
1676116761
\end{itemdecl}
1676216762

1676316763
\begin{itemdescr}
1676416764
\pnum
1676516765
\result
1676616766
A type that models \libconcept{copyable}, and
1676716767
for which \tcode{is_nothrow_move_constructible_v<A::poin\-ter>} is \tcode{true},
16768-
\tcode{is_nothrow_move_assignable_v<A::pointer>} is \tcode{true}, and
16769-
\tcode{is_nothrow_swappable_v<A::pointer>} is \tcode{true}.
16768+
\tcode{is_nothrow_move_assignable_v<A::data_handle_type>} is \tcode{true}, and
16769+
\tcode{is_nothrow_swappable_v<A::data_handle_type>} is \tcode{true}.
1677016770
\begin{note}
16771-
The type of \tcode{pointer} need not be \tcode{element_type*}.
16771+
The type of \tcode{data_handle_type} need not be \tcode{element_type*}.
1677216772
\end{note}
1677316773
\end{itemdescr}
1677416774

@@ -16836,7 +16836,7 @@
1683616836
\begin{itemdescr}
1683716837
\pnum
1683816838
\result
16839-
\tcode{A::offset_policy::pointer}
16839+
\tcode{A::offset_policy::data_handle_type}
1684016840

1684116841
\pnum
1684216842
\returns
@@ -16868,13 +16868,13 @@
1686816868
using offset_policy = default_accessor;
1686916869
using element_type = ElementType;
1687016870
using reference = ElementType&;
16871-
using pointer = ElementType*;
16871+
using data_handle_type = ElementType*;
1687216872

1687316873
constexpr default_accessor() noexcept = default;
1687416874
template<class OtherElementType>
1687516875
constexpr default_accessor(default_accessor<OtherElementType>) noexcept;
16876-
constexpr reference access(pointer p, size_t i) const noexcept;
16877-
constexpr pointer offset(pointer p, size_t i) const noexcept;
16876+
constexpr reference access(data_handle_type p, size_t i) const noexcept;
16877+
constexpr data_handle_type offset(data_handle_type p, size_t i) const noexcept;
1687816878
};
1687916879
}
1688016880
\end{codeblock}
@@ -16892,7 +16892,7 @@
1689216892

1689316893
\pnum
1689416894
$[0, n)$ is an accessible range for
16895-
an object \tcode{p} of type \tcode{pointer} and
16895+
an object \tcode{p} of type \tcode{data_handle_type} and
1689616896
an object of type \tcode{default_accessor}
1689716897
if and only if \range{p}{p + $n$} is a valid range.
1689816898

@@ -16913,7 +16913,7 @@
1691316913

1691416914
\indexlibrarymember{access}{default_accessor}%
1691516915
\begin{itemdecl}
16916-
constexpr reference access(pointer p, size_t i) const noexcept;
16916+
constexpr reference access(data_handle_type p, size_t i) const noexcept;
1691716917
\end{itemdecl}
1691816918

1691916919
\begin{itemdescr}
@@ -16924,7 +16924,7 @@
1692416924

1692516925
\indexlibrarymember{offset}{default_accessor}%
1692616926
\begin{itemdecl}
16927-
constexpr pointer offset(pointer p, size_t i) const noexcept;
16927+
constexpr data_handle_type offset(data_handle_type p, size_t i) const noexcept;
1692816928
\end{itemdecl}
1692916929

1693016930
\begin{itemdescr}
@@ -16954,7 +16954,7 @@
1695416954
using index_type = typename extents_type::index_type;
1695516955
using size_type = typename extents_type::size_type;
1695616956
using rank_type = typename extents_type::rank_type;
16957-
using pointer = typename accessor_type::pointer;
16957+
using data_handle_type = typename accessor_type::data_handle_type;
1695816958
using reference = typename accessor_type::reference;
1695916959

1696016960
static constexpr rank_type rank() noexcept { return extents_type::rank(); }
@@ -17001,21 +17001,21 @@
1700117001
friend constexpr void swap(mdspan& x, mdspan& y) noexcept;
1700217002

1700317003
constexpr const extents_type& extents() const noexcept { return @\exposid{map_}@.extents(); }
17004-
constexpr const pointer& data() const noexcept { return @\exposid{ptr_}@; }
17004+
constexpr const data_handle_type& data_handle() const noexcept { return @\exposid{ptr_}@; }
1700517005
constexpr const mapping_type& mapping() const noexcept { return @\exposid{map_}@; }
1700617006
constexpr const accessor_type& accessor() const noexcept { return @\exposid{acc_}@; }
1700717007

1700817008
static constexpr bool is_always_unique()
1700917009
{ return mapping_type::is_always_unique(); }
17010-
static constexpr bool is_always_contiguous()
17011-
{ return mapping_type::is_always_contiguous(); }
17010+
static constexpr bool is_always_exhaustive()
17011+
{ return mapping_type::is_always_exhaustive(); }
1701217012
static constexpr bool is_always_strided()
1701317013
{ return mapping_type::is_always_strided(); }
1701417014

1701517015
constexpr bool is_unique() const
1701617016
{ return @\exposid{map_}@.is_unique(); }
17017-
constexpr bool is_contiguous() const
17018-
{ return @\exposid{map_}@.is_contiguous(); }
17017+
constexpr bool is_exhaustive() const
17018+
{ return @\exposid{map_}@.is_exhaustive(); }
1701917019
constexpr bool is_strided() const
1702017020
{ return @\exposid{map_.}@is_strided(); }
1702117021
constexpr index_type stride(rank_type r) const
@@ -17024,7 +17024,7 @@
1702417024
private:
1702517025
accessor_type @\exposid{acc_}@; // \expos
1702617026
mapping_type @\exposid{map_}@; // \expos
17027-
pointer @\exposid{ptr_}@; // \expos
17027+
data_handle_type @\exposid{ptr_}@; // \expos
1702817028
};
1702917029

1703017030
template<class CArray>
@@ -17060,7 +17060,8 @@
1706017060
typename MappingType::layout_type>;
1706117061

1706217062
template<class MappingType, class AccessorType>
17063-
mdspan(const typename AccessorType::pointer&, const MappingType&, const AccessorType&)
17063+
mdspan(const typename AccessorType::data_handle_type&, const MappingType&,
17064+
const AccessorType&)
1706417065
-> mdspan<typename AccessorType::element_type, typename MappingType::extents_type,
1706517066
typename MappingType::layout_type, AccessorType>;
1706617067
}
@@ -17098,7 +17099,7 @@
1709817099

1709917100
\pnum
1710017101
A specialization of \tcode{mdspan} is a trivially copyable type if
17101-
its \tcode{accessor_type}, \tcode{mapping_type}, and \tcode{pointer}
17102+
its \tcode{accessor_type}, \tcode{mapping_type}, and \tcode{data_handle_type}
1710217103
are trivially copyable types.
1710317104

1710417105
\rSec3[mdspan.mdspan.ctor]{Constructors}
@@ -17115,7 +17116,7 @@
1711517116
\item
1711617117
\tcode{rank_dynamic() > 0} is \tcode{true}.
1711717118
\item
17118-
\tcode{is_default_constructible_v<pointer>} is \tcode{true}.
17119+
\tcode{is_default_constructible_v<data_handle_type>} is \tcode{true}.
1711917120
\item
1712017121
\tcode{is_default_constructible_v<mapping_type>} is \tcode{true}.
1712117122
\item
@@ -17226,7 +17227,7 @@
1722617227

1722717228
\indexlibraryctor{mdspan}%
1722817229
\begin{itemdecl}
17229-
constexpr mdspan(pointer p, const extents_type& ext);
17230+
constexpr mdspan(data_handle_type p, const extents_type& ext);
1723017231
\end{itemdecl}
1723117232

1723217233
\begin{itemdescr}
@@ -17260,7 +17261,7 @@
1726017261

1726117262
\indexlibraryctor{mdspan}%
1726217263
\begin{itemdecl}
17263-
constexpr mdspan(pointer p, const mapping_type& m);
17264+
constexpr mdspan(data_handle_type p, const mapping_type& m);
1726417265
\end{itemdecl}
1726517266

1726617267
\begin{itemdescr}
@@ -17288,7 +17289,7 @@
1728817289

1728917290
\indexlibraryctor{mdspan}%
1729017291
\begin{itemdecl}
17291-
constexpr mdspan(pointer p, const mapping_type& m, const accessor_type& a);
17292+
constexpr mdspan(data_handle_type p, const mapping_type& m, const accessor_type& a);
1729217293
\end{itemdecl}
1729317294

1729417295
\begin{itemdescr}
@@ -17333,7 +17334,7 @@
1733317334
\mandates
1733417335
\begin{itemize}
1733517336
\item
17336-
\tcode{is_constructible_v<pointer, const OtherAccessor::pointer\&>} is \tcode{true}, and
17337+
\tcode{is_constructible_v<data_handle_type, const OtherAccessor::data_handle_type\&>} is\newline \tcode{true}, and
1733717338
\item
1733817339
\tcode{is_constructible_v<extents_type, OtherExtents>} is \tcode{true}.
1733917340
\end{itemize}

0 commit comments

Comments
 (0)