From 48b0b0b1cf55146ebe6cd8de9dee78d6c3c1cd3c Mon Sep 17 00:00:00 2001 From: Stefanus Du Toit Date: Mon, 23 Sep 2013 11:02:44 -0500 Subject: [PATCH 1/5] NB GB-11 (C++14 CD) [re.iter], [re.tokiter] Fix exposition-only member formatting. Closes #188. --- source/regex.tex | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/source/regex.tex b/source/regex.tex index 3253aabff7..d19063eaf6 100644 --- a/source/regex.tex +++ b/source/regex.tex @@ -3558,12 +3558,11 @@ regex_iterator& operator++(); regex_iterator operator++(int); private: - // these members are shown for exposition only: - BidirectionalIterator begin; - BidirectionalIterator end; - const regex_type* pregex; - regex_constants::match_flag_type flags; - match_results match; + BidirectionalIterator begin; // \expos + BidirectionalIterator end; // \expos + const regex_type* pregex; // \expos + regex_constants::match_flag_type flags; // \expos + match_results match; // \expos }; } \end{codeblock} @@ -3837,13 +3836,14 @@ const value_type* operator->() const; regex_token_iterator& operator++(); regex_token_iterator operator++(int); - private: // data members for exposition only: - typedef regex_iterator position_iterator; - position_iterator position; - const value_type* result; - value_type suffix; - std::size_t N; - std::vector subs; + private: + typedef + regex_iterator position_iterator; // \expos + position_iterator position; // \expos + const value_type* result; // \expos + value_type suffix; // \expos + std::size_t N; // \expos + std::vector subs; // \expos }; } \end{codeblock} From 67e7638b7c3db020a1b61fd083dd60c3ca24a25a Mon Sep 17 00:00:00 2001 From: Stefanus Du Toit Date: Mon, 23 Sep 2013 11:21:58 -0500 Subject: [PATCH 2/5] NB ES-15 (C++14 CD) [associative.reqmts]: Remove unnecessary definition in table. The identifier "u" was unnecessarily defined in the explanatory paragraph for the Associative Requirements table (Table 102). Closes #187. --- source/containers.tex | 1 - 1 file changed, 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index e29349c650..c4924e04c8 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -1244,7 +1244,6 @@ when \tcode{X} supports multiple keys, \tcode{a_tran} denotes a value of \tcode{X} when the type \tcode{X::key_compare::is_transparent} exists, -\tcode{u} denotes an identifier, \tcode{i} and \tcode{j} satisfy input iterator requirements and refer to elements implicitly convertible to From 97a96f4cda5a4aaf012897d552b1f6cfee783421 Mon Sep 17 00:00:00 2001 From: Stefanus Du Toit Date: Mon, 23 Sep 2013 15:11:44 -0500 Subject: [PATCH 3/5] NB CH-6 (C++14 CD) [over.literal]: Mark reserved example as such. Mark the existing example for user-defined literals with the plain "E" suffix as reserved for clarity. Closes #181. --- source/overloading.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/overloading.tex b/source/overloading.tex index 114a40c94d..4259aa391b 100644 --- a/source/overloading.tex +++ b/source/overloading.tex @@ -3219,7 +3219,7 @@ void operator "" _km(long double); // OK string operator "" _i18n(const char*, std::size_t); // OK template double operator "" _\u03C0(); // OK: UCN for lowercase pi -float operator ""E(const char*); // OK +float operator ""E(const char*); // OK, but reserved~(\ref{usrlit.suffix}) float operator " " B(const char*); // error: non-empty \grammarterm{string-literal} string operator "" 5X(const char*, std::size_t); // error: invalid literal suffix identifier double operator "" _miles(double); // error: invalid \grammarterm{parameter-declaration-clause} From 5c5b6712e41fe2cd8d554802b2179616b98c15f3 Mon Sep 17 00:00:00 2001 From: Stefanus Du Toit Date: Tue, 24 Sep 2013 09:21:31 -0500 Subject: [PATCH 4/5] NB CH-7 (C++14 CD) [intseq.general] Clarify purpose of index_sequence. Add a note to clarify that, and why, index_sequence<> exists since it's only specified in the summary. Closes #183. --- source/utilities.tex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/utilities.tex b/source/utilities.tex index 24bf2f9675..bbe2d5251f 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -1999,6 +1999,10 @@ \end{codeblock} \exitexample +\enternote +The \tcode{index_sequence} alias template is provided for the common case of +an integer sequence of type \tcode{size_t}. +\exitnote \rSec2[intseq.intseq]{Class template \tcode{integer_sequence}} From d33d3890c0d361eb626ce1f7898e03fe731ebf44 Mon Sep 17 00:00:00 2001 From: Stefanus Du Toit Date: Tue, 24 Sep 2013 11:35:59 -0500 Subject: [PATCH 5/5] NB US-15 (C++14 CD): Use the _t form of type traits. Throughout the text, replace uses of traits of the form typename decay::type with the shorter form decay_t using the alias templates introduced in the CD. Do this for all type traits with such aliases. Closes #178. --- source/threads.tex | 14 +++--- source/utilities.tex | 102 +++++++++++++++++++++---------------------- 2 files changed, 57 insertions(+), 59 deletions(-) diff --git a/source/threads.tex b/source/threads.tex index 4cac5e07b8..f3afb5f133 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -276,7 +276,7 @@ result, where \tcode{decay_copy} is defined as follows: \begin{codeblock} -template typename decay::type decay_copy(T&& v) +template decay_t decay_copy(T&& v) { return std::forward(v); } \end{codeblock} @@ -3501,10 +3501,10 @@ struct uses_allocator, Alloc>; template - future::type(typename decay::type...)>::type> + future(decay_t...)>> async(F&& f, Args&&... args); template - future::type(typename decay::type...)>::type> + future(decay_t...)>> async(launch policy, F&& f, Args&&... args); } \end{codeblock} @@ -4607,11 +4607,9 @@ \indexlibrary{\idxcode{async}}% \begin{itemdecl} template - future::type(typename decay::type...)>::type> - async(F&& f, Args&&... args); + future(decay_t...)>> async(F&& f, Args&&... args); template - future::type(typename decay::type...)>::type> - async(launch policy, F&& f, Args&&... args); + future(decay_t...)>> async(launch policy, F&& f, Args&&... args); \end{itemdecl} \begin{itemdescr} @@ -4680,7 +4678,7 @@ \pnum \returns An object of type -\tcode{future::type(typename de\-cay::type...)>::type>} that refers +\tcode{future(decay_t...)>{>}} that refers to the shared state created by this call to \tcode{async}. \pnum diff --git a/source/utilities.tex b/source/utilities.tex index bbe2d5251f..a4ad24efbf 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -63,19 +63,19 @@ // \ref{forward}, forward/move: template - constexpr T&& forward(typename remove_reference::type& t) noexcept; + constexpr T&& forward(remove_reference_t& t) noexcept; template - constexpr T&& forward(typename remove_reference::type&& t) noexcept; + constexpr T&& forward(remove_reference_t&& t) noexcept; template - constexpr typename remove_reference::type&& move(T&&) noexcept; + constexpr remove_reference_t&& move(T&&) noexcept; template - constexpr typename conditional< + constexpr conditional_t< !is_nothrow_move_constructible::value && is_copy_constructible::value, - const T&, T&&>::type move_if_noexcept(T& x) noexcept; + const T&, T&&> move_if_noexcept(T& x) noexcept; // \ref{declval}, declval: template - typename add_rvalue_reference::type declval() noexcept; // as unevaluated operand + add_rvalue_reference_t declval() noexcept; // as unevaluated operand // \ref{pairs}, pairs: template struct pair; @@ -295,8 +295,8 @@ \indexlibrary{\idxcode{forward}}% \begin{itemdecl} -template constexpr T&& forward(typename remove_reference::type& t) noexcept; -template constexpr T&& forward(typename remove_reference::type&& t) noexcept; +template constexpr T&& forward(remove_reference_t& t) noexcept; +template constexpr T&& forward(remove_reference_t&& t) noexcept; \end{itemdecl} \begin{itemdescr} @@ -340,13 +340,13 @@ \indexlibrary{\idxcode{move}}% \begin{itemdecl} -template constexpr typename remove_reference::type&& move(T&& t) noexcept; +template constexpr remove_reference_t&& move(T&& t) noexcept; \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{static_cast::type\&\&>(t)}. +\tcode{static_cast\&\&>(t)}. \pnum \enterexample @@ -385,9 +385,9 @@ \indexlibrary{\idxcode{move_if_noexcept}}% \begin{itemdecl} -template constexpr typename conditional< +template constexpr conditional_t< !is_nothrow_move_constructible::value && is_copy_constructible::value, - const T&, T&&>::type move_if_noexcept(T& x) noexcept; + const T&, T&&> move_if_noexcept(T& x) noexcept; \end{itemdecl} \begin{itemdescr} @@ -404,7 +404,7 @@ \indexlibrary{\idxcode{declval}}% \begin{itemdecl} template - typename add_rvalue_reference::type declval() noexcept; // as unevaluated operand + add_rvalue_reference_t declval() noexcept; // as unevaluated operand \end{itemdecl} \begin{itemdescr} @@ -867,7 +867,7 @@ \indexlibrary{\idxcode{get}!\idxcode{pair}}% \begin{itemdecl} template - constexpr typename tuple_element >::type& + constexpr tuple_element_t >& get(pair&) noexcept; template constexpr const typename tuple_element >::type& @@ -2969,11 +2969,11 @@ \indexlibrary{\idxcode{make_optional}}% \begin{itemdecl} -template constexpr optional::type> make_optional(T&& v); +template constexpr optional{>} make_optional(T&& v); \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{optional::type>(std::forward(v))}. +\pnum \returns \tcode{optional{>}(std::forward(v))}. \end{itemdescr} \rSec2[optional.hash]{Hash support} @@ -5463,7 +5463,7 @@ unique_ptr& operator=(nullptr_t) noexcept; // \ref{unique.ptr.single.observers}, observers - typename add_lvalue_reference::type operator*() const; + add_lvalue_reference_t operator*() const; pointer operator->() const noexcept; pointer get() const noexcept; deleter_type& get_deleter() noexcept; @@ -5853,7 +5853,7 @@ \indexlibrary{\idxcode{operator*}!\idxcode{unique_ptr}} \indexlibrary{\idxcode{unique_ptr}!\idxcode{operator*}} \begin{itemdecl} -typename add_lvalue_reference::type operator*() const; +add_lvalue_reference_t operator*() const; \end{itemdecl} \begin{itemdescr} @@ -6120,7 +6120,7 @@ \remarks This function shall not participate in overload resolution unless \tcode{T} is an array of unknown bound. \pnum -\returns \tcode{unique_ptr(new typename remove_extent::type[n]())}. +\returns \tcode{unique_ptr(new remove_extent_t[n]())}. \end{itemdescr} @@ -8242,7 +8242,7 @@ // invocation template - typename result_of::type + result_of_t operator() (ArgTypes&&...) const; }; } @@ -8365,7 +8365,7 @@ \indexlibrary{\idxcode{operator()}!\idxcode{reference_wrapper}}% \begin{itemdecl} template - typename result_of::type + result_of_t operator()(ArgTypes&&... args) const; \end{itemdecl} @@ -10570,7 +10570,7 @@ Given the following function prototype: \begin{codeblock} template - typename add_rvalue_reference::type create(); + add_rvalue_reference_t create(); \end{codeblock} the predicate condition for a template specialization @@ -10724,7 +10724,7 @@ \begin{codeblock} template - typename add_rvalue_reference::type create(); + add_rvalue_reference_t create(); \end{codeblock} the predicate condition for a template specialization \tcode{is_convertible} @@ -10807,7 +10807,7 @@ struct add_cv;} & The member typedef \tcode{type} shall name the same type as - \tcode{add_const::type>::type}. \\ + \tcode{add_const_t{>}}. \\ \end{libreqtab2a} \rSec3[meta.trans.ref]{Reference modifications} @@ -11093,7 +11093,7 @@ template struct common_type { - typedef typename common_type::type, V...>::type type; + typedef common_type_t, V...> type; }; \end{codeblock} @@ -11389,28 +11389,28 @@ // \ref{time.duration.nonmember}, duration arithmetic template - typename common_type, duration>::type + common_type_t, duration> constexpr operator+(const duration& lhs, const duration& rhs); template - typename common_type, duration>::type + common_type_t, duration> constexpr operator-(const duration& lhs, const duration& rhs); template - duration::type, Period> + duration, Period> constexpr operator*(const duration& d, const Rep2& s); template - duration::type, Period> + duration, Period> constexpr operator*(const Rep1& s, const duration& d); template - duration::type, Period> + duration, Period> constexpr operator/(const duration& d, const Rep2& s); template - typename common_type::type + common_type_t constexpr operator/(const duration& lhs, const duration& rhs); template - duration::type, Period> + duration, Period> constexpr operator%(const duration& d, const Rep2& s); template - typename common_type, duration>::type + common_type_t, duration> constexpr operator%(const duration& lhs, const duration& rhs); // \ref{time.duration.comparisons}, duration comparisons @@ -11447,16 +11447,16 @@ // \ref{time.point.nonmember}, time_point arithmetic template - constexpr time_point>::type> + constexpr time_point>> operator+(const time_point& lhs, const duration& rhs); template - constexpr time_point, Duration2>::type> + constexpr time_point, Duration2>> operator+(const duration& lhs, const time_point& rhs); template - constexpr time_point>::type> + constexpr time_point>> operator-(const time_point& lhs, const duration& rhs); template - constexpr typename common_type::type + constexpr common_type_t operator-(const time_point& lhs, const time_point& rhs); // \ref{time.point.comparisons} time_point comparisons @@ -11693,7 +11693,7 @@ \begin{itemdecl} template struct common_type, chrono::duration> { - typedef chrono::duration::type, @\seebelow@> type; + typedef chrono::duration, @\seebelow@> type; }; \end{itemdecl} @@ -11717,7 +11717,7 @@ \begin{itemdecl} template struct common_type, chrono::time_point> { - typedef chrono::time_point::type> type; + typedef chrono::time_point> type; }; \end{itemdecl} @@ -12088,7 +12088,7 @@ \indexlibrary{\idxcode{common_type}}% \begin{itemdecl} template - constexpr typename common_type, duration >::type + constexpr common_type_t, duration> operator+(const duration& lhs, const duration& rhs); \end{itemdecl} @@ -12100,7 +12100,7 @@ \indexlibrary{\idxcode{common_type}}% \begin{itemdecl} template - constexpr typename common_type, duration >::type + constexpr common_type_t, duration> operator-(const duration& lhs, const duration& rhs); \end{itemdecl} @@ -12113,7 +12113,7 @@ \indexlibrary{\idxcode{duration}!\idxcode{operator*}}% \begin{itemdecl} template - constexpr duration::type, Period> + constexpr duration, Period> operator*(const duration& d, const Rep2& s); \end{itemdecl} @@ -12130,7 +12130,7 @@ \indexlibrary{\idxcode{duration}!\idxcode{operator*}}% \begin{itemdecl} template - constexpr duration::type, Period> + constexpr duration, Period> operator*(const Rep1& s, const duration& d); \end{itemdecl} @@ -12147,7 +12147,7 @@ \indexlibrary{\idxcode{duration}!\idxcode{operator/}}% \begin{itemdecl} template - constexpr duration::type, Period> + constexpr duration, Period> operator/(const duration& d, const Rep2& s); \end{itemdecl} @@ -12165,7 +12165,7 @@ \indexlibrary{\idxcode{duration}!\idxcode{operator/}}% \begin{itemdecl} template - constexpr typename common_type::type + constexpr common_type_t operator/(const duration& lhs, const duration& rhs); \end{itemdecl} @@ -12178,7 +12178,7 @@ \indexlibrary{\idxcode{duration}!\idxcode{operator\%}}% \begin{itemdecl} template - constexpr duration::type, Period> + constexpr duration, Period> operator%(const duration& d, const Rep2& s); \end{itemdecl} @@ -12196,7 +12196,7 @@ \indexlibrary{\idxcode{duration}!\idxcode{operator\%}}% \begin{itemdecl} template - constexpr typename common_type, duration>::type + constexpr common_type_t, duration> operator%(const duration& lhs, const duration& rhs); \end{itemdecl} @@ -12593,7 +12593,7 @@ \indexlibrary{\idxcode{duration}!\idxcode{operator+}}% \begin{itemdecl} template - constexpr time_point>::type> + constexpr time_point>> operator+(const time_point& lhs, const duration& rhs); \end{itemdecl} @@ -12608,7 +12608,7 @@ \indexlibrary{\idxcode{duration}!\idxcode{operator+}}% \begin{itemdecl} template - constexpr time_point, Duration2>::type> + constexpr time_point, Duration2>> operator+(const duration& lhs, const time_point& rhs); \end{itemdecl} @@ -12623,7 +12623,7 @@ \indexlibrary{\idxcode{duration}!\idxcode{operator-}}% \begin{itemdecl} template - constexpr time_point>::type> + constexpr time_point>> operator-(const time_point& lhs, const duration& rhs); \end{itemdecl} @@ -12636,7 +12636,7 @@ \indexlibrary{\idxcode{time_point}!\idxcode{operator-}}% \begin{itemdecl} template - constexpr typename common_type::type + constexpr common_type_t operator-(const time_point& lhs, const time_point& rhs); \end{itemdecl} pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy