From 62734eb44fab555448e2997d5897450c1f567d97 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 25 Aug 2014 16:53:32 -0700 Subject: [PATCH 01/11] Fix to 2013-09 LWG Motion 7: [comparisons] Fix incorrect application of N3789 to the working paper: - Add 'constexpr' to std::equal_to<>::operator() std::not_equal_to<>::operator() std::greater<>::operator() std::less<>::operator() std::greater_equal<>::operator() std::less_equal<>::operator() - Reorder 'bool constexpr' to 'constexpr bool' in std::logical_or::operator() std::logical_and::operator() std::logical_not::operator() Also fixes 14882:2014 DIS JP 08, fixes 14882:2014 DIS JP 09, fixes #291. --- source/utilities.tex | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index 6a2727225a..063e535cef 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -7807,7 +7807,7 @@ \indexlibrary{\idxcode{equal_to<>}}% \begin{itemdecl} template <> struct equal_to { - template auto operator()(T&& t, U&& u) const + template constexpr auto operator()(T&& t, U&& u) const -> decltype(std::forward(t) == std::forward(u)); typedef @\unspec@ is_transparent; @@ -7822,7 +7822,7 @@ \indexlibrary{\idxcode{not_equal_to<>}}% \begin{itemdecl} template <> struct not_equal_to { - template auto operator()(T&& t, U&& u) const + template constexpr auto operator()(T&& t, U&& u) const -> decltype(std::forward(t) != std::forward(u)); typedef @\unspec@ is_transparent; @@ -7837,7 +7837,7 @@ \indexlibrary{\idxcode{greater<>}}% \begin{itemdecl} template <> struct greater { - template auto operator()(T&& t, U&& u) const + template constexpr auto operator()(T&& t, U&& u) const -> decltype(std::forward(t) > std::forward(u)); typedef @\unspec@ is_transparent; @@ -7852,7 +7852,7 @@ \indexlibrary{\idxcode{less<>}}% \begin{itemdecl} template <> struct less { - template auto operator()(T&& t, U&& u) const + template constexpr auto operator()(T&& t, U&& u) const -> decltype(std::forward(t) < std::forward(u)); typedef @\unspec@ is_transparent; @@ -7867,7 +7867,7 @@ \indexlibrary{\idxcode{greater_equal<>}}% \begin{itemdecl} template <> struct greater_equal { - template auto operator()(T&& t, U&& u) const + template constexpr auto operator()(T&& t, U&& u) const -> decltype(std::forward(t) >= std::forward(u)); typedef @\unspec@ is_transparent; @@ -7882,7 +7882,7 @@ \indexlibrary{\idxcode{less_equal<>}}% \begin{itemdecl} template <> struct less_equal { - template auto operator()(T&& t, U&& u) const + template constexpr auto operator()(T&& t, U&& u) const -> decltype(std::forward(t) <= std::forward(u)); typedef @\unspec@ is_transparent; @@ -7909,7 +7909,7 @@ \indexlibrary{\idxcode{logical_and}}% \begin{itemdecl} template struct logical_and { - bool constexpr operator()(const T& x, const T& y) const; + constexpr bool operator()(const T& x, const T& y) const; typedef T first_argument_type; typedef T second_argument_type; typedef bool result_type; @@ -7924,7 +7924,7 @@ \indexlibrary{\idxcode{logical_or}}% \begin{itemdecl} template struct logical_or { - bool constexpr operator()(const T& x, const T& y) const; + constexpr bool operator()(const T& x, const T& y) const; typedef T first_argument_type; typedef T second_argument_type; typedef bool result_type; @@ -7939,7 +7939,7 @@ \indexlibrary{\idxcode{logical_not}}% \begin{itemdecl} template struct logical_not { - bool constexpr operator()(const T& x) const; + constexpr bool operator()(const T& x) const; typedef T argument_type; typedef bool result_type; }; From 4321702e8e78bed6071a2a26881f04d1fa19c361 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 25 Aug 2014 17:19:50 -0700 Subject: [PATCH 02/11] JP 06: [dcl.constexpr] Remove incorrect example. Also fixes #370. --- source/declarations.tex | 8 -------- 1 file changed, 8 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index f0f7da55a6..e29c8ad4e1 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -954,14 +954,6 @@ The \tcode{constexpr} specifier has no effect on the type of a \tcode{constexpr} function or a \tcode{constexpr} constructor. \enterexample \begin{codeblock} -class debug_flag { -public: - explicit debug_flag(bool); - constexpr bool is_on() const; // error: \tcode{debug_flag} not - // literal type -private: - bool flag; -}; constexpr int bar(int x, int y) // OK { return x + y + x*y; } // ... From c20b92c72d8c8d03cceef4ac736e0664b4c73c71 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 25 Aug 2014 17:59:02 -0700 Subject: [PATCH 03/11] [multiset.cons] Add missing parameter type. Fixes #189. --- source/containers.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index cbb3460125..9adf40fc3d 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -6570,7 +6570,7 @@ \indexlibrary{\idxcode{multiset}!\idxcode{multiset}}% \begin{itemdecl} template - multiset(InputIterator first, last, + multiset(InputIterator first, InputIterator last, const Compare& comp = Compare(), const Allocator& = Allocator()); \end{itemdecl} From 5208210796f28b72f958c3e39696c2280ce133e1 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 26 Aug 2014 13:30:12 -0700 Subject: [PATCH 04/11] JP 11: [thread.mutex.requirements.general] Remove outdated sentence. This sentence directly contradicts several other portions of the standard, and does not reflect the intended meaning. --- source/threads.tex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/threads.tex b/source/threads.tex index e743367e47..77c08007d5 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -890,8 +890,7 @@ data between execution agents~(\ref{thread.req.lockable}). An execution agent \term{owns} a mutex from the time it successfully calls one of the lock functions until it calls unlock. Mutexes can be either recursive or non-recursive, and can -grant simultaneous ownership to one or many execution agents. The mutex types supplied by the standard -library provide exclusive ownership semantics: only one thread may own the mutex at a time. Both +grant simultaneous ownership to one or many execution agents. Both recursive and non-recursive mutexes are supplied. \rSec3[thread.mutex.requirements.mutex]{Mutex types} From f6967063d8640a8973e8e7e50288bfeb120cb044 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 26 Aug 2014 13:41:19 -0700 Subject: [PATCH 05/11] Update config for building D4141. --- source/config.tex | 6 +++--- source/cover-reg.tex | 2 +- source/front.tex | 4 ++-- source/std.tex | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/config.tex b/source/config.tex index d69ad2614c..401b83adec 100644 --- a/source/config.tex +++ b/source/config.tex @@ -1,8 +1,8 @@ %!TEX root = std.tex %%-------------------------------------------------- %% Version numbers -\newcommand{\docno}{N3936} -\newcommand{\prevdocno}{N3797} +\newcommand{\docno}{N4141} +\newcommand{\prevdocno}{N3936} \newcommand{\cppver}{201402L} %% Release date @@ -10,4 +10,4 @@ %% Library chapters \newcommand{\firstlibchapter}{language.support} -\newcommand{\lastlibchapter}{thread} \ No newline at end of file +\newcommand{\lastlibchapter}{thread} diff --git a/source/cover-reg.tex b/source/cover-reg.tex index 0910f727fa..bad777e00d 100644 --- a/source/cover-reg.tex +++ b/source/cover-reg.tex @@ -8,7 +8,7 @@ \vspace{2ex} \begin{flushright} -\textbf{ISO/IEC JTC1 SC22 WG21 N\,\LARGE3290} +\textbf{ISO/IEC JTC1 SC22 WG21 N\,\LARGE4141} Date: \reldate diff --git a/source/front.tex b/source/front.tex index bc6b0e7664..f143f245ee 100644 --- a/source/front.tex +++ b/source/front.tex @@ -1,6 +1,6 @@ %!TEX root = std.tex -\input{cover-wd} -% \input{cover-reg} +% \input{cover-wd} +\input{cover-reg} %%-------------------------------------------------- %% The table of contents, list of tables, and list of figures diff --git a/source/std.tex b/source/std.tex index 7776ad366b..ca05ed0774 100644 --- a/source/std.tex +++ b/source/std.tex @@ -3,8 +3,8 @@ %%-------------------------------------------------- %% basics -% \documentclass[letterpaper,oneside,openany]{memoir} -\documentclass[ebook,10pt,oneside,openany,final]{memoir} +\documentclass[letterpaper,oneside,openany,final]{memoir} +% \documentclass[ebook,10pt,oneside,openany,final]{memoir} % \includeonly{declarations} \usepackage[american] @@ -33,7 +33,7 @@ \usepackage[pdftex, pdftitle={C++ International Standard}, pdfsubject={C++ International Standard}, - pdfcreator={Stefanus Du Toit}, + pdfcreator={Richard Smith}, bookmarks=true, bookmarksnumbered=true, pdfpagelabels=true, From 6512d97e065f198a41c178e9d80054106ffc3d2b Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 6 Aug 2014 11:11:29 +0100 Subject: [PATCH 06/11] [atomics.syn] Fix typo by replacing ')' with '_' Fixes #359 --- source/atomics.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/atomics.tex b/source/atomics.tex index 5e0d2758fc..7615067d07 100644 --- a/source/atomics.tex +++ b/source/atomics.tex @@ -83,7 +83,7 @@ memory_order, memory_order) noexcept; bool atomic_compare_exchange_weak_explicit(@\textit{atomic-type}@*, T*, T. memory_order, memory_order) noexcept; - bool atomic_compare)exchange_strong_explicit(volatile @\textit{atomic-type}@*, T*, T, + bool atomic_compare_exchange_strong_explicit(volatile @\textit{atomic-type}@*, T*, T, memory_order, memory_order) noexcept; bool atomic_compare_exchange_strong_explicit(@\textit{atomic-type}@*, T*, T, memory_order, memory_order) noexcept; From 013e01f0ed9aec1c48fca4832b3e4e681c1e070d Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 30 Jun 2014 11:10:09 +0100 Subject: [PATCH 07/11] [atomics.syn] Replace comma with period Reported by Stephan T. Lavavej. Fixes #340 --- source/atomics.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/atomics.tex b/source/atomics.tex index 7615067d07..8378a29e2d 100644 --- a/source/atomics.tex +++ b/source/atomics.tex @@ -81,7 +81,7 @@ bool atomic_compare_exchange_strong(@\textit{atomic-type}@*, T*, T) noexcept; bool atomic_compare_exchange_weak_explicit(volatile @\textit{atomic-type}@*, T*, T, memory_order, memory_order) noexcept; - bool atomic_compare_exchange_weak_explicit(@\textit{atomic-type}@*, T*, T. + bool atomic_compare_exchange_weak_explicit(@\textit{atomic-type}@*, T*, T, memory_order, memory_order) noexcept; bool atomic_compare_exchange_strong_explicit(volatile @\textit{atomic-type}@*, T*, T, memory_order, memory_order) noexcept; From ebde1852e7a28cf4d6b7639d265d09002828bf75 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 5 Aug 2014 12:10:46 +0100 Subject: [PATCH 08/11] [func.bind.bind] Fix "template parameter back" typo. Fixes #316 --- source/utilities.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utilities.tex b/source/utilities.tex index 063e535cef..ad008cbda3 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -8259,7 +8259,7 @@ \begin{itemize} \item \tcode{FD} is the type \tcode{decay_t}, \item \tcode{fd} is an lvalue of type \tcode{FD} constructed from \tcode{std::forward(f)}, -\item \tcode{Ti} is the $i^{th}$ type in the template parameter back \tcode{BoundArgs}, +\item \tcode{Ti} is the $i^{th}$ type in the template parameter pack \tcode{BoundArgs}, \item \tcode{TiD} is the type \tcode{decay_t}, \item \tcode{ti} is the $i^{th}$ argument in the function parameter pack \tcode{bound_args}, \item \tcode{tid} is an lvalue of type \tcode{TiD} constructed from \tcode{std::forward(ti)}, From d79ad597b5adc9b974cf3797a13c06744a5745e8 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 5 Aug 2014 11:40:22 +0100 Subject: [PATCH 09/11] [futures.overview] Add ArgTypes... to swap declaration. Fixes #336 --- source/threads.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/threads.tex b/source/threads.tex index 77c08007d5..1d4c22f4b6 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -3505,7 +3505,7 @@ template class packaged_task; - template + template void swap(packaged_task&, packaged_task&) noexcept; template From c0599d33e2a8899ec9d0d90530d73363dc40b440 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 2 Sep 2014 16:00:06 -0700 Subject: [PATCH 10/11] Update document stage. --- source/cover-reg.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/cover-reg.tex b/source/cover-reg.tex index bad777e00d..4222178877 100644 --- a/source/cover-reg.tex +++ b/source/cover-reg.tex @@ -49,7 +49,7 @@ \vfill \noindent Document type: Draft International Standard\\ -Document stage: (40) Enquiry\\ +Document stage: (40) Publication\\ Document Language: E \pagebreak From 0d8d6b01387bd812c13cb3dab5e8c3e1390f6d84 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 2 Sep 2014 16:16:52 -0700 Subject: [PATCH 11/11] Update document stage code too. --- source/cover-reg.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/cover-reg.tex b/source/cover-reg.tex index 4222178877..12bbcee788 100644 --- a/source/cover-reg.tex +++ b/source/cover-reg.tex @@ -49,7 +49,7 @@ \vfill \noindent Document type: Draft International Standard\\ -Document stage: (40) Publication\\ +Document stage: (60) Publication\\ Document Language: E \pagebreak