diff --git a/.travis.yml b/.travis.yml
index cc9df4af03..2c99e00e4f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,6 +7,7 @@ env:
- BUILD_TYPE=make # build using Makefile
- BUILD_TYPE=manual # build manually
- BUILD_TYPE=complete # build manually and regenerate figures, grammer, and cross-references
+ - BUILD_TYPE=check-whitespace # check for whitespace at the ends of lines
script:
# Build std.pdf
@@ -35,6 +36,10 @@ script:
pdflatex std;
fi
- popd
+ # Fail if there is whitespace at the ends of any lines
+ - if [ "$BUILD_TYPE" = "check-whitespace" ]; then
+ ! grep '\s$' source/*.tex;
+ fi
# Check to see if generated files are out-dated
- pushd source
- for FIGURE in *.dot; do
diff --git a/README.rst b/README.rst
index ee1f554bff..162aefdca4 100644
--- a/README.rst
+++ b/README.rst
@@ -26,6 +26,22 @@ then run the following command to install the other packages that the draft requ
sudo tlmgr install latexmk isodate substr relsize ulem fixme rsfs extract layouts enumitem
+---------------------------------------
+Getting Started on Debian-based Systems
+---------------------------------------
+
+Install the following packages:
+
+ sudo apt-get install latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
+
+-------------------------
+Getting Started on Fedora
+-------------------------
+
+Install the following packages:
+
+ dnf install texlive texlive-isodate texlive-relsize texlive-ulem texlive-fixme texlive-extract
+
------------
Instructions
------------
diff --git a/papers/n4659.pdf b/papers/n4659.pdf
new file mode 100644
index 0000000000..532d5d4040
Binary files /dev/null and b/papers/n4659.pdf differ
diff --git a/papers/n4661.html b/papers/n4661.html
new file mode 100644
index 0000000000..a29605270a
--- /dev/null
+++ b/papers/n4661.html
@@ -0,0 +1,1005 @@
+
N4661
+N4661 Editors' Report -- Programming Languages -- C++
+
+2017-03-20
+Richard Smith (editor) (Google Inc)
+Dawn Perchik (co-editor) (Embarcadero Technologies Inc)
+Thomas Köppe (co-editor) (Google DeepMind)
+<cxxeditor@gmail.com>
+
+Acknowledgements
+
+Special thanks to
+the members of the editing committee for the C++17 DIS, namely
+Marshall Clow,
+Mike Miller,
+Ville Voutilainen,
+and
+Jeffrey Yasskin
+for their review of the correctness of the working paper
+as modified by the motions from the Kona 2017 meeting.
+
+Special thanks also to
+Jonathan Wakely
+and
+Alisdair Meredith
+for performing edits and editorial review for several of the motions applied since N4640,
+and to
+Jens Maurer
+for performing many of the editorial fixes since N4640.
+
+Thanks to all those who have submitted editorial
+issues
+and to those who have provided pull requests with fixes.
+
+New papers
+
+
+- N4659 is the current working draft. It replaces N4640.
+- N4660 is the C++17 DIS.
+- N4661 is this Editors' Report.
+
+
+The contents of N4659 and N4660 are identical except for the cover sheet and
+page headings.
+
+Motions incorporated into working draft and C++17 DIS
+
+Core working group motions
+
+CWG motion 1: Core issue resolutions for 5 issues in "ready" status applied:
+
+
+- 1677 Constant initialization via aggregate initialization
+- 1860 What is a "direct member?"
+- 2174 Unclear rules for friend definitions in templates
+- 2205 Restrictions on use of alignas
+- 2218 Ambiguity and namespace aliases
+
+
+The other 7 issues in "ready" status from P0575R1 were applied by CWG Motion 3
+
+CWG motion 2: Core issue resolutions for 5 issues in "tentatively ready" status applied:
+
+
+- 2201 Cv-qualification of array types
+- 2206 Composite type of object and function pointers
+- 2214 Missing requirement on representation of integer values
+- 2220 Hiding index variable in range-based
for
+- 2224 Member subobjects and base-class casts
+- 2259 Unclear context describing ambiguity
+- 2262 Attributes for asm-definition
+
+
+CWG motion 3: Core issue resolutions for 12 issues in "ready" and "tentatively ready" status applied, resolving 13 issues:
+
+
+- 426 Identically-named variables, one internally and one externally linked, allowed?
+- 727 In-class explicit specializations
+- 1622 Empty aggregate initializer for union (no changes, resolved by 2272)
+- 1710 Missing
template
keyword in class-or-decltype
+- 2196 Zero-initialization with virtual base classes
+- 2198 Linkage of enumerators
+- 2211 Hiding by lambda captures and parameters
+- 2247 Lambda capture and variable argument list
+- 2248 Problems with sized delete
+- 2251 Unreachable enumeration list-initialization
+- 2268 Unions with mutable members in constant expressions revisited
+- 2272 Implicit initialization of aggregate members of reference type
+- 2276 Dependent
noexcept
and function type-dependence
+
+
+CWG motion 4: P0612R0 "NB comment CH 2: volatile", resolving 1 NB comment:
+
+
+- CH 2: Clarify whether volatile semantics require volatile objects or merely volatile-qualified glvalues
+
+
+CWG motion 5: P0613R0 "NB comment GB15: Resolution of Core Issue 2011", resolving 1 NB comment and 1 issue:
+
+
+- GB 15, 2011 Unclear effect of reference capture of reference
+
+
+CWG motion 6: P0298R3 "A byte
type definition", resolving 3 NB comments:
+
+
+
+CWG motion 7: P0615R0 "Renaming for structured bindings"
+
+CWG motion 8: P0620R0 "Drafting for class template argument deduction issues", resolving 3 NB comments:
+
+
+- US 94, GB 13, FI 21: Support class template argument deduction in
T{x1, x2, ...}
syntax
+
+
+CWG motion 9: P0270R3 "Removing C dependencies from signal handler wording" with changes, see below, resolving 1 NB comment:
+
+
+
+CWG motion 10: P0250R3 "Wording improvements for initialization and thread ids", resolving 2 issues in "concurrency" status:
+
+
+- 1784 Concurrent execution during static local initialization
+- 2046 Incomplete thread specifications
+
+
+CWG motion 11a applies to the Modules TS.
+
+CWG motion 11b was not approved.
+
+Library working group motions
+
+Issue resolutions
+
+LWG motion 1 applies to the Coroutines TS.
+
+LWG motion 2: Library issue resolutions for 22 issues in "Ready" and "Tentatively Ready" status applied, resolving 23 issues:
+
+
+- 2260 Missing requirement for
Allocator::pointer
+- 2768
any_cast
and move semantics (no changes, resolved by 2769)
+- 2769 Redundant
const
in the return type of any_cast(const any&)
+- 2781 Contradictory requirements for
std::function
and std::reference_wrapper
+- 2782
scoped_allocator_adaptor
constructors must be constrained
+- 2784 Resolution to LWG 2484 is missing "otherwise, no effects" and is hard to parse
+- 2785
quoted
should work with basic_string_view
+- 2786 Annex C should mention
shared_ptr
changes for array support
+- 2787 [file_status.cons] doesn't match class definition
+- 2789 Equivalence of contained objects
+- 2794 Missing requirements for allocator pointers
+- 2795 [global.functions] provides incorrect example of ADL use
+- 2804 Unconditional
constexpr
default constructor for istream_iterator
+- 2824
list::sort
should say that the order of elements is unspecified if an exception is thrown
+- 2826
string_view
iterators use old wording
+- 2834 Resolution to LWG 2223 is missing wording about end iterators
+- 2835 Resolution to LWG 2536 seems to misspecify
<tgmath.h>
+- 2837
gcd
and lcm
should support a wider range of input values
+- 2838
is_literal_type
specification needs a little cleanup
+- 2842
in_place_t
check for optional::optional(U&&)
should decay U
+- 2850
std::function
move constructor does unnecessary work
+- 2853 Possible inconsistency in specification of
erase
in [vector.modifiers]
+- 2855
std::throw_with_nested("string_literal")
+
+
+Resolution of 2812 "Range access is available with <string_view>
" not applied, as this issue had already been resolved editorially
+
+LWG motion 3: Library issue resolutions for 3 issues in "Review" status applied:
+
+
+- 2676 Provide
filesystem::path
overloads for "File-based streams"
+- 2790 Missing specification of
istreambuf_iterator::operator->
+- 2796
tuple
should be a literal type
+
+
+Filesystem
+
+LWG motion 4: P0317R1 "Directory entry caching for filesystem" with changes, see below
+
+LWG motion 5: P0492R2 "Proposed resolution of C++17 National Body comments for filesystems", resolving 31 NB comments and 2 issues:
+
+
+- US 32: Meaning of [fs.conform.9945] unclear
+- US 33: Definition of "canonical path" problematic
+- US 34: Are there attributes of a file that are not an aspect of the file system?
+- US 36: Symbolic links themselves are attached to a directory via (hard) links
+- US 37: The term "redundant current directory (dot) elements" is not defined
+- US 43: Concerns about encoded character types
+- US 44, 2798: Definition of
path
in terms of a string requires leaky abstraction
+- US 45: Generic format portability compromised by unspecified root-name (no changes, resolved by US 73, CA 2)
+- US 46: filename can be empty so productions for relative-path are redundant
+- US 47:
.
and ..
already match the name production
+- US 48: Multiple separators are often meaningful in a root-name
+- US 51: Failing to add
/
when appending empty string prevents useful applications (no changes, resolved by US 74, CA 3)
+- US 52, 2665:
remove_filename
postcondition is not by itself a definition
+- US 53:
remove_filename
's name does not correspond to its behavior (no changes, resolved by US 52, US 60)
+- US 54:
remove_filename
is broken
+- US 55:
replace_extension
's use of path
as parameter is inappropriate
+- US 58:
parent_path
behavior for root paths is useless (no changes, resolved by US 77, CA 6)
+- US 60:
path("/foo/").filename() == path(".")
is surprising
+- US 61: Leading dots in
filename
should not begin an extension (no changes, resolved by US 74, CA 3)
+- US 62: It is important that
stem() + extension() == filename()
(no changes, resolved by US 74, CA 3)
+- US 63:
lexically_normal
inconsistently treats trailing /
but not /..
as directory (no changes, resolved by US 37, US 74, CA 3)
+- US 73, CA 2: root-name is effectively implementation defined
+- US 74, CA 3: The term "pathname" is ambiguous in some contexts
+- US 77, CA 6:
operator/
and other append
s not useful if arg has root-name
+- US 78, CA 7: Member
absolute
in [fs.op.absolute] is overspecified for non-POSIX-like O/S
+- Late 36:
permissions
error_code
overload should be noexcept
(no changes, resolved by Late 37)
+- Late 37:
permissions
actions should be separate parameter
+
+
+LWG motion 6: P0430R2 "File system library on non-POSIX-like operating systems", resolving 6 NB comments:
+
+
+- US 75, CA 4: Extra flag in
path
constructors is needed
+- US 76, CA 5: root-name definition is over-specified.
+- US 79, CA 8: Some operation functions are overspecified for implementation-defined file types
+
+
+Parallel algorithms
+
+LWG motion 7: P0452R1 "Unifying <numeric>
parallel algorithms", partially resolving 2 NB comments:
+
+
+- US 161:
inner_product
should use GENERALIZED_SUM
+- US 184:
inner_product
should not have ExecutionPolicy
overload
+
+
+LWG motion 8: P0518R1 "Allowing copies as arguments to function objects given to parallel algorithms", resolving 1 NB comment:
+
+
+- CH 11: Allow parallel algorithms to make copies of their arguments
+
+
+LWG motion 9: P0523R1 "Complexity of parallel algorithms", partially resolving 1 NB comment:
+
+
+- CH 10: Relax complexity specifications for parallel algorithms
+
+
+LWG motion 10: P0574R1 "Algorithm complexity constraints and parallel overloads", partially resolving 1 NB comment:
+
+
+- CH 10: Relax complexity specifications for parallel algorithms
+
+
+LWG motion 11: P0467R2 "Iterator concerns for parallel algorithms", partially resolving 2 NB comments:
+
+
+- US 156: Relax iterator requirements for parallel algorithms
+- US 162: Relax parallel
adjacent_difference
specification to permit parallelization
+
+
+LWG motion 12: P0623R0 "Final C++17 parallel algorithms fixes", partially resolving 3 NB comments:
+
+
+- US 161:
inner_product
should use GENERALIZED_SUM
+- US 162: Relax parallel
adjacent_difference
specification to permit parallelization
+- US 184:
inner_product
should not have ExecutionPolicy
overload
+
+
+NB response papers
+
+LWG motion 13: P0604R0 "Resolving GB 55, US 84, US 85, US 86", resolving 4 NB comments:
+
+
+- GB 55, US 85: Fix
is_callable
and result_of
to not use a function type as their interface
+- US 84: More clearly distinguish
*INVOKE(f, t1, t2, ..., tN)*
and *INVOKE(f, t1, t2, ..., tN, R)*
+- US 86: Rename
is_callable
to is_invocable
+
+
+LWG motion 14: P0607R0 "inline
variables for the standard library", resolving 2 NB comments:
+
+
+- FI 9, GB28: Use
inline
variables for library tag types
+
+
+LWG motion 15: P0618R0 "Deprecating <codecvt>
", resolving 3 NB comments:
+
+
+- GB 57: Deprecate
<codecvt>
+- US 64, CA 9: Preserve references to UCS2
+
+
+LWG motion 16: Revert P0181R1 "Ordered By Default", applied by 2016-06 LWG Motion 21, resolving 1 NB comment:
+
+
+- FI 18: Revert addition of
default_order
+
+
+LWG motion 17: P0156R2 "Variadic lock guard", resolving 2 NB comments:
+
+
+- FI 8, GB 61: Revert making
lock_guard
variadic
+
+
+LWG motion 18: P0599R1 "noexcept
for hash
functions", resolving 1 NB comment:
+
+
+- US 140: Some or all
hash<T>
specializations should be noexcept
+
+
+LWG motion 19: P0433R2 "Integrating template deduction for class templates into the standard library", resolving 2 NB comments and 3 issues:
+
+
+- US 7, US 19 (remaining parts after P0512R0), US 147, US 148, US 150: Provide suitable deduction guides for the standard library
+
+
+Despite the claims of this paper and the wording of Motion 19,
+this paper is unrelated to US 14
+
+NB issue resolutions
+
+LWG motion 20: Library issue resolutions for 23 issues in "Immediate" status applied, resolving 20 NB comments:
+
+
+- CH 7, 2904: Make
variant
move-assignment more exception safe
+- GB 36, 2866: Incorrect derived classes constraints
+- GB 49, 2806: Base class of
bad_optional_access
+- GB 53, 2807:
std::invoke
should use std::is_nothrow_callable
+- GB 54, 2868: Missing specification of
bad_any_cast::what()
+- US 107, 2872: Add definition for "direct-non-list-initialization"
+- US 111, 2890: The definition of "object state" applies only to class types
+- US 111, 2900: The copy and move constructors of
optional
are not constexpr
+- US 118, 2903: The form of initialization for the emplace-constructors is not specified
+- US 122, 2801: Default-constructibility of
unique_ptr
+- US 123, 2905:
is_constructible_v<unique_ptr<P | D> | P | D const &>
should be false
when D
is not copy constructible
+- US 124, 2873: Add
noexcept
to several shared_ptr
related functions
+- US 125, 2874: Constructor
shared_ptr::shared_ptr(Y*)
should be constrained
+- US 126, 2875:
shared_ptr::shared_ptr(Y* | D | […])
constructors should be constrained
+- US 127, 2802:
shared_ptr
constructor requirements for a deleter
+- US 129, 2876:
shared_ptr::shared_ptr(const weak_ptr<Y>&)
constructor should be constrained
+- US 135, 2908: The less-than operator for shared pointers could do more
+- US 145, 2861:
basic_string
should require that charT
match traits::char_type
+- US 153, 2878: Missing DefaultConstructible requirement for
istream_iterator
default constructor
+- US 165, 2921:
packaged_task
and type-erased allocators
+- 2788:
basic_string
range mutators unintentionally require a default constructible allocator
+- 2857:
{variant,optional,any}::emplace
should return the constructed value
+- 2934:
optional<const T>
doesn't compare with T
+
+
+Note: the resolutions of issues 2894 and 2911 in P0625R0 are not included in this motion
+
+LWG motion 20a was not approved.
+
+LWG motion 20b: Library issue resolution for 1 issue in "Immediate" status applied, resolving 1 NB comment:
+
+
+- US 143, 2911: An
is_aggregate_type
trait is needed
+
+
+Non-NB-comment papers
+
+LWG motion 21: P0558R1 "Resolving atomic<T>
named base class inconsistencies"
+
+LWG motion 22: P0548R1 "common_type
and duration
"
+
+LWG motion 23 applies to the Ranges TS.
+
+Notable editorial changes
+
+Motions
+
+
+CWG 6: In application of P0298R3, updated introductory sentence of [cstddef.syn]
+to avoid claiming that std::byte
is part of ISO C's <stddef.h>
header.
+CWG 9: Change to [csignal.syn] was not applied, because the desired normative
+effect had already been accomplished by P0175R1,
+which was applied at the previous meeting and removed the baseline text for
+this change. The effect of the merge is that std::signal
is not required
+to itself have C language linkage (but its parameter and returned function
+pointer types are). Also added subclause to house description of signal
+handlers, rather than including it in the <csignal>
header synopsis.
+LWG 4: The normative description of directory_entry::is_directory
is
+specified in terms of a non-existent file_status
member, and either the
+status
or symlink_status
members could have been intended. After
+consulting with LWG,
+this usage of file_status
has been replaced by status
.
+
+
+NB comments
+
+
+__cplusplus
macro value updated from 201402L
to 201703L
, resolving
+NB comments CA 15 and US 83.
+Added acknowledgement of ECMAScript trademark, resolving NB comment GB 10.
+Added normative references to LIA-1 and IEEE 754.
+Added note to definition of literal type, resolving NB comment GB 68.
+Made introductory sentence of [basic.stc] consistent with later normative
+wording, resolving NB comment JP 3, as directed by CWG.
+
+
+ISO Directives
+
+
+Promoted "Scope", "Normative references", and "Terms and definitions" to
+top-level Clauses as required by ISO Directives.
+Updated introductory text of "Normative references" and "Terms and definitions"
+to match those specified by ISO Directives.
+
+
+Content rearrangement
+
+
+[fs.path.generic]: rearranged pathname grammar to avoid long paragraphs of
+text in descriptive elements and refactored to fix ambiguities in the
+grammar, after consultation with LWG.
+[expr.prim.lambda]: split out subclauses for the closure type and captures;
+reviewed by CWG at Kona 2017.
+Move specification of deprecated standard library headers into Annex D,
+after consultation with LWG.
+
+
+Stable name changes
+
+
+A "Cross references from ISO C++ 2014" section has been added, listing all
+stable names from C++ 2014 that do not appear within the C++ 2017 standard,
+and where the corresponding text can be found (if it still exists).
+Systematic review and cleanup of filesystem stable names:
+ [class.path] -> [fs.class.path]
+ [path.generic] -> [fs.path.generic]
+ [path.cvt] -> [fs.path.cvt]
+ [path.fmt.cvt] -> [fs.path.fmt.cvt]
+ [path.type.cvt] -> [fs.path.type.cvt]
+ [path.req] -> [fs.path.req]
+ [path.member] -> [fs.path.member]
+ [path.construct] -> [fs.path.construct]
+ [path.assign] -> [fs.path.assign]
+ [path.append] -> [fs.path.append]
+ [path.concat] -> [fs.path.concat]
+ [path.modifiers] -> [fs.path.modifiers]
+ [path.native.obs] -> [fs.path.native.obs]
+ [path.generic.obs] -> [fs.path.generic.obs]
+ [path.compare] -> [fs.path.compare]
+ [path.decompose] -> [fs.path.decompose]
+ [path.query] -> [fs.path.query]
+ [path.gen] -> [fs.path.gen]
+ [path.itr] -> [fs.path.itr]
+ [path.non-member] -> [fs.path.nonmember]
+ [path.io] -> [fs.path.io]
+ [path.factory] -> [fs.path.factory]
+ [class.filesystem_error] -> [fs.class.filesystem_error]
+ [enum.path.format] -> [fs.enum.path.format]
+ [enum.file_type] -> [fs.enum.file_type]
+ [enum.copy_options] -> [fs.enum.copy.opts]
+ [enum.perms] -> [fs.enum.perms]
+ [enum.perm_options] -> [fs.enum.perm.opts]
+ [enum.directory_options] -> [fs.enum.dir.opts]
+ [class.file_status] -> [fs.class.file_status]
+ [file_status.cons] -> [fs.file_status.cons]
+ [file_status.obs] -> [fs.file_status.obs]
+ [file_status.mods] -> [fs.file_status.mods]
+ [class.directory_entry] -> [fs.class.directory_entry]
+ [directory_entry.cons] -> [fs.dir.entry.cons]
+ [directory_entry.mods] -> [fs.dir.entry.mods]
+ [directory_entry.obs] -> [fs.dir.entry.obs]
+ [class.directory_iterator] -> [fs.class.directory_iterator]
+ [directory_iterator.members] -> [fs.dir.itr.members]
+ [directory_iterator.nonmembers] -> [fs.dir.itr.nonmembers]
+ [class.rec.dir.itr] -> [fs.class.rec.dir.itr]
+ [rec.dir.itr.members] -> [fs.rec.dir.itr.members]
+ [rec.dir.itr.nonmembers] -> [fs.rec.dir.itr.nonmembers]
+[istreambuf.iterator] 5 subclauses
+[istreambuf.iterator::equal],
+[istreambuf.iterator::op!=],
+[istreambuf.iterator::op*],
+[istreambuf.iterator::op++],
+[istreambuf.iterator::op==]
+merged into a single [istreambuf.iterator.ops] comprising half a page of text;
+Several subclauses with stable names containing ::
have been renamed to
+instead use .
as the component separator.
+
+
+Minor editorial fixes
+
+A log of editorial fixes made since N4640 is below. This list excludes changes
+that do not affect the body text or only affect whitespace or typeface. For a
+complete list including such changes (or for the actual deltas applied by these
+changes), consult the draft sources on github.
+
+commit dbf3efe18813054c95abae388c53bf30e96e7e83
+Author: Richard Smith <richard@metafoo.co.uk>
+Date: Mon Mar 20 15:19:47 2017 -0700
+
+ [intro.refs], [intro.defs] Update introductory text to match latest ISO
+ Directives.
+
+commit 32825151765e214d79103a137aa29a9a4357687f
+Author: Richard Smith <richard@metafoo.co.uk>
+Date: Mon Mar 20 15:00:51 2017 -0700
+
+ Replace "this International Standard" with "this document" in some
+ places where it is a clear improvement.
+
+ The 7th Edition of the ISO Directives no longer require us to use
+ "this International Standard" when the document refers to itself. We
+ retain that phrasing when the reference is to the abstract notion of
+ the specification as opposed to the text embodying it.
+
+ This is a step towards addressing #1389.
+
+commit 1798a9b6795d6ee92bf093e2a6256c34212552b1
+Author: Richard Smith <richard@metafoo.co.uk>
+Date: Mon Mar 20 14:14:22 2017 -0700
+
+ [fs.path.generic] Refactor generic pathname grammar to remove redundancy and ambiguity.
+
+commit 660d97e40353337b0b6b533903ab16e330855a77
+Author: Eelis van der Weegen <eelis@eelis.net>
+Date: Sat Aug 6 18:02:50 2016 +0200
+
+ [depr.func.adaptor.typedefs] Clarify that reference_wrapper does not define argument_type for non-nullary member function pointer types.
+
+commit 95cbc03c20f20d98a53a3e696df6003ec27abc42
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Wed Feb 8 16:35:25 2017 +0100
+
+ [istreambuf.iterator] Join subsections for operations descriptions.
+
+ There was one subsection for every operator, yet everything
+ fits on half a page.
+
+ Fixes #1429, #1449.
+
+commit d2b6fb6eefc3c28eb448352cd6d8b0d08e860a66
+Author: Jonathan Wakely <cxx@kayari.org>
+Date: Thu Mar 16 21:27:11 2017 +0000
+
+ [containers] Rephrase deduction guide constraints
+
+ Replace "is called with" wording that doesn't apply to deduction guides.
+
+ Move rules about qualifying as input iterators or allocators to
+ [container.requirements.general].
+
+commit a7f52d1904e5a6d2d407eb4145ba54552d0b3e69
+Author: Richard Smith <richard@metafoo.co.uk>
+Date: Mon Mar 20 00:07:04 2017 -0700
+
+ [fs.path.generic] Move descriptions of grammar elements out of the
+ grammar and into separate paragraphs, and format path grammar as we
+ format the language grammar.
+
+ Also rephrase description of root-name to use the defined term
+ "implementation-defined" directly rather than separating it into
+ "implementations [...] define".
+
+commit 04a9e5d759b4fea810ed029dd6b6a0d5ebfd224a
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Fri Feb 10 22:46:20 2017 +0100
+
+ [fs.op.copy], [fs.op.copy_file] Rephrase requirements on copy_options.
+
+ Use bitmask 'element' phrasing for restrictions on copy_options.
+
+ Fixes #1445.
+
+commit df9a809a36c34acc0870c5d7869e7549574e1437
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Sat Mar 18 23:08:32 2017 +0100
+
+ [partial.sort] Remove 'It takes' from complexity specification.
+
+ Partially addresses #1088.
+
+commit 5cf60394dbe171ec16bfbba1459772e40b9cf6e1
+Author: Thomas Köppe <tkoeppe@google.com>
+Date: Sat Mar 18 21:21:14 2017 +0000
+
+ [temp.class.spec.mfunc] Add missing comment to example
+
+commit cdd6dda21e3273ea63b733c3cfb3b630bb1847eb
+Author: Richard Smith <richard@metafoo.co.uk>
+Date: Thu Mar 16 15:37:17 2017 -0700
+
+ [xref] Add glossary of cross-references between C++14 section labels and
+ C++17 section labels.
+
+ Fixes #1547.
+
+commit 88c20950fac6915844143bb73129e2eb1b41d17d
+Author: Jonathan Wakely <cxx@kayari.org>
+Date: Thu Mar 16 02:51:38 2017 +0000
+
+ [filesystem] Shorten stable names and add "fs." prefixes
+
+ [class.path] -> [fs.class.path]
+ [path.generic] -> [fs.path.generic]
+ [path.cvt] -> [fs.path.cvt]
+ [path.fmt.cvt] -> [fs.path.fmt.cvt]
+ [path.type.cvt] -> [fs.path.type.cvt]
+ [path.req] -> [fs.path.req]
+ [path.member] -> [fs.path.member]
+ [path.construct] -> [fs.path.construct]
+ [path.assign] -> [fs.path.assign]
+ [path.append] -> [fs.path.append]
+ [path.concat] -> [fs.path.concat]
+ [path.modifiers] -> [fs.path.modifiers]
+ [path.native.obs] -> [fs.path.native.obs]
+ [path.generic.obs] -> [fs.path.generic.obs]
+ [path.compare] -> [fs.path.compare]
+ [path.decompose] -> [fs.path.decompose]
+ [path.query] -> [fs.path.query]
+ [path.gen] -> [fs.path.gen]
+ [path.itr] -> [fs.path.itr]
+ [path.non-member] -> [fs.path.nonmember]
+ [path.io] -> [fs.path.io]
+ [path.factory] -> [fs.path.factory]
+ [class.filesystem_error] -> [fs.class.filesystem_error]
+ [enum.path.format] -> [fs.enum.path.format]
+ [enum.file_type] -> [fs.enum.file_type]
+ [enum.copy_options] -> [fs.enum.copy.opts]
+ [enum.perms] -> [fs.enum.perms]
+ [enum.perm_options] -> [fs.enum.perm.opts]
+ [enum.directory_options] -> [fs.enum.dir.opts]
+ [class.file_status] -> [fs.class.file_status]
+ [file_status.cons] -> [fs.file_status.cons]
+ [file_status.obs] -> [fs.file_status.obs]
+ [file_status.mods] -> [fs.file_status.mods]
+ [class.directory_entry] -> [fs.class.directory_entry]
+ [directory_entry.cons] -> [fs.dir.entry.cons]
+ [directory_entry.mods] -> [fs.dir.entry.mods]
+ [directory_entry.obs] -> [fs.dir.entry.obs]
+ [class.directory_iterator] -> [fs.class.directory_iterator]
+ [directory_iterator.members] -> [fs.dir.itr.members]
+ [directory_iterator.nonmembers] -> [fs.dir.itr.nonmembers]
+ [class.rec.dir.itr] -> [fs.class.rec.dir.itr]
+ [rec.dir.itr.members] -> [fs.rec.dir.itr.members]
+ [rec.dir.itr.nonmembers] -> [fs.rec.dir.itr.nonmembers]
+
+commit ad33212fded427f1e0b4e57c53c9e9215318b223
+Author: Alisdair Meredith <public@alisdairm.net>
+Date: Thu Mar 16 11:21:05 2017 -0400
+
+ [any.modifiers] fix emplace return type for 'any' (#1545)
+
+ LWG issue 2857 was applied verbatim, without noticing
+ that 'ValueType' had been previously changed to 'T'.
+ This makes things consistent by choosing 'T' as the
+ simpler form, more consistent with 'optional' and
+ 'variant'.
+
+commit 09e4674b0b6ab2f74bfe5a14120edea874115779
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Tue Feb 28 07:27:01 2017 +0100
+
+ [expr.prim.lambda] Move syntactic restriction on decl-specifier-seq to the front.
+
+ Per CWG guidance.
+
+commit 763a3fda5cec74d17371ddf4957f1f522331ebb0
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Wed Nov 30 19:17:52 2016 +0100
+
+ [expr.prim.lambda] Split specification of lambda expressions into subsections.
+
+ Fixes #1155.
+
+commit 8139f2f9ec81cf4b8c24640f968880241dd23231
+Author: Thomas Köppe <tkoeppe@google.com>
+Date: Thu Nov 17 19:51:44 2016 +0000
+
+ Move specification of deprecated headers to Annex D
+
+commit c9354b33e1de8e0cf6dc42a73c733e1d8a34e7e0
+Author: Richard Smith <richard@metafoo.co.uk>
+Date: Wed Mar 15 18:29:49 2017 -0700
+
+ Update value of __cplusplus to 201703L.
+
+ Fixes #1513 and NB CA 15 and US 83 (C++17 CD).
+
+commit 8baa18cbbf33a9b73711638b13a4960e15179c6d
+Author: Richard Smith <richard@metafoo.co.uk>
+Date: Wed Mar 15 18:29:13 2017 -0700
+
+ Add acknowledgement of ECMAScript trademark.
+
+ Fixes NB GB 10 (C++17 CD).
+
+commit 4d53b8b250751aae7768955f75eb7f27db08d83e
+Author: Richard Smith <richard@metafoo.co.uk>
+Date: Wed Mar 15 12:55:55 2017 -0700
+
+ Editorial fixes for P0317R1.
+
+ [directory_entry.mods] Improve singular/plural, add commas.
+
+ [class.directory_iterator] Reorder words to more closely align xref with
+ the term for which it is a reference, add comma.
+
+commit dd42ed5d6e04e623992e0464e49323a2b6a1f518
+Author: Richard Smith <richard@metafoo.co.uk>
+Date: Sun Mar 12 14:34:57 2017 -0700
+
+ [atomics.flag] Replace "shall be" with "is" when describing properties
+ of the implementation, for consistency with changes made by P0558R1.
+
+commit 49caa2b829256f8198ed649ca3f5057bde96a2c7
+Author: Thomas Köppe <tkoeppe@google.com>
+Date: Sun Mar 5 09:19:33 2017 -1000
+
+ [func.search] Add missing period
+
+commit 4f0891849e4799367174cc8783a3d88b6ff6b95a
+Author: Jonathan Wakely <cxx@kayari.org>
+Date: Fri Mar 3 02:36:27 2017 +0000
+
+ [meta.trans] replace "shall name" with "names" in traits tables
+
+commit 42c6d5cc8ed83ba4b48b8b94d51b7a317d577a46
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Tue Dec 20 21:45:21 2016 +0100
+
+ [lib] For showing complexity, use $N \log N$
+ and not $N \log(N)$ or other variants.
+
+ Partially addresses #1088.
+
+commit 42c5a2ce36d7403ca37cb8b038aa37065c353ba4
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Tue Dec 20 23:45:26 2016 +0100
+
+ [intro.refs] Add normative references to LIA-1 and IEEE 754.
+
+ Fixes #237.
+
+commit bdff8687ccb470564400597403d484ad02890f24
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Fri Feb 10 21:25:42 2017 +0100
+
+ [any] Use 'contained value' consistently.
+
+ This harmonizes the use of 'constained value' across
+ optional, variant, and any, with appropriate index
+ entries.
+
+ Fixes #1401.
+
+commit 6a5edb752b88c448dce4cba528de307d79966b9e
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Thu Feb 9 21:42:49 2017 +0100
+
+ Harmonize punctuation for 'ill-formed, no diagnostic required'
+
+ Fixes #1450.
+
+commit 40f3fb37986ecff07567cc4601fac334fee8aff9
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Wed Feb 8 15:35:43 2017 +0100
+
+ [basic.types] Remove excessive references to [basic.type.qualifier].
+
+ Fixes #1419.
+
+commit ee930ef3ee97f244d278ac3f762ec5f167dc005a
+Author: Jonathan Wakely <cxx@kayari.org>
+Date: Thu Mar 2 02:20:48 2017 +0000
+
+ [rand.dist.bern.negbin] Fix index for k member
+
+commit bbcf0ea60c63d741bc51818633c70df2690e99b4
+Author: Richard Smith <richard@metafoo.co.uk>
+Date: Wed Mar 1 13:34:52 2017 -1000
+
+ Add a note to the definition of literal type to indicate that it is not
+ a guarantee that such an object can be created in a constant expression.
+
+ Wording from John Spicer / CWG.
+
+ Addresses NB GB 68 (C++17 CD).
+
+commit be54f2e8e12c54071692ef3ebd6e49f6e3255a27
+Author: Jakub Wilk <jwilk@jwilk.net>
+Date: Tue Feb 28 19:17:32 2017 +0100
+
+ [diff.decl] Fix typo (#1494)
+
+commit 2f6aff7e71cc33243671d1e501911d331af61fa3
+Author: Richard Smith <richard@metafoo.co.uk>
+Date: Mon Feb 27 16:23:46 2017 -1000
+
+ [basic.stc] Fix introductory sentence on dynamic storage duration to
+ match later more-normative rule: it applies to objects, not storage.
+
+ Fixes NB JP 3 (C++17 CD).
+
+commit ec4ca6fc07907ea817152970c45d4c04c86d3c5c
+Author: Richard Smith <richard@metafoo.co.uk>
+Date: Mon Feb 27 11:30:27 2017 -0800
+
+ [intro] Promote "Scope", "Normative references", "Terms and definitions"
+ to top-level clauses per ISO directives.
+
+ Modify \definition macro so we can more easily have definitions at
+ different depths in different lists.
+
+commit fe6c8bda60fbca2cd3a488650988ce0a7df20d03
+Author: Eelis <github.com@contacts.eelis.net>
+Date: Fri Feb 24 12:09:31 2017 +0100
+
+ [localization, diff] Remove superfluous 'return 0;' from 'main' in examples. (#1482)
+
+commit 17e28024d81e366a6d1044fa29a0cd1bdf10f77f
+Author: Eelis <github.com@contacts.eelis.net>
+Date: Thu Feb 23 12:32:58 2017 +0100
+
+ [meta.unary.prop, meta.trans.other] Omit unhelpful second argument in static_asserts. (#1479)
+
+commit 33f16cb3417ad21949769d82cae36c1b653e4519
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Thu Feb 23 01:47:09 2017 +0100
+
+ [dcl.attr.nodiscard] Clarify example with reference return type. (#1471)
+
+ Add rationale why a warning is not encouraged for this case.
+
+ Fixes #1470.
+
+commit 7cd42666e143e19bdaf9e62211066cab255fb99f
+Author: Eelis <github.com@contacts.eelis.net>
+Date: Thu Feb 23 01:25:26 2017 +0100
+
+ [expr.mptr.oper] Use defined term 'null member pointer value'. (#1434)
+
+commit 5bc5cbae28d9e741ebc7df996f1f0d230ac4087e
+Author: Eelis <github.com@contacts.eelis.net>
+Date: Tue Feb 21 00:16:14 2017 +0100
+
+ [rand.req.{eng,dist}] Replace square brackets around reference with regular parentheses. (#1481)
+
+commit 44f489bba7c7595077043c7360cf7ff329eeb090
+Author: Eelis <github.com@contacts.eelis.net>
+Date: Sun Feb 19 15:41:48 2017 +0100
+
+ [except.spec] Add missing 'an'. (#1478)
+
+commit 16938d84892051f5c9e2fe4afca578fc57b1c4f3
+Author: Thomas Köppe <tkoeppe@google.com>
+Date: Sat Feb 18 19:21:13 2017 +0000
+
+ [support.runtime] Remove extraneous and misleading parentheses from names of functions and macros
+
+commit d2fe52eaaf53b6843ab6fe152a2a05e5a7da06fc
+Author: Eelis <github.com@contacts.eelis.net>
+Date: Thu Feb 16 20:54:49 2017 +0100
+
+ [alg.min.max] Enlarge lfloor/rfloor delimiters. (#1455)
+
+commit 7e5537d1e9c7a6d63c9877cf5babde4ddf14807c
+Author: Eelis <github.com@contacts.eelis.net>
+Date: Wed Feb 15 15:38:19 2017 +0100
+
+ Parenthesize some \refs. (#1436)
+
+commit 473966e60653e8e2bc8ed154d8b18a3736f97088
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Thu Feb 9 12:14:12 2017 +0100
+
+ [unord.req] Insert hint is 'p', not 'q' (#1440)
+
+ LWG 2540 changed the hint for insert from 'q'
+ (a valid and dereferenceable iterator) to 'p'
+ (a valid, but not necessarily dereferenceable iterator),
+ but neglected to adjust the description text.
+
+ Fixes #1423.
+
+commit 90c486f80612c3a7fd26ee408631991814f7b81c
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Wed Feb 8 17:21:31 2017 +0100
+
+ [any.assign] Rename T to VT. (#1448)
+
+ These renames were overlooked in commit 8b1f6cc8d73eec0306db1dec66f2da52a03ea274.
+
+ Fixes #1443.
+
diff --git a/papers/n4661.md b/papers/n4661.md
new file mode 100644
index 0000000000..a8331e1952
--- /dev/null
+++ b/papers/n4661.md
@@ -0,0 +1,825 @@
+# N4661 Editors' Report -- Programming Languages -- C++
+
+2017-03-20
+Richard Smith (editor) (Google Inc)
+Dawn Perchik (co-editor) (Embarcadero Technologies Inc)
+Thomas Köppe (co-editor) (Google DeepMind)
+``
+
+## Acknowledgements
+
+Special thanks to
+the members of the editing committee for the C++17 DIS, namely
+Marshall Clow,
+Mike Miller,
+Ville Voutilainen,
+and
+Jeffrey Yasskin
+for their review of the correctness of the working paper
+as modified by the motions from the Kona 2017 meeting.
+
+Special thanks also to
+Jonathan Wakely
+and
+Alisdair Meredith
+for performing edits and editorial review for several of the motions applied since N4640,
+and to
+Jens Maurer
+for performing many of the editorial fixes since N4640.
+
+Thanks to all those who have [submitted editorial
+issues](https://github.com/cplusplus/draft/wiki/How-to-submit-an-editorial-issue)
+and to those who have provided pull requests with fixes.
+
+## New papers
+
+ * [N4659](http://wg21.link/n4659) is the current working draft. It replaces [N4640](http://wg21.link/n4640).
+ * [N4660](http://wg21.link/n4660) is the C++17 DIS.
+ * N4661 is this Editors' Report.
+
+The contents of N4659 and N4660 are identical except for the cover sheet and
+page headings.
+
+## Motions incorporated into working draft and C++17 DIS
+
+### Core working group motions
+
+CWG motion 1: [Core issue resolutions](http://wg21.link/p0575r1) for 5 issues in "ready" status applied:
+
+ * [1677](http://wg21.link/cwg1677) Constant initialization via aggregate initialization
+ * [1860](http://wg21.link/cwg1860) What is a "direct member?"
+ * [2174](http://wg21.link/cwg2174) Unclear rules for friend definitions in templates
+ * [2205](http://wg21.link/cwg2205) Restrictions on use of alignas
+ * [2218](http://wg21.link/cwg2218) Ambiguity and namespace aliases
+
+**The other 7 issues in "ready" status from P0575R1 were applied by CWG Motion 3**
+
+CWG motion 2: [Core issue resolutions](http://wg21.link/p0576r1) for 5 issues in "tentatively ready" status applied:
+
+ * [2201](http://wg21.link/cwg2201) Cv-qualification of array types
+ * [2206](http://wg21.link/cwg2206) Composite type of object and function pointers
+ * [2214](http://wg21.link/cwg2214) Missing requirement on representation of integer values
+ * [2220](http://wg21.link/cwg2220) Hiding index variable in range-based `for`
+ * [2224](http://wg21.link/cwg2224) Member subobjects and base-class casts
+ * [2259](http://wg21.link/cwg2259) Unclear context describing ambiguity
+ * [2262](http://wg21.link/cwg2262) Attributes for *asm-definition*
+
+CWG motion 3: [Core issue resolutions](http://wg21.link/p0622r0) for 12 issues in "ready" and "tentatively ready" status applied, resolving 13 issues:
+
+ * [426](http://wg21.link/cwg426) Identically-named variables, one internally and one externally linked, allowed?
+ * [727](http://wg21.link/cwg727) In-class explicit specializations
+ * [1622](http://wg21.link/cwg1622) Empty aggregate initializer for union (no changes, resolved by 2272)
+ * [1710](http://wg21.link/cwg1710) Missing `template` keyword in *class-or-decltype*
+ * [2196](http://wg21.link/cwg2196) Zero-initialization with virtual base classes
+ * [2198](http://wg21.link/cwg2198) Linkage of enumerators
+ * [2211](http://wg21.link/cwg2211) Hiding by lambda captures and parameters
+ * [2247](http://wg21.link/cwg2247) Lambda capture and variable argument list
+ * [2248](http://wg21.link/cwg2248) Problems with sized delete
+ * [2251](http://wg21.link/cwg2251) Unreachable enumeration list-initialization
+ * [2268](http://wg21.link/cwg2268) Unions with mutable members in constant expressions revisited
+ * [2272](http://wg21.link/cwg2272) Implicit initialization of aggregate members of reference type
+ * [2276](http://wg21.link/cwg2276) Dependent `noexcept` and function type-dependence
+
+CWG motion 4: [P0612R0 "NB comment CH 2: volatile"](http://wg21.link/p0612r0), resolving 1 NB comment:
+
+ * CH 2: Clarify whether volatile semantics require volatile objects or merely volatile-qualified glvalues
+
+CWG motion 5: [P0613R0 "NB comment GB15: Resolution of Core Issue 2011"](http://wg21.link/p0613r0), resolving 1 NB comment and 1 issue:
+
+ * GB 15, [2011](http://wg21.link/cwg2011) Unclear effect of reference capture of reference
+
+CWG motion 6: [P0298R3 "A `byte` type definition"](http://wg21.link/p0298r3), resolving 3 NB comments:
+
+ * CA 11, US 72: Adopt [P0257R1 "A `byte` type for increased type safety"](http://wg21.link/p0257r1) with modifications
+ * US 22: Adopt [P0298R1 "A `byte` type definition"](http://wg21.link/p0298r1)
+
+CWG motion 7: [P0615R0 "Renaming for structured bindings"](http://wg21.link/p0615r0)
+
+CWG motion 8: [P0620R0 "Drafting for class template argument deduction issues"](http://wg21.link/p0620r0), resolving 3 NB comments:
+
+ * US 94, GB 13, FI 21: Support class template argument deduction in `T{x1, x2, ...}` syntax
+
+CWG motion 9: [P0270R3 "Removing C dependencies from signal handler wording"](http://wg21.link/p0270r3) **with changes, see below**, resolving 1 NB comment:
+
+ * CA 1: Adopt [P0270R1 "Removing C dependencies from signal handler wording"](http://wg21.link/p0270r1)
+
+CWG motion 10: [P0250R3 "Wording improvements for initialization and thread ids"](http://wg21.link/p0250r3), resolving 2 issues in "concurrency" status:
+
+ * [1784](http://wg21.link/cwg1784) Concurrent execution during static local initialization
+ * [2046](http://wg21.link/cwg2046) Incomplete thread specifications
+
+CWG motion 11a applies to the Modules TS.
+
+CWG motion 11b was not approved.
+
+### Library working group motions
+
+#### Issue resolutions
+
+LWG motion 1 applies to the Coroutines TS.
+
+LWG motion 2: [Library issue resolutions](http://wg21.link/p0165r4) for 22 issues in "Ready" and "Tentatively Ready" status applied, resolving 23 issues:
+
+ * [2260](http://wg21.link/lwg2260) Missing requirement for `Allocator::pointer`
+ * [2768](http://wg21.link/lwg2768) `any_cast` and move semantics (no changes, resolved by 2769)
+ * [2769](http://wg21.link/lwg2769) Redundant `const` in the return type of `any_cast(const any&)`
+ * [2781](http://wg21.link/lwg2781) Contradictory requirements for `std::function` and `std::reference_wrapper`
+ * [2782](http://wg21.link/lwg2782) `scoped_allocator_adaptor` constructors must be constrained
+ * [2784](http://wg21.link/lwg2784) Resolution to [LWG 2484](http://wg21.link/lwg2484) is missing "otherwise, no effects" and is hard to parse
+ * [2785](http://wg21.link/lwg2785) `quoted` should work with `basic_string_view`
+ * [2786](http://wg21.link/lwg2786) Annex C should mention `shared_ptr` changes for array support
+ * [2787](http://wg21.link/lwg2787) [file_status.cons] doesn't match class definition
+ * [2789](http://wg21.link/lwg2789) Equivalence of contained objects
+ * [2794](http://wg21.link/lwg2794) Missing requirements for allocator pointers
+ * [2795](http://wg21.link/lwg2795) [global.functions] provides incorrect example of ADL use
+ * [2804](http://wg21.link/lwg2804) Unconditional `constexpr` default constructor for `istream_iterator`
+ * [2824](http://wg21.link/lwg2824) `list::sort` should say that the order of elements is unspecified if an exception is thrown
+ * [2826](http://wg21.link/lwg2826) `string_view` iterators use old wording
+ * [2834](http://wg21.link/lwg2834) Resolution to [LWG 2223](http://wg21.link/lwg2223) is missing wording about end iterators
+ * [2835](http://wg21.link/lwg2835) Resolution to [LWG 2536](http://wg21.link/lwg2536) seems to misspecify ``
+ * [2837](http://wg21.link/lwg2837) `gcd` and `lcm` should support a wider range of input values
+ * [2838](http://wg21.link/lwg2838) `is_literal_type` specification needs a little cleanup
+ * [2842](http://wg21.link/lwg2842) `in_place_t` check for `optional::optional(U&&)` should decay `U`
+ * [2850](http://wg21.link/lwg2850) `std::function` move constructor does unnecessary work
+ * [2853](http://wg21.link/lwg2853) Possible inconsistency in specification of `erase` in [vector.modifiers]
+ * [2855](http://wg21.link/lwg2855) `std::throw_with_nested("string_literal")`
+
+**Resolution of [2812](http://wg21.link/lwg2812) "Range access is available with ``" not applied, as this issue had already been resolved editorially**
+
+LWG motion 3: [Library issue resolutions](http://wg21.link/p0610r0) for 3 issues in "Review" status applied:
+
+ * [2676](http://wg21.link/lwg2676) Provide `filesystem::path` overloads for "File-based streams"
+ * [2790](http://wg21.link/lwg2790) Missing specification of `istreambuf_iterator::operator->`
+ * [2796](http://wg21.link/lwg2796) `tuple` should be a literal type
+
+#### Filesystem
+
+LWG motion 4: [P0317R1 "Directory entry caching for filesystem"](http://wg21.link/p0317r1) **with changes, see below**
+
+LWG motion 5: [P0492R2 "Proposed resolution of C++17 National Body comments for filesystems"](http://wg21.link/p0492r2), resolving 31 NB comments and 2 issues:
+
+ * US 32: Meaning of [fs.conform.9945] unclear
+ * US 33: Definition of "canonical path" problematic
+ * US 34: Are there attributes of a file that are not an aspect of the file system?
+ * US 36: Symbolic links themselves are attached to a directory via (hard) links
+ * US 37: The term "redundant current directory (*dot*) elements" is not defined
+ * US 43: Concerns about encoded character types
+ * US 44, [2798](http://wg21.link/lwg2798): Definition of `path` in terms of a string requires leaky abstraction
+ * US 45: Generic format portability compromised by unspecified *root-name* (no changes, resolved by US 73, CA 2)
+ * US 46: *filename* can be empty so productions for *relative-path* are redundant
+ * US 47: `.` and `..` already match the *name* production
+ * US 48: Multiple separators are often meaningful in a *root-name*
+ * US 51: Failing to add `/` when appending empty string prevents useful applications (no changes, resolved by US 74, CA 3)
+ * US 52, [2665](http://wg21.link/lwg2665): `remove_filename` postcondition is not by itself a definition
+ * US 53: `remove_filename`'s name does not correspond to its behavior (no changes, resolved by US 52, US 60)
+ * US 54: `remove_filename` is broken
+ * US 55: `replace_extension`'s use of `path` as parameter is inappropriate
+ * US 58: `parent_path` behavior for root paths is useless (no changes, resolved by US 77, CA 6)
+ * US 60: `path("/foo/").filename() == path(".")` is surprising
+ * US 61: Leading dots in `filename` should not begin an extension (no changes, resolved by US 74, CA 3)
+ * US 62: It is important that `stem() + extension() == filename()` (no changes, resolved by US 74, CA 3)
+ * US 63: `lexically_normal` inconsistently treats trailing `/` but not `/..` as directory (no changes, resolved by US 37, US 74, CA 3)
+ * US 73, CA 2: *root-name* is effectively implementation defined
+ * US 74, CA 3: The term "pathname" is ambiguous in some contexts
+ * US 77, CA 6: `operator/` and other `append`s not useful if arg has *root-name*
+ * US 78, CA 7: Member `absolute` in [fs.op.absolute] is overspecified for non-POSIX-like O/S
+ * Late 36: `permissions` `error_code` overload should be `noexcept` (no changes, resolved by Late 37)
+ * Late 37: `permissions` actions should be separate parameter
+
+LWG motion 6: [P0430R2 "File system library on non-POSIX-like operating systems"](http://wg21.link/p0430r2), resolving 6 NB comments:
+
+ * US 75, CA 4: Extra flag in `path` constructors is needed
+ * US 76, CA 5: *root-name* definition is over-specified.
+ * US 79, CA 8: Some operation functions are overspecified for implementation-defined file types
+
+#### Parallel algorithms
+
+LWG motion 7: [P0452R1 "Unifying `` parallel algorithms"](http://wg21.link/p0452r1), partially resolving 2 NB comments:
+
+ * US 161: `inner_product` should use *`GENERALIZED_SUM`*
+ * US 184: `inner_product` should not have `ExecutionPolicy` overload
+
+LWG motion 8: [P0518R1 "Allowing copies as arguments to function objects given to parallel algorithms"](http://wg21.link/p0518r1), resolving 1 NB comment:
+
+ * CH 11: Allow parallel algorithms to make copies of their arguments
+
+LWG motion 9: [P0523R1 "Complexity of parallel algorithms"](http://wg21.link/p0523r1), partially resolving 1 NB comment:
+
+ * CH 10: Relax complexity specifications for parallel algorithms
+
+LWG motion 10: [P0574R1 "Algorithm complexity constraints and parallel overloads"](http://wg21.link/p0574r1), partially resolving 1 NB comment:
+
+ * CH 10: Relax complexity specifications for parallel algorithms
+
+LWG motion 11: [P0467R2 "Iterator concerns for parallel algorithms"](http://wg21.link/p0467r2), partially resolving 2 NB comments:
+
+ * US 156: Relax iterator requirements for parallel algorithms
+ * US 162: Relax parallel `adjacent_difference` specification to permit parallelization
+
+LWG motion 12: [P0623R0 "Final C++17 parallel algorithms fixes"](http://wg21.link/p0623r0), partially resolving 3 NB comments:
+
+ * US 161: `inner_product` should use *`GENERALIZED_SUM`*
+ * US 162: Relax parallel `adjacent_difference` specification to permit parallelization
+ * US 184: `inner_product` should not have `ExecutionPolicy` overload
+
+#### NB response papers
+
+LWG motion 13: [P0604R0 "Resolving GB 55, US 84, US 85, US 86"](http://wg21.link/p0604r0), resolving 4 NB comments:
+
+ * GB 55, US 85: Fix `is_callable` and `result_of` to not use a function type as their interface
+ * US 84: More clearly distinguish `*INVOKE(f, t1, t2, ..., tN)*` and `*INVOKE(f, t1, t2, ..., tN, R)*`
+ * US 86: Rename `is_callable` to `is_invocable`
+
+LWG motion 14: [P0607R0 "`inline` variables for the standard library"](http://wg21.link/p0607r0), resolving 2 NB comments:
+
+ * FI 9, GB28: Use `inline` variables for library tag types
+
+LWG motion 15: [P0618R0 "Deprecating ``"](http://wg21.link/p0618r0), resolving 3 NB comments:
+
+ * GB 57: Deprecate ``
+ * US 64, CA 9: Preserve references to UCS2
+
+LWG motion 16: **Revert [P0181R1 "Ordered By Default"](http://wg21.link/p0181r1)**, applied by 2016-06 LWG Motion 21, resolving 1 NB comment:
+
+ * FI 18: Revert addition of `default_order`
+
+LWG motion 17: [P0156R2 "Variadic lock guard"](http://wg21.link/p0156r2), resolving 2 NB comments:
+
+ * FI 8, GB 61: Revert making `lock_guard` variadic
+
+LWG motion 18: [P0599R1 "`noexcept` for `hash` functions"](http://wg21.link/p0599r1), resolving 1 NB comment:
+
+ * US 140: Some or all `hash` specializations should be `noexcept`
+
+LWG motion 19: [P0433R2 "Integrating template deduction for class templates into the standard library"](http://wg21.link/p0433r2), resolving 2 NB comments and 3 issues:
+
+ * US 7, US 19 (remaining parts after P0512R0), US 147, US 148, US 150: Provide suitable deduction guides for the standard library
+
+**Despite the claims of this paper and the wording of Motion 19,
+this paper is unrelated to US 14**
+
+#### NB issue resolutions
+
+LWG motion 20: [Library issue resolutions](http://wg21.link/p0625r0) for 23 issues in "Immediate" status applied, resolving 20 NB comments:
+
+ * CH 7, [2904](http://wg21.link/lwg2904): Make `variant` move-assignment more exception safe
+ * GB 36, [2866](http://wg21.link/lwg2866): Incorrect derived classes constraints
+ * GB 49, [2806](http://wg21.link/lwg2806): Base class of `bad_optional_access`
+ * GB 53, [2807](http://wg21.link/lwg2807): `std::invoke` should use `std::is_nothrow_callable`
+ * GB 54, [2868](http://wg21.link/lwg2868): Missing specification of `bad_any_cast::what()`
+ * US 107, [2872](http://wg21.link/lwg2872): Add definition for "direct-non-list-initialization"
+ * US 111, [2890](http://wg21.link/lwg2890): The definition of "object state" applies only to class types
+ * US 111, [2900](http://wg21.link/lwg2900): The copy and move constructors of `optional` are not `constexpr`
+ * US 118, [2903](http://wg21.link/lwg2903): The form of initialization for the emplace-constructors is not specified
+ * US 122, [2801](http://wg21.link/lwg2801): Default-constructibility of `unique_ptr`
+ * US 123, [2905](http://wg21.link/lwg2905): `is_constructible_v | P | D const &>` should be `false` when `D` is not copy constructible
+ * US 124, [2873](http://wg21.link/lwg2873): Add `noexcept` to several `shared_ptr` related functions
+ * US 125, [2874](http://wg21.link/lwg2874): Constructor `shared_ptr::shared_ptr(Y*)` should be constrained
+ * US 126, [2875](http://wg21.link/lwg2875): `shared_ptr::shared_ptr(Y* | D | […])` constructors should be constrained
+ * US 127, [2802](http://wg21.link/lwg2802): `shared_ptr` constructor requirements for a deleter
+ * US 129, [2876](http://wg21.link/lwg2876): `shared_ptr::shared_ptr(const weak_ptr&)` constructor should be constrained
+ * US 135, [2908](http://wg21.link/lwg2908): The less-than operator for shared pointers could do more
+ * US 145, [2861](http://wg21.link/lwg2861): `basic_string` should require that `charT` match `traits::char_type`
+ * US 153, [2878](http://wg21.link/lwg2878): Missing DefaultConstructible requirement for `istream_iterator` default constructor
+ * US 165, [2921](http://wg21.link/lwg2921): `packaged_task` and type-erased allocators
+ * [2788](http://wg21.link/lwg2788): `basic_string` range mutators unintentionally require a default constructible allocator
+ * [2857](http://wg21.link/lwg2857): `{variant,optional,any}::emplace` should return the constructed value
+ * [2934](http://wg21.link/lwg2934): `optional` doesn't compare with `T`
+
+**Note: the resolutions of issues 2894 and 2911 in P0625R0 are not included in this motion**
+
+LWG motion 20a was not approved.
+
+LWG motion 20b: [Library issue resolution](http://wg21.link/p0625r0) for 1 issue in "Immediate" status applied, resolving 1 NB comment:
+
+ * US 143, [2911](http://wg21.link/lwg2911): An `is_aggregate_type` trait is needed
+
+#### Non-NB-comment papers
+
+LWG motion 21: [P0558R1 "Resolving `atomic` named base class inconsistencies"](http://wg21.link/p0558r1)
+
+LWG motion 22: [P0548R1 "`common_type` and `duration`"](http://wg21.link/p0548r1)
+
+LWG motion 23 applies to the Ranges TS.
+
+## Notable editorial changes
+
+### Motions
+
+ * CWG 6: In application of P0298R3, updated introductory sentence of [cstddef.syn]
+ to avoid claiming that `std::byte` is part of ISO C's `` header.
+
+ * CWG 9: Change to [csignal.syn] was not applied, because the desired normative
+ effect had already been accomplished by [P0175R1](http://wg21.link/p0175r1),
+ which was applied at the previous meeting and removed the baseline text for
+ this change. The effect of the merge is that `std::signal` is *not* required
+ to itself have C language linkage (but its parameter and returned function
+ pointer types are). Also added subclause to house description of signal
+ handlers, rather than including it in the `` header synopsis.
+
+ * LWG 4: The normative description of `directory_entry::is_directory` is
+ specified in terms of a non-existent `file_status` member, and either the
+ `status` or `symlink_status` members could have been intended. After
+ [consulting with LWG](http://lists.isocpp.org/lib/2017/03/2262.php),
+ this usage of `file_status` has been replaced by `status`.
+
+### NB comments
+
+ * `__cplusplus` macro value updated from `201402L` to `201703L`, resolving
+ NB comments CA 15 and US 83.
+
+ * Added acknowledgement of ECMAScript trademark, resolving NB comment GB 10.
+
+ * Added normative references to LIA-1 and IEEE 754.
+
+ * Added note to definition of literal type, resolving NB comment GB 68.
+
+ * Made introductory sentence of [basic.stc] consistent with later normative
+ wording, resolving NB comment JP 3, as directed by CWG.
+
+### ISO Directives
+
+ * Promoted "Scope", "Normative references", and "Terms and definitions" to
+ top-level Clauses as required by ISO Directives.
+
+ * Updated introductory text of "Normative references" and "Terms and definitions"
+ to match those specified by ISO Directives.
+
+### Content rearrangement
+
+ * [fs.path.generic]: rearranged *pathname* grammar to avoid long paragraphs of
+ text in descriptive elements and refactored to fix ambiguities in the
+ grammar, after consultation with LWG.
+
+ * [expr.prim.lambda]: split out subclauses for the closure type and captures;
+ reviewed by CWG at Kona 2017.
+
+ * Move specification of deprecated standard library headers into Annex D,
+ after consultation with LWG.
+
+### Stable name changes
+
+ * A "Cross references from ISO C++ 2014" section has been added, listing all
+ stable names from C++ 2014 that do not appear within the C++ 2017 standard,
+ and where the corresponding text can be found (if it still exists).
+
+ * Systematic review and cleanup of filesystem stable names:
+ [class.path] -> [fs.class.path]
+ [path.generic] -> [fs.path.generic]
+ [path.cvt] -> [fs.path.cvt]
+ [path.fmt.cvt] -> [fs.path.fmt.cvt]
+ [path.type.cvt] -> [fs.path.type.cvt]
+ [path.req] -> [fs.path.req]
+ [path.member] -> [fs.path.member]
+ [path.construct] -> [fs.path.construct]
+ [path.assign] -> [fs.path.assign]
+ [path.append] -> [fs.path.append]
+ [path.concat] -> [fs.path.concat]
+ [path.modifiers] -> [fs.path.modifiers]
+ [path.native.obs] -> [fs.path.native.obs]
+ [path.generic.obs] -> [fs.path.generic.obs]
+ [path.compare] -> [fs.path.compare]
+ [path.decompose] -> [fs.path.decompose]
+ [path.query] -> [fs.path.query]
+ [path.gen] -> [fs.path.gen]
+ [path.itr] -> [fs.path.itr]
+ [path.non-member] -> [fs.path.nonmember]
+ [path.io] -> [fs.path.io]
+ [path.factory] -> [fs.path.factory]
+ [class.filesystem\_error] -> [fs.class.filesystem\_error]
+ [enum.path.format] -> [fs.enum.path.format]
+ [enum.file\_type] -> [fs.enum.file\_type]
+ [enum.copy\_options] -> [fs.enum.copy.opts]
+ [enum.perms] -> [fs.enum.perms]
+ [enum.perm\_options] -> [fs.enum.perm.opts]
+ [enum.directory\_options] -> [fs.enum.dir.opts]
+ [class.file\_status] -> [fs.class.file\_status]
+ [file\_status.cons] -> [fs.file\_status.cons]
+ [file\_status.obs] -> [fs.file\_status.obs]
+ [file\_status.mods] -> [fs.file\_status.mods]
+ [class.directory\_entry] -> [fs.class.directory\_entry]
+ [directory\_entry.cons] -> [fs.dir.entry.cons]
+ [directory\_entry.mods] -> [fs.dir.entry.mods]
+ [directory\_entry.obs] -> [fs.dir.entry.obs]
+ [class.directory\_iterator] -> [fs.class.directory\_iterator]
+ [directory\_iterator.members] -> [fs.dir.itr.members]
+ [directory\_iterator.nonmembers] -> [fs.dir.itr.nonmembers]
+ [class.rec.dir.itr] -> [fs.class.rec.dir.itr]
+ [rec.dir.itr.members] -> [fs.rec.dir.itr.members]
+ [rec.dir.itr.nonmembers] -> [fs.rec.dir.itr.nonmembers]
+
+ * [istreambuf.iterator] 5 subclauses
+ [istreambuf.iterator::equal],
+ [istreambuf.iterator::op!=],
+ [istreambuf.iterator::op\*],
+ [istreambuf.iterator::op++],
+ [istreambuf.iterator::op==]
+ merged into a single [istreambuf.iterator.ops] comprising half a page of text;
+
+ * Several subclauses with stable names containing `::` have been renamed to
+ instead use `.` as the component separator.
+
+## Minor editorial fixes
+
+A log of editorial fixes made since N4640 is below. This list excludes changes
+that do not affect the body text or only affect whitespace or typeface. For a
+complete list including such changes (or for the actual deltas applied by these
+changes), consult the [draft sources on github](https://github.com/cplusplus/draft/compare/n4640...n4659).
+
+ commit dbf3efe18813054c95abae388c53bf30e96e7e83
+ Author: Richard Smith
+ Date: Mon Mar 20 15:19:47 2017 -0700
+
+ [intro.refs], [intro.defs] Update introductory text to match latest ISO
+ Directives.
+
+ commit 32825151765e214d79103a137aa29a9a4357687f
+ Author: Richard Smith
+ Date: Mon Mar 20 15:00:51 2017 -0700
+
+ Replace "this International Standard" with "this document" in some
+ places where it is a clear improvement.
+
+ The 7th Edition of the ISO Directives no longer require us to use
+ "this International Standard" when the document refers to itself. We
+ retain that phrasing when the reference is to the abstract notion of
+ the specification as opposed to the text embodying it.
+
+ This is a step towards addressing #1389.
+
+ commit 1798a9b6795d6ee92bf093e2a6256c34212552b1
+ Author: Richard Smith
+ Date: Mon Mar 20 14:14:22 2017 -0700
+
+ [fs.path.generic] Refactor generic pathname grammar to remove redundancy and ambiguity.
+
+ commit 660d97e40353337b0b6b533903ab16e330855a77
+ Author: Eelis van der Weegen
+ Date: Sat Aug 6 18:02:50 2016 +0200
+
+ [depr.func.adaptor.typedefs] Clarify that reference_wrapper does not define argument_type for non-nullary member function pointer types.
+
+ commit 95cbc03c20f20d98a53a3e696df6003ec27abc42
+ Author: Jens Maurer
+ Date: Wed Feb 8 16:35:25 2017 +0100
+
+ [istreambuf.iterator] Join subsections for operations descriptions.
+
+ There was one subsection for every operator, yet everything
+ fits on half a page.
+
+ Fixes #1429, #1449.
+
+ commit d2b6fb6eefc3c28eb448352cd6d8b0d08e860a66
+ Author: Jonathan Wakely
+ Date: Thu Mar 16 21:27:11 2017 +0000
+
+ [containers] Rephrase deduction guide constraints
+
+ Replace "is called with" wording that doesn't apply to deduction guides.
+
+ Move rules about qualifying as input iterators or allocators to
+ [container.requirements.general].
+
+ commit a7f52d1904e5a6d2d407eb4145ba54552d0b3e69
+ Author: Richard Smith
+ Date: Mon Mar 20 00:07:04 2017 -0700
+
+ [fs.path.generic] Move descriptions of grammar elements out of the
+ grammar and into separate paragraphs, and format path grammar as we
+ format the language grammar.
+
+ Also rephrase description of root-name to use the defined term
+ "implementation-defined" directly rather than separating it into
+ "implementations [...] define".
+
+ commit 04a9e5d759b4fea810ed029dd6b6a0d5ebfd224a
+ Author: Jens Maurer
+ Date: Fri Feb 10 22:46:20 2017 +0100
+
+ [fs.op.copy], [fs.op.copy_file] Rephrase requirements on copy_options.
+
+ Use bitmask 'element' phrasing for restrictions on copy_options.
+
+ Fixes #1445.
+
+ commit df9a809a36c34acc0870c5d7869e7549574e1437
+ Author: Jens Maurer
+ Date: Sat Mar 18 23:08:32 2017 +0100
+
+ [partial.sort] Remove 'It takes' from complexity specification.
+
+ Partially addresses #1088.
+
+ commit 5cf60394dbe171ec16bfbba1459772e40b9cf6e1
+ Author: Thomas Köppe
+ Date: Sat Mar 18 21:21:14 2017 +0000
+
+ [temp.class.spec.mfunc] Add missing comment to example
+
+ commit cdd6dda21e3273ea63b733c3cfb3b630bb1847eb
+ Author: Richard Smith
+ Date: Thu Mar 16 15:37:17 2017 -0700
+
+ [xref] Add glossary of cross-references between C++14 section labels and
+ C++17 section labels.
+
+ Fixes #1547.
+
+ commit 88c20950fac6915844143bb73129e2eb1b41d17d
+ Author: Jonathan Wakely
+ Date: Thu Mar 16 02:51:38 2017 +0000
+
+ [filesystem] Shorten stable names and add "fs." prefixes
+
+ [class.path] -> [fs.class.path]
+ [path.generic] -> [fs.path.generic]
+ [path.cvt] -> [fs.path.cvt]
+ [path.fmt.cvt] -> [fs.path.fmt.cvt]
+ [path.type.cvt] -> [fs.path.type.cvt]
+ [path.req] -> [fs.path.req]
+ [path.member] -> [fs.path.member]
+ [path.construct] -> [fs.path.construct]
+ [path.assign] -> [fs.path.assign]
+ [path.append] -> [fs.path.append]
+ [path.concat] -> [fs.path.concat]
+ [path.modifiers] -> [fs.path.modifiers]
+ [path.native.obs] -> [fs.path.native.obs]
+ [path.generic.obs] -> [fs.path.generic.obs]
+ [path.compare] -> [fs.path.compare]
+ [path.decompose] -> [fs.path.decompose]
+ [path.query] -> [fs.path.query]
+ [path.gen] -> [fs.path.gen]
+ [path.itr] -> [fs.path.itr]
+ [path.non-member] -> [fs.path.nonmember]
+ [path.io] -> [fs.path.io]
+ [path.factory] -> [fs.path.factory]
+ [class.filesystem_error] -> [fs.class.filesystem_error]
+ [enum.path.format] -> [fs.enum.path.format]
+ [enum.file_type] -> [fs.enum.file_type]
+ [enum.copy_options] -> [fs.enum.copy.opts]
+ [enum.perms] -> [fs.enum.perms]
+ [enum.perm_options] -> [fs.enum.perm.opts]
+ [enum.directory_options] -> [fs.enum.dir.opts]
+ [class.file_status] -> [fs.class.file_status]
+ [file_status.cons] -> [fs.file_status.cons]
+ [file_status.obs] -> [fs.file_status.obs]
+ [file_status.mods] -> [fs.file_status.mods]
+ [class.directory_entry] -> [fs.class.directory_entry]
+ [directory_entry.cons] -> [fs.dir.entry.cons]
+ [directory_entry.mods] -> [fs.dir.entry.mods]
+ [directory_entry.obs] -> [fs.dir.entry.obs]
+ [class.directory_iterator] -> [fs.class.directory_iterator]
+ [directory_iterator.members] -> [fs.dir.itr.members]
+ [directory_iterator.nonmembers] -> [fs.dir.itr.nonmembers]
+ [class.rec.dir.itr] -> [fs.class.rec.dir.itr]
+ [rec.dir.itr.members] -> [fs.rec.dir.itr.members]
+ [rec.dir.itr.nonmembers] -> [fs.rec.dir.itr.nonmembers]
+
+ commit ad33212fded427f1e0b4e57c53c9e9215318b223
+ Author: Alisdair Meredith
+ Date: Thu Mar 16 11:21:05 2017 -0400
+
+ [any.modifiers] fix emplace return type for 'any' (#1545)
+
+ LWG issue 2857 was applied verbatim, without noticing
+ that 'ValueType' had been previously changed to 'T'.
+ This makes things consistent by choosing 'T' as the
+ simpler form, more consistent with 'optional' and
+ 'variant'.
+
+ commit 09e4674b0b6ab2f74bfe5a14120edea874115779
+ Author: Jens Maurer
+ Date: Tue Feb 28 07:27:01 2017 +0100
+
+ [expr.prim.lambda] Move syntactic restriction on decl-specifier-seq to the front.
+
+ Per CWG guidance.
+
+ commit 763a3fda5cec74d17371ddf4957f1f522331ebb0
+ Author: Jens Maurer
+ Date: Wed Nov 30 19:17:52 2016 +0100
+
+ [expr.prim.lambda] Split specification of lambda expressions into subsections.
+
+ Fixes #1155.
+
+ commit 8139f2f9ec81cf4b8c24640f968880241dd23231
+ Author: Thomas Köppe
+ Date: Thu Nov 17 19:51:44 2016 +0000
+
+ Move specification of deprecated headers to Annex D
+
+ commit c9354b33e1de8e0cf6dc42a73c733e1d8a34e7e0
+ Author: Richard Smith
+ Date: Wed Mar 15 18:29:49 2017 -0700
+
+ Update value of __cplusplus to 201703L.
+
+ Fixes #1513 and NB CA 15 and US 83 (C++17 CD).
+
+ commit 8baa18cbbf33a9b73711638b13a4960e15179c6d
+ Author: Richard Smith
+ Date: Wed Mar 15 18:29:13 2017 -0700
+
+ Add acknowledgement of ECMAScript trademark.
+
+ Fixes NB GB 10 (C++17 CD).
+
+ commit 4d53b8b250751aae7768955f75eb7f27db08d83e
+ Author: Richard Smith
+ Date: Wed Mar 15 12:55:55 2017 -0700
+
+ Editorial fixes for P0317R1.
+
+ [directory_entry.mods] Improve singular/plural, add commas.
+
+ [class.directory_iterator] Reorder words to more closely align xref with
+ the term for which it is a reference, add comma.
+
+ commit dd42ed5d6e04e623992e0464e49323a2b6a1f518
+ Author: Richard Smith
+ Date: Sun Mar 12 14:34:57 2017 -0700
+
+ [atomics.flag] Replace "shall be" with "is" when describing properties
+ of the implementation, for consistency with changes made by P0558R1.
+
+ commit 49caa2b829256f8198ed649ca3f5057bde96a2c7
+ Author: Thomas Köppe
+ Date: Sun Mar 5 09:19:33 2017 -1000
+
+ [func.search] Add missing period
+
+ commit 4f0891849e4799367174cc8783a3d88b6ff6b95a
+ Author: Jonathan Wakely
+ Date: Fri Mar 3 02:36:27 2017 +0000
+
+ [meta.trans] replace "shall name" with "names" in traits tables
+
+ commit 42c6d5cc8ed83ba4b48b8b94d51b7a317d577a46
+ Author: Jens Maurer
+ Date: Tue Dec 20 21:45:21 2016 +0100
+
+ [lib] For showing complexity, use $N \log N$
+ and not $N \log(N)$ or other variants.
+
+ Partially addresses #1088.
+
+ commit 42c5a2ce36d7403ca37cb8b038aa37065c353ba4
+ Author: Jens Maurer
+ Date: Tue Dec 20 23:45:26 2016 +0100
+
+ [intro.refs] Add normative references to LIA-1 and IEEE 754.
+
+ Fixes #237.
+
+ commit bdff8687ccb470564400597403d484ad02890f24
+ Author: Jens Maurer
+ Date: Fri Feb 10 21:25:42 2017 +0100
+
+ [any] Use 'contained value' consistently.
+
+ This harmonizes the use of 'constained value' across
+ optional, variant, and any, with appropriate index
+ entries.
+
+ Fixes #1401.
+
+ commit 6a5edb752b88c448dce4cba528de307d79966b9e
+ Author: Jens Maurer
+ Date: Thu Feb 9 21:42:49 2017 +0100
+
+ Harmonize punctuation for 'ill-formed, no diagnostic required'
+
+ Fixes #1450.
+
+ commit 40f3fb37986ecff07567cc4601fac334fee8aff9
+ Author: Jens Maurer
+ Date: Wed Feb 8 15:35:43 2017 +0100
+
+ [basic.types] Remove excessive references to [basic.type.qualifier].
+
+ Fixes #1419.
+
+ commit ee930ef3ee97f244d278ac3f762ec5f167dc005a
+ Author: Jonathan Wakely
+ Date: Thu Mar 2 02:20:48 2017 +0000
+
+ [rand.dist.bern.negbin] Fix index for k member
+
+ commit bbcf0ea60c63d741bc51818633c70df2690e99b4
+ Author: Richard Smith
+ Date: Wed Mar 1 13:34:52 2017 -1000
+
+ Add a note to the definition of literal type to indicate that it is not
+ a guarantee that such an object can be created in a constant expression.
+
+ Wording from John Spicer / CWG.
+
+ Addresses NB GB 68 (C++17 CD).
+
+ commit be54f2e8e12c54071692ef3ebd6e49f6e3255a27
+ Author: Jakub Wilk
+ Date: Tue Feb 28 19:17:32 2017 +0100
+
+ [diff.decl] Fix typo (#1494)
+
+ commit 2f6aff7e71cc33243671d1e501911d331af61fa3
+ Author: Richard Smith
+ Date: Mon Feb 27 16:23:46 2017 -1000
+
+ [basic.stc] Fix introductory sentence on dynamic storage duration to
+ match later more-normative rule: it applies to objects, not storage.
+
+ Fixes NB JP 3 (C++17 CD).
+
+ commit ec4ca6fc07907ea817152970c45d4c04c86d3c5c
+ Author: Richard Smith
+ Date: Mon Feb 27 11:30:27 2017 -0800
+
+ [intro] Promote "Scope", "Normative references", "Terms and definitions"
+ to top-level clauses per ISO directives.
+
+ Modify \definition macro so we can more easily have definitions at
+ different depths in different lists.
+
+ commit fe6c8bda60fbca2cd3a488650988ce0a7df20d03
+ Author: Eelis
+ Date: Fri Feb 24 12:09:31 2017 +0100
+
+ [localization, diff] Remove superfluous 'return 0;' from 'main' in examples. (#1482)
+
+ commit 17e28024d81e366a6d1044fa29a0cd1bdf10f77f
+ Author: Eelis
+ Date: Thu Feb 23 12:32:58 2017 +0100
+
+ [meta.unary.prop, meta.trans.other] Omit unhelpful second argument in static_asserts. (#1479)
+
+ commit 33f16cb3417ad21949769d82cae36c1b653e4519
+ Author: Jens Maurer
+ Date: Thu Feb 23 01:47:09 2017 +0100
+
+ [dcl.attr.nodiscard] Clarify example with reference return type. (#1471)
+
+ Add rationale why a warning is not encouraged for this case.
+
+ Fixes #1470.
+
+ commit 7cd42666e143e19bdaf9e62211066cab255fb99f
+ Author: Eelis
+ Date: Thu Feb 23 01:25:26 2017 +0100
+
+ [expr.mptr.oper] Use defined term 'null member pointer value'. (#1434)
+
+ commit 5bc5cbae28d9e741ebc7df996f1f0d230ac4087e
+ Author: Eelis
+ Date: Tue Feb 21 00:16:14 2017 +0100
+
+ [rand.req.{eng,dist}] Replace square brackets around reference with regular parentheses. (#1481)
+
+ commit 44f489bba7c7595077043c7360cf7ff329eeb090
+ Author: Eelis
+ Date: Sun Feb 19 15:41:48 2017 +0100
+
+ [except.spec] Add missing 'an'. (#1478)
+
+ commit 16938d84892051f5c9e2fe4afca578fc57b1c4f3
+ Author: Thomas Köppe
+ Date: Sat Feb 18 19:21:13 2017 +0000
+
+ [support.runtime] Remove extraneous and misleading parentheses from names of functions and macros
+
+ commit d2fe52eaaf53b6843ab6fe152a2a05e5a7da06fc
+ Author: Eelis
+ Date: Thu Feb 16 20:54:49 2017 +0100
+
+ [alg.min.max] Enlarge lfloor/rfloor delimiters. (#1455)
+
+ commit 7e5537d1e9c7a6d63c9877cf5babde4ddf14807c
+ Author: Eelis
+ Date: Wed Feb 15 15:38:19 2017 +0100
+
+ Parenthesize some \refs. (#1436)
+
+ commit 473966e60653e8e2bc8ed154d8b18a3736f97088
+ Author: Jens Maurer
+ Date: Thu Feb 9 12:14:12 2017 +0100
+
+ [unord.req] Insert hint is 'p', not 'q' (#1440)
+
+ LWG 2540 changed the hint for insert from 'q'
+ (a valid and dereferenceable iterator) to 'p'
+ (a valid, but not necessarily dereferenceable iterator),
+ but neglected to adjust the description text.
+
+ Fixes #1423.
+
+ commit 90c486f80612c3a7fd26ee408631991814f7b81c
+ Author: Jens Maurer
+ Date: Wed Feb 8 17:21:31 2017 +0100
+
+ [any.assign] Rename T to VT. (#1448)
+
+ These renames were overlooked in commit 8b1f6cc8d73eec0306db1dec66f2da52a03ea274.
+
+ Fixes #1443.
diff --git a/source/algorithms.tex b/source/algorithms.tex
index 9c74d5dfbb..1a8ffe5d77 100644
--- a/source/algorithms.tex
+++ b/source/algorithms.tex
@@ -31,54 +31,63 @@
namespace std {
// \ref{alg.nonmodifying}, non-modifying sequence operations
+ // \ref{alg.all_of}, all of
template
bool all_of(InputIterator first, InputIterator last, Predicate pred);
- template
+ template
bool all_of(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last, Predicate pred);
+ ForwardIterator first, ForwardIterator last, Predicate pred);
+
+ // \ref{alg.any_of}, any of
template
bool any_of(InputIterator first, InputIterator last, Predicate pred);
- template
+ template
bool any_of(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last, Predicate pred);
+ ForwardIterator first, ForwardIterator last, Predicate pred);
+
+ // \ref{alg.none_of}, none of
template
bool none_of(InputIterator first, InputIterator last, Predicate pred);
- template
+ template
bool none_of(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last, Predicate pred);
+ ForwardIterator first, ForwardIterator last, Predicate pred);
+ // \ref{alg.foreach}, for each
template
Function for_each(InputIterator first, InputIterator last, Function f);
- template
+ template
void for_each(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last, Function f);
+ ForwardIterator first, ForwardIterator last, Function f);
template
InputIterator for_each_n(InputIterator first, Size n, Function f);
- template
- InputIterator for_each_n(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, Size n, Function f);
+ template
+ ForwardIterator for_each_n(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator first, Size n, Function f);
+ // \ref{alg.find}, find
template
InputIterator find(InputIterator first, InputIterator last,
const T& value);
- template
- InputIterator find(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
- const T& value);
+ template
+ ForwardIterator find(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator first, ForwardIterator last,
+ const T& value);
template
InputIterator find_if(InputIterator first, InputIterator last,
Predicate pred);
- template
- InputIterator find_if(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
- Predicate pred);
+ template
+ ForwardIterator find_if(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator first, ForwardIterator last,
+ Predicate pred);
template
InputIterator find_if_not(InputIterator first, InputIterator last,
Predicate pred);
- template
- InputIterator find_if_not(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
- Predicate pred);
+ template
+ ForwardIterator find_if_not(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator first, ForwardIterator last,
+ Predicate pred);
+
+ // \ref{alg.find.end}, find end
template
ForwardIterator1
find_end(ForwardIterator1 first1, ForwardIterator1 last1,
@@ -101,6 +110,7 @@
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred);
+ // \ref{alg.find.first.of}, find first
template
InputIterator
find_first_of(InputIterator first1, InputIterator last1,
@@ -110,19 +120,20 @@
find_first_of(InputIterator first1, InputIterator last1,
ForwardIterator first2, ForwardIterator last2,
BinaryPredicate pred);
- template
- InputIterator
+ template
+ ForwardIterator1
find_first_of(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first1, InputIterator last1,
- ForwardIterator first2, ForwardIterator last2);
- template
- InputIterator
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2);
+ template
+ ForwardIterator1
find_first_of(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first1, InputIterator last1,
- ForwardIterator first2, ForwardIterator last2,
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred);
+ // \ref{alg.adjacent.find}, adjacent find
template
ForwardIterator adjacent_find(ForwardIterator first,
ForwardIterator last);
@@ -140,21 +151,23 @@
ForwardIterator last,
BinaryPredicate pred);
+ // \ref{alg.count}, count
template
typename iterator_traits::difference_type
count(InputIterator first, InputIterator last, const T& value);
- template
- typename iterator_traits::difference_type
+ template
+ typename iterator_traits::difference_type
count(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last, const T& value);
+ ForwardIterator first, ForwardIterator last, const T& value);
template
typename iterator_traits::difference_type
count_if(InputIterator first, InputIterator last, Predicate pred);
- template
- typename iterator_traits::difference_type
+ template
+ typename iterator_traits::difference_type
count_if(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last, Predicate pred);
+ ForwardIterator first, ForwardIterator last, Predicate pred);
+ // \ref{mismatch}, mismatch
template
pair
mismatch(InputIterator1 first1, InputIterator1 last1,
@@ -172,30 +185,31 @@
mismatch(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
BinaryPredicate pred);
- template
- pair
+ template
+ pair
mismatch(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2);
- template
- pair
+ pair
mismatch(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, BinaryPredicate pred);
- template
- pair
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, BinaryPredicate pred);
+ template
+ pair
mismatch(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2);
- template
- pair
+ pair
mismatch(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred);
+ // \ref{alg.equal}, equal
template
bool equal(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2);
@@ -209,26 +223,27 @@
bool equal(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
BinaryPredicate pred);
- template
+ template
bool equal(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2);
- template
bool equal(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, BinaryPredicate pred);
- template
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, BinaryPredicate pred);
+ template
bool equal(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2);
- template
bool equal(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred);
+ // \ref{alg.is_permutation}, is permutation
template
bool is_permutation(ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2);
@@ -294,26 +309,26 @@
template
OutputIterator copy(InputIterator first, InputIterator last,
OutputIterator result);
- template
- OutputIterator copy(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
- OutputIterator result);
+ template
+ ForwardIterator2 copy(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first, ForwardIterator1 last,
+ ForwardIterator2 result);
template
OutputIterator copy_n(InputIterator first, Size n,
OutputIterator result);
- template
- OutputIterator copy_n(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, Size n,
- OutputIterator result);
+ template
+ ForwardIterator2 copy_n(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first, Size n,
+ ForwardIterator2 result);
template
OutputIterator copy_if(InputIterator first, InputIterator last,
OutputIterator result, Predicate pred);
- template
- OutputIterator copy_if(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
- OutputIterator result, Predicate pred);
+ ForwardIterator2 copy_if(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first, ForwardIterator1 last,
+ ForwardIterator2 result, Predicate pred);
template
BidirectionalIterator2 copy_backward(
BidirectionalIterator1 first, BidirectionalIterator1 last,
@@ -323,11 +338,11 @@
template
OutputIterator move(InputIterator first, InputIterator last,
OutputIterator result);
- template
- OutputIterator move(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
- OutputIterator result);
+ template
+ ForwardIterator2 move(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first, ForwardIterator1 last,
+ ForwardIterator2 result);
template
BidirectionalIterator2 move_backward(
BidirectionalIterator1 first, BidirectionalIterator1 last,
@@ -344,6 +359,7 @@
template
void iter_swap(ForwardIterator1 a, ForwardIterator2 b);
+ // \ref{alg.transform}, transform
template
OutputIterator transform(InputIterator first, InputIterator last,
OutputIterator result, UnaryOperation op);
@@ -352,18 +368,19 @@
OutputIterator transform(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, OutputIterator result,
BinaryOperation binary_op);
- template
- OutputIterator transform(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
- OutputIterator result, UnaryOperation op);
- template
- OutputIterator transform(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, OutputIterator result,
- BinaryOperation binary_op);
+ ForwardIterator2 transform(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first, ForwardIterator1 last,
+ ForwardIterator2 result, UnaryOperation op);
+ template
+ ForwardIterator transform(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator result,
+ BinaryOperation binary_op);
+ // \ref{alg.replace}, replace
template
void replace(ForwardIterator first, ForwardIterator last,
const T& old_value, const T& new_value);
@@ -382,22 +399,23 @@
OutputIterator replace_copy(InputIterator first, InputIterator last,
OutputIterator result,
const T& old_value, const T& new_value);
- template
- OutputIterator replace_copy(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
- OutputIterator result,
- const T& old_value, const T& new_value);
+ template
+ ForwardIterator2 replace_copy(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first, ForwardIterator1 last,
+ ForwardIterator2 result,
+ const T& old_value, const T& new_value);
template
OutputIterator replace_copy_if(InputIterator first, InputIterator last,
OutputIterator result,
Predicate pred, const T& new_value);
- template
- OutputIterator replace_copy_if(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
- OutputIterator result,
- Predicate pred, const T& new_value);
+ ForwardIterator2 replace_copy_if(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first, ForwardIterator1 last,
+ ForwardIterator2 result,
+ Predicate pred, const T& new_value);
+ // \ref{alg.fill}, fill
template
void fill(ForwardIterator first, ForwardIterator last, const T& value);
template
OutputIterator fill_n(OutputIterator first, Size n, const T& value);
- template
- OutputIterator fill_n(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- OutputIterator first, Size n, const T& value);
+ ForwardIterator fill_n(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator first, Size n, const T& value);
+ // \ref{alg.generate}, generate
template
void generate(ForwardIterator first, ForwardIterator last,
Generator gen);
@@ -420,10 +439,11 @@
Generator gen);
template
OutputIterator generate_n(OutputIterator first, Size n, Generator gen);
- template
- OutputIterator generate_n(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- OutputIterator first, Size n, Generator gen);
+ template
+ ForwardIterator generate_n(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator first, Size n, Generator gen);
+ // \ref{alg.remove}, remove
template
ForwardIterator remove(ForwardIterator first, ForwardIterator last,
const T& value);
@@ -441,20 +461,21 @@
template
OutputIterator remove_copy(InputIterator first, InputIterator last,
OutputIterator result, const T& value);
- template
- OutputIterator remove_copy(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
- OutputIterator result, const T& value);
+ ForwardIterator2 remove_copy(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first, ForwardIterator1 last,
+ ForwardIterator2 result, const T& value);
template
OutputIterator remove_copy_if(InputIterator first, InputIterator last,
OutputIterator result, Predicate pred);
- template
- OutputIterator remove_copy_if(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
- OutputIterator result, Predicate pred);
+ ForwardIterator2 remove_copy_if(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first, ForwardIterator1 last,
+ ForwardIterator2 result, Predicate pred);
+ // \ref{alg.unique}, unique
template
ForwardIterator unique(ForwardIterator first, ForwardIterator last);
template
@@ -473,16 +494,17 @@
template
OutputIterator unique_copy(InputIterator first, InputIterator last,
OutputIterator result, BinaryPredicate pred);
- template
- OutputIterator unique_copy(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
- OutputIterator result);
- template
+ ForwardIterator2 unique_copy(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first, ForwardIterator1 last,
+ ForwardIterator2 result);
+ template
- OutputIterator unique_copy(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
- OutputIterator result, BinaryPredicate pred);
+ ForwardIterator2 unique_copy(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first, ForwardIterator1 last,
+ ForwardIterator2 result, BinaryPredicate pred);
+ // \ref{alg.reverse}, reverse
template
void reverse(BidirectionalIterator first, BidirectionalIterator last);
template
@@ -492,12 +514,13 @@
OutputIterator reverse_copy(BidirectionalIterator first,
BidirectionalIterator last,
OutputIterator result);
- template
- OutputIterator reverse_copy(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- BidirectionalIterator first,
- BidirectionalIterator last,
- OutputIterator result);
+ template
+ ForwardIterator reverse_copy(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ BidirectionalIterator first,
+ BidirectionalIterator last,
+ ForwardIterator result);
+ // \ref{alg.rotate}, rotate
template
ForwardIterator rotate(ForwardIterator first,
ForwardIterator middle,
@@ -511,11 +534,11 @@
OutputIterator rotate_copy(
ForwardIterator first, ForwardIterator middle,
ForwardIterator last, OutputIterator result);
- template
- OutputIterator rotate_copy(
+ template
+ ForwardIterator2 rotate_copy(
ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- ForwardIterator first, ForwardIterator middle,
- ForwardIterator last, OutputIterator result);
+ ForwardIterator1 first, ForwardIterator1 middle,
+ ForwardIterator1 last, ForwardIterator2 result);
// \ref{alg.random.sample}, sample
template
bool is_partitioned(InputIterator first, InputIterator last, Predicate pred);
- template
+ template
bool is_partitioned(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last, Predicate pred);
+ ForwardIterator first, ForwardIterator last, Predicate pred);
template
ForwardIterator partition(ForwardIterator first,
@@ -558,16 +581,16 @@
template
pair
- partition_copy(InputIterator first, InputIterator last,
- OutputIterator1 out_true, OutputIterator2 out_false,
- Predicate pred);
- template
- pair
- partition_copy(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
- OutputIterator1 out_true, OutputIterator2 out_false,
- Predicate pred);
+ partition_copy(InputIterator first, InputIterator last,
+ OutputIterator1 out_true, OutputIterator2 out_false,
+ Predicate pred);
+ template
+ pair
+ partition_copy(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator first, ForwardIterator last,
+ ForwardIterator1 out_true, ForwardIterator2 out_false,
+ Predicate pred);
template
ForwardIterator partition_point(ForwardIterator first,
ForwardIterator last,
@@ -630,16 +653,17 @@
RandomAccessIterator result_first,
RandomAccessIterator result_last,
Compare comp);
- template
+ template
RandomAccessIterator partial_sort_copy(
ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
+ ForwardIterator first, ForwardIterator last,
RandomAccessIterator result_first,
RandomAccessIterator result_last);
- template
+ template
RandomAccessIterator partial_sort_copy(
ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator first, InputIterator last,
+ ForwardIterator first, ForwardIterator last,
RandomAccessIterator result_first,
RandomAccessIterator result_last,
Compare comp);
@@ -668,6 +692,7 @@
ForwardIterator first, ForwardIterator last,
Compare comp);
+ // \ref{alg.nth.element}, Nth element
template
void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
RandomAccessIterator last);
@@ -724,18 +749,18 @@
OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
OutputIterator result, Compare comp);
- template
- OutputIterator merge(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result);
- template
- OutputIterator merge(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result, Compare comp);
+ template
+ ForwardIterator merge(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
+ ForwardIterator result);
+ template
+ ForwardIterator merge(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
+ ForwardIterator result, Compare comp);
template
void inplace_merge(BidirectionalIterator first,
@@ -763,14 +788,15 @@
template
bool includes(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2, Compare comp);
- template
+ template
bool includes(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2);
- template
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2);
+ template
bool includes(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2, Compare comp);
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2, Compare comp);
template
OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
@@ -780,18 +806,18 @@
OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
OutputIterator result, Compare comp);
- template
- OutputIterator set_union(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result);
- template
- OutputIterator set_union(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result, Compare comp);
+ template
+ ForwardIterator set_union(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
+ ForwardIterator result);
+ template
+ ForwardIterator set_union(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
+ ForwardIterator result, Compare comp);
template
OutputIterator set_intersection(
@@ -803,20 +829,20 @@
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
OutputIterator result, Compare comp);
- template
- OutputIterator set_intersection(
+ template
+ ForwardIterator set_intersection(
ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result);
- template
- OutputIterator set_intersection(
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
+ ForwardIterator result);
+ template
+ ForwardIterator set_intersection(
ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result, Compare comp);
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
+ ForwardIterator result, Compare comp);
template
OutputIterator set_difference(
@@ -828,20 +854,20 @@
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
OutputIterator result, Compare comp);
- template
- OutputIterator set_difference(
+ template
+ ForwardIterator set_difference(
ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result);
- template
- OutputIterator set_difference(
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
+ ForwardIterator result);
+ template
+ ForwardIterator set_difference(
ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result, Compare comp);
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
+ ForwardIterator result, Compare comp);
template
OutputIterator set_symmetric_difference(
@@ -853,20 +879,20 @@
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
OutputIterator result, Compare comp);
- template
- OutputIterator set_symmetric_difference(
+ template
+ ForwardIterator set_symmetric_difference(
ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result);
- template
- OutputIterator set_symmetric_difference(
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
+ ForwardIterator result);
+ template
+ ForwardIterator set_symmetric_difference(
ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result, Compare comp);
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
+ ForwardIterator result, Compare comp);
// \ref{alg.heap.operations}, heap operations
template
@@ -996,16 +1022,17 @@
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
Compare comp);
- template
+ template
bool lexicographical_compare(
ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2);
- template
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2);
+ template
bool lexicographical_compare(
ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads}
- InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
Compare comp);
// \ref{alg.permutation.generators}, permutations
@@ -1250,10 +1277,14 @@
\rSec2[algorithms.parallel.user]{Requirements on user-provided function objects}
\pnum
-Function objects passed into parallel algorithms as objects of type
-\tcode{Predicate}, \tcode{BinaryPredicate}, \tcode{Compare}, and
-\tcode{BinaryOperation} shall not directly or indirectly modify objects via
-their arguments.
+Unless otherwise specified, function objects passed into parallel algorithms as
+objects of type \tcode{Predicate}, \tcode{BinaryPredicate}, \tcode{Compare},
+\tcode{UnaryOperation}, \tcode{BinaryOperation}, \tcode{BinaryOperation1},
+\tcode{BinaryOperation2}, and the operators used by the analogous overloads to
+these parallel algorithms that could be formed by the invocation with the
+specified default predicate or operation (where applicable) shall not directly
+or indirectly modify objects via their arguments, nor shall they rely on the
+identity of the provided objects..
\rSec2[algorithms.parallel.exec]{Effect of execution policies on algorithm execution}
@@ -1263,6 +1294,19 @@
which describe the manner in which the execution of these algorithms may be
parallelized and the manner in which they apply the element access functions.
+\pnum
+Unless otherwise stated, implementations may make arbitrary copies of elements
+(with type \tcode{T}) from sequences where \tcode{is_trivially_copy_constructible_v}
+and \tcode{is_trivially_destructible_v} are \tcode{true}.
+\begin{note}
+This implies that user-supplied function objects should not rely on object
+identity of arguments for such input sequences. Users for whom the object
+identity of the arguments to these function objects is important should
+consider using a wrapping iterator that returns a non-copied implementation
+object such as \tcode{reference_wrapper}~(\ref{refwrap}) or some equivalent
+solution.
+\end{note}
+
\pnum
The invocations of element access functions in parallel algorithms invoked with
an execution policy object of type \tcode{execution::sequenced_policy} all occur
@@ -1306,7 +1350,7 @@
int a[] = {1,2};
std::for_each(std::execution::par, std::begin(a), std::end(a), [&](int) {
x.fetch_add(1, std::memory_order_relaxed);
- // spin wait for another iteration to change the value of x
+ // spin wait for another iteration to change the value of \tcode{x}
while (x.load(std::memory_order_relaxed) == 1) { } // incorrect: assumes execution order
});
\end{codeblock}
@@ -1335,7 +1379,7 @@
unsequenced with respect to one another within each thread of execution.
These threads of execution are either the invoking thread of execution or threads of
execution implicitly created by the library; the latter will provide weakly parallel
-forward progress guarantees.
+forward progress guarantees.
\begin{note}
This means that multiple function object invocations may be interleaved on a
single thread of execution, which overrides the usual guarantee from \ref{intro.execution}
@@ -1430,6 +1474,15 @@
Unless otherwise specified, the semantics of \tcode{ExecutionPolicy} algorithm
overloads are identical to their overloads without.
+\pnum
+Unless otherwise specified, the complexity requirements of \tcode{ExecutionPolicy}
+algorithm overloads are relaxed from the complexity requirements of the overloads
+without as follows:
+when the guarantee says ``at most \placeholder{expr}'' or ``exactly \placeholder{expr}''
+and does not specify the number of assignments or swaps, and \placeholder{expr}
+is not already expressed with \bigoh{} notation, the complexity of the algorithm
+shall be \bigoh{\placeholder{expr}}.
+
\pnum
Parallel algorithms shall not participate in overload resolution unless
\tcode{is_execution_policy_v>} is \tcode{true}.
@@ -1442,8 +1495,8 @@
\begin{itemdecl}
template
bool all_of(InputIterator first, InputIterator last, Predicate pred);
-template
- bool all_of(ExecutionPolicy&& exec, InputIterator first, InputIterator last,
+template
+ bool all_of(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last,
Predicate pred);
\end{itemdecl}
@@ -1463,8 +1516,8 @@
\begin{itemdecl}
template
bool any_of(InputIterator first, InputIterator last, Predicate pred);
-template
- bool any_of(ExecutionPolicy&& exec, InputIterator first, InputIterator last,
+template
+ bool any_of(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last,
Predicate pred);
\end{itemdecl}
@@ -1484,8 +1537,8 @@
\begin{itemdecl}
template
bool none_of(InputIterator first, InputIterator last, Predicate pred);
-template
- bool none_of(ExecutionPolicy&& exec, InputIterator first, InputIterator last,
+template
+ bool none_of(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last,
Predicate pred);
\end{itemdecl}
@@ -1545,9 +1598,9 @@
\indexlibrary{\idxcode{for_each}}%
\begin{itemdecl}
-template
+template
void for_each(ExecutionPolicy&& exec,
- InputIterator first, InputIterator last,
+ ForwardIterator first, ForwardIterator last,
Function f);
\end{itemdecl}
@@ -1572,6 +1625,9 @@
\pnum
\remarks
If \tcode{f} returns a result, the result is ignored.
+Implementations do not
+have the freedom granted under \ref{algorithms.parallel.exec} to make arbitrary
+copies of elements from the input sequence.
\pnum
\begin{note}
@@ -1617,9 +1673,9 @@
\indexlibrary{\idxcode{for_each_n}}%
\begin{itemdecl}
-template
- InputIterator for_each_n(ExecutionPolicy&& exec, InputIterator first, Size n,
- Function f);
+template
+ ForwardIterator for_each_n(ExecutionPolicy&& exec, ForwardIterator first, Size n,
+ Function f);
\end{itemdecl}
\begin{itemdescr}
@@ -1646,9 +1702,12 @@
\pnum
\remarks
-If \tcode{f} returns a result, the result is ignored.
+If \tcode{f} returns a result, the result is ignored. Implementations do not
+have the freedom granted under \ref{algorithms.parallel.exec} to make arbitrary
+copies of elements from the input sequence.
\end{itemdescr}
+
\rSec2[alg.find]{Find}
\indexlibrary{\idxcode{find}}%
@@ -1658,23 +1717,23 @@
template
InputIterator find(InputIterator first, InputIterator last,
const T& value);
-template
- InputIterator find(ExecutionPolicy&& exec, InputIterator first, InputIterator last,
- const T& value);
+template
+ ForwardIterator find(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last,
+ const T& value);
template
InputIterator find_if(InputIterator first, InputIterator last,
Predicate pred);
-template
- InputIterator find_if(ExecutionPolicy&& exec, InputIterator first, InputIterator last,
- Predicate pred);
+template
+ ForwardIterator find_if(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last,
+ Predicate pred);
template
InputIterator find_if_not(InputIterator first, InputIterator last,
Predicate pred);
-template
- InputIterator find_if_not(ExecutionPolicy&& exec, InputIterator first, InputIterator last,
- Predicate pred);
+template
+ ForwardIterator find_if_not(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last,
+ Predicate pred);
\end{itemdecl}
\begin{itemdescr}
@@ -1759,11 +1818,11 @@
InputIterator
find_first_of(InputIterator first1, InputIterator last1,
ForwardIterator first2, ForwardIterator last2);
-template
- InputIterator
+template
+ ForwardIterator1
find_first_of(ExecutionPolicy&& exec,
- InputIterator first1, InputIterator last1,
- ForwardIterator first2, ForwardIterator last2);
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2);
template
@@ -1771,12 +1830,12 @@
find_first_of(InputIterator first1, InputIterator last1,
ForwardIterator first2, ForwardIterator last2,
BinaryPredicate pred);
-template
- InputIterator
+ ForwardIterator1
find_first_of(ExecutionPolicy&& exec,
- InputIterator first1, InputIterator last1,
- ForwardIterator first2, ForwardIterator last2,
+ ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred);
\end{itemdecl}
@@ -1846,11 +1905,12 @@
\pnum
\complexity
-For a nonempty range, exactly
+For the overloads with no \tcode{ExecutionPolicy}, exactly
\tcode{min((i - first) + 1, (last - first) - 1)}
applications of the corresponding predicate, where \tcode{i} is
\tcode{adjacent_find}'s
-return value.
+return value. For the overloads with an \tcode{ExecutionPolicy},
+\bigoh{\tcode{last - first}} applications of the corresponding predicate.
\end{itemdescr}
\rSec2[alg.count]{Count}
@@ -1861,16 +1921,16 @@
template
typename iterator_traits