Skip to content

Commit ee5b56a

Browse files
committed
Merge 2020-11 LWG Motion 3
2 parents 563b324 + ba02b31 commit ee5b56a

13 files changed

+570
-298
lines changed

source/algorithms.tex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,12 @@
262262
that takes separate iterator and sentinel arguments.
263263

264264
\pnum
265-
The number and order of deducible template parameters for algorithm declarations
266-
are unspecified, except where explicitly stated otherwise.
265+
The well-formedness and behavior of a call to an algorithm with
266+
an explicitly-specified template argument list
267+
is unspecified, except where explicitly stated otherwise.
267268
\begin{note}
268-
Consequently, an implementation can reject calls
269-
that specify an explicit template argument list.
269+
Consequently, an implementation can declare an algorithm with
270+
different template parameters than those presented.
270271
\end{note}
271272

272273
\rSec1[algorithms.parallel]{Parallel algorithms}

source/atomics.tex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,10 +626,11 @@
626626
\end{note}
627627

628628
\pnum
629-
The function \tcode{atomic_is_lock_free}\iref{atomics.types.operations}
630-
indicates whether the object is lock-free. In any given program execution, the
631-
result of the lock-free query shall be consistent for all pointers of the same
632-
type.
629+
The functions \tcode{atomic<T>::is_lock_free} and
630+
\tcode{atomic_is_lock_free}\iref{atomics.types.operations}
631+
indicate whether the object is lock-free. In any given program execution, the
632+
result of the lock-free query
633+
is the same for all atomic objects of the same type.
633634

634635
\pnum
635636
Atomic operations that are not lock-free are considered to potentially

source/concepts.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@
331331

332332
\pnum
333333
Given types \tcode{From} and \tcode{To} and
334-
an expression \tcode{E} such that
335-
\tcode{decltype((E))} is \tcode{add_rvalue_reference_t<From>},
334+
an expression \tcode{E}
335+
whose type and value category are the same as those of \tcode{declval<From>()},
336336
\tcode{\libconcept{convertible_to}<From, To>} requires \tcode{E}
337337
to be both implicitly and explicitly convertible to type \tcode{To}.
338338
The implicit and explicit conversions are required to produce equal
@@ -907,7 +907,7 @@
907907
A \defnadj{key}{parameter} of a function template \tcode{D}
908908
is a function parameter of type \cv{} \tcode{X} or reference thereto,
909909
where \tcode{X} names a specialization of a class template that
910-
is a member of the same namespace as \tcode{D}, and
910+
has the same innermost enclosing non-inline namespace as \tcode{D}, and
911911
\tcode{X} contains at least one template parameter that
912912
participates in template argument deduction.
913913
\begin{example}

source/containers.tex

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,9 @@
179179
\tcode{a = rv} &
180180
\tcode{X\&} &
181181
All existing elements of \tcode{a} are either move assigned to or destroyed &
182-
\ensures \tcode{a} is equal to the value that \tcode{rv}
183-
had before this assignment &
182+
\ensures If \tcode{a} and \tcode{rv} do not refer to the same object,
183+
\tcode{a} is equal to the value that \tcode{rv}
184+
had before this assignment. &
184185
linear \\ \rowsep
185186

186187
\tcode{a.\~X()} &
@@ -707,7 +708,8 @@
707708
\oldconcept{MoveAssignable}.\br
708709
\effects All existing elements of \tcode{a}
709710
are either move assigned to or destroyed.\br
710-
\ensures \tcode{a} is equal to the value that \tcode{rv} had before
711+
\ensures If \tcode{a} and \tcode{rv} do not refer to the same object,
712+
\tcode{a} is equal to the value that \tcode{rv} had before
711713
this assignment. &
712714
linear \\ \rowsep
713715

@@ -1274,11 +1276,12 @@
12741276
using allocator_type = @\seebelownc{}@;
12751277

12761278
private:
1277-
using container_node_type = @\unspecnc@;
1278-
using ator_traits = allocator_traits<allocator_type>;
1279+
using container_node_type = @\unspecnc@; // \expos
1280+
using ator_traits = allocator_traits<allocator_type>; // \expos
12791281

1280-
typename ator_traits::template rebind_traits<container_node_type>::pointer ptr_;
1281-
optional<allocator_type> alloc_;
1282+
typename ator_traits::template
1283+
rebind_traits<container_node_type>::pointer ptr_; // \expos
1284+
optional<allocator_type> alloc_; // \expos
12821285

12831286
public:
12841287
// \ref{container.node.cons}, constructors, copy, and assignment

source/future.tex

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,6 +1514,50 @@
15141514
\tcode{rdbuf()->pcount()}.
15151515
\end{itemdescr}
15161516

1517+
\rSec1[depr.default.allocator]{The default allocator}
1518+
1519+
\pnum
1520+
The following member is defined in addition to those
1521+
specified in \ref{default.allocator}:
1522+
1523+
\begin{codeblock}
1524+
namespace std {
1525+
template<class T> class allocator {
1526+
public:
1527+
using is_always_equal = true_type;
1528+
};
1529+
}
1530+
\end{codeblock}
1531+
1532+
\rSec1[depr.mem.poly.allocator.mem]{Deprecated \tcode{polymorphic_allocator} member function}
1533+
1534+
\pnum
1535+
The following member is declared in addition to those members
1536+
specified in \ref{mem.poly.allocator.mem}:
1537+
1538+
\begin{codeblock}
1539+
namespace std::pmr {
1540+
template<class Tp = byte>
1541+
class polymorphic_allocator {
1542+
public:
1543+
template <class T>
1544+
void destroy(T* p);
1545+
};
1546+
}
1547+
\end{codeblock}
1548+
1549+
\indexlibrarymember{destroy}{polymorphic_allocator}%
1550+
\begin{itemdecl}
1551+
template<class T>
1552+
void destroy(T* p);
1553+
\end{itemdecl}
1554+
1555+
\begin{itemdescr}
1556+
\pnum
1557+
\effects
1558+
As if by \tcode{p->\~T()}.
1559+
\end{itemdescr}
1560+
15171561
\rSec1[depr.meta.types]{Deprecated type traits}
15181562

15191563
\pnum

source/iostreams.tex

Lines changed: 65 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,6 +1604,7 @@
16041604
member function called from within
16051605
\tcode{fn}
16061606
has well-defined results.
1607+
Then, any memory obtained is deallocated.
16071608
\end{itemdescr}
16081609

16091610
\rSec2[fpos]{Class template \tcode{fpos}}
@@ -4986,6 +4987,8 @@
49864987
\returns
49874988
The number of characters
49884989
extracted by the last unformatted input member function called for the object.
4990+
If the number cannot be represented,
4991+
returns \tcode{numeric_limits<streamsize>::max()}.
49894992
\end{itemdescr}
49904993

49914994
\indexlibrarymember{get}{basic_istream}%
@@ -14217,6 +14220,11 @@
1421714220
bool operator==(const directory_entry& rhs) const noexcept;
1421814221
strong_ordering operator<=>(const directory_entry& rhs) const noexcept;
1421914222

14223+
// \ref{fs.dir.entry.io}, inserter
14224+
template<class charT, class traits>
14225+
friend basic_ostream<charT, traits>&
14226+
operator<<(basic_ostream<charT, traits>& os, const directory_entry& d);
14227+
1422014228
private:
1422114229
filesystem::path pathobject; // \expos
1422214230
friend class directory_iterator; // \expos
@@ -14635,6 +14643,21 @@
1463514643
\tcode{pathobject <=> rhs.pathobject}.
1463614644
\end{itemdescr}
1463714645

14646+
\rSec3[fs.dir.entry.io]{Inserter}
14647+
14648+
\indexlibrarymember{operator<<}{directory_entry}%
14649+
\begin{itemdecl}
14650+
template<class charT, class traits>
14651+
friend basic_ostream<charT, traits>&
14652+
operator<<(basic_ostream<charT, traits>& os, const directory_entry& d);
14653+
\end{itemdecl}
14654+
14655+
\begin{itemdescr}
14656+
\pnum
14657+
\effects
14658+
Equivalent to: \tcode{return os << d.path();}
14659+
\end{itemdescr}
14660+
1463814661
\rSec2[fs.class.directory.iterator]{Class \tcode{directory_iterator}}
1463914662

1464014663
\rSec3[fs.class.directory.iterator.general]{General}
@@ -17184,39 +17207,39 @@
1718417207
imaxdiv_t div(intmax_t, intmax_t); // optional, see below
1718517208
}
1718617209

17187-
#define PRIdN @\seebelow@
17188-
#define PRIiN @\seebelow@
17189-
#define PRIoN @\seebelow@
17190-
#define PRIuN @\seebelow@
17191-
#define PRIxN @\seebelow@
17192-
#define PRIXN @\seebelow@
17193-
#define SCNdN @\seebelow@
17194-
#define SCNiN @\seebelow@
17195-
#define SCNoN @\seebelow@
17196-
#define SCNuN @\seebelow@
17197-
#define SCNxN @\seebelow@
17198-
#define PRIdLEASTN @\seebelow@
17199-
#define PRIiLEASTN @\seebelow@
17200-
#define PRIoLEASTN @\seebelow@
17201-
#define PRIuLEASTN @\seebelow@
17202-
#define PRIxLEASTN @\seebelow@
17203-
#define PRIXLEASTN @\seebelow@
17204-
#define SCNdLEASTN @\seebelow@
17205-
#define SCNiLEASTN @\seebelow@
17206-
#define SCNoLEASTN @\seebelow@
17207-
#define SCNuLEASTN @\seebelow@
17208-
#define SCNxLEASTN @\seebelow@
17209-
#define PRIdFASTN @\seebelow@
17210-
#define PRIiFASTN @\seebelow@
17211-
#define PRIoFASTN @\seebelow@
17212-
#define PRIuFASTN @\seebelow@
17213-
#define PRIxFASTN @\seebelow@
17214-
#define PRIXFASTN @\seebelow@
17215-
#define SCNdFASTN @\seebelow@
17216-
#define SCNiFASTN @\seebelow@
17217-
#define SCNoFASTN @\seebelow@
17218-
#define SCNuFASTN @\seebelow@
17219-
#define SCNxFASTN @\seebelow@
17210+
#define PRId@\placeholdernc{N}@ @\seebelow@
17211+
#define PRIi@\placeholdernc{N}@ @\seebelow@
17212+
#define PRIo@\placeholdernc{N}@ @\seebelow@
17213+
#define PRIu@\placeholdernc{N}@ @\seebelow@
17214+
#define PRIx@\placeholdernc{N}@ @\seebelow@
17215+
#define PRIX@\placeholdernc{N}@ @\seebelow@
17216+
#define SCNd@\placeholdernc{N}@ @\seebelow@
17217+
#define SCNi@\placeholdernc{N}@ @\seebelow@
17218+
#define SCNo@\placeholdernc{N}@ @\seebelow@
17219+
#define SCNu@\placeholdernc{N}@ @\seebelow@
17220+
#define SCNx@\placeholdernc{N}@ @\seebelow@
17221+
#define PRIdLEAST@\placeholdernc{N}@ @\seebelow@
17222+
#define PRIiLEAST@\placeholdernc{N}@ @\seebelow@
17223+
#define PRIoLEAST@\placeholdernc{N}@ @\seebelow@
17224+
#define PRIuLEAST@\placeholdernc{N}@ @\seebelow@
17225+
#define PRIxLEAST@\placeholdernc{N}@ @\seebelow@
17226+
#define PRIXLEAST@\placeholdernc{N}@ @\seebelow@
17227+
#define SCNdLEAST@\placeholdernc{N}@ @\seebelow@
17228+
#define SCNiLEAST@\placeholdernc{N}@ @\seebelow@
17229+
#define SCNoLEAST@\placeholdernc{N}@ @\seebelow@
17230+
#define SCNuLEAST@\placeholdernc{N}@ @\seebelow@
17231+
#define SCNxLEAST@\placeholdernc{N}@ @\seebelow@
17232+
#define PRIdFAST@\placeholdernc{N}@ @\seebelow@
17233+
#define PRIiFAST@\placeholdernc{N}@ @\seebelow@
17234+
#define PRIoFAST@\placeholdernc{N}@ @\seebelow@
17235+
#define PRIuFAST@\placeholdernc{N}@ @\seebelow@
17236+
#define PRIxFAST@\placeholdernc{N}@ @\seebelow@
17237+
#define PRIXFAST@\placeholdernc{N}@ @\seebelow@
17238+
#define SCNdFAST@\placeholdernc{N}@ @\seebelow@
17239+
#define SCNiFAST@\placeholdernc{N}@ @\seebelow@
17240+
#define SCNoFAST@\placeholdernc{N}@ @\seebelow@
17241+
#define SCNuFAST@\placeholdernc{N}@ @\seebelow@
17242+
#define SCNxFAST@\placeholdernc{N}@ @\seebelow@
1722017243
#define PRIdMAX @\seebelow@
1722117244
#define PRIiMAX @\seebelow@
1722217245
#define PRIoMAX @\seebelow@
@@ -17262,3 +17285,12 @@
1726217285
\end{itemize}
1726317286

1726417287
\xrefc{7.8}
17288+
17289+
\pnum
17290+
Each of the \tcode{PRI} macros listed in this subclause
17291+
is defined if and only if the implementation
17292+
defines the corresponding typedef name in~\ref{cstdint.syn}.
17293+
Each of the \tcode{SCN} macros listed in this subclause
17294+
is defined if and only if the implementation
17295+
defines the corresponding typedef name in~\ref{cstdint.syn} and
17296+
has a suitable \tcode{fscanf} length modifier for the type.

0 commit comments

Comments
 (0)