From c04f3747170c5a64d4e793d6cd873cf84afcf93d Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Tue, 5 Mar 2019 19:39:47 +0100 Subject: [PATCH] P1459R1 Mandating the Standard Library: Clause 18 - Diagnostics library --- source/diagnostics.tex | 170 +++-------------------------------------- 1 file changed, 11 insertions(+), 159 deletions(-) diff --git a/source/diagnostics.tex b/source/diagnostics.tex index 845daa0338..1d805a450f 100644 --- a/source/diagnostics.tex +++ b/source/diagnostics.tex @@ -100,11 +100,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{logic_error}. - \pnum \ensures \tcode{strcmp(what(), what_arg.c_str()) == 0}. @@ -116,11 +111,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{logic_error}. - \pnum \ensures \tcode{strcmp(what(), what_arg) == 0}. @@ -151,11 +141,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{domain_error}. - \pnum \ensures \tcode{strcmp(what(), what_arg.c_str()) == 0}. @@ -167,11 +152,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{domain_error}. - \pnum \ensures \tcode{strcmp(what(), what_arg) == 0}. @@ -201,11 +181,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{invalid_argument}. - \pnum \ensures \tcode{strcmp(what(), what_arg.c_str()) == 0}. @@ -217,11 +192,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{invalid_argument}. - \pnum \ensures \tcode{strcmp(what(), what_arg) == 0}. @@ -253,11 +223,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{length_error}. - \pnum \ensures \tcode{strcmp(what(), what_arg.c_str()) == 0}. @@ -269,11 +234,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{length_error}. - \pnum \ensures \tcode{strcmp(what(), what_arg) == 0}. @@ -305,11 +265,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{out_of_range}. - \pnum \ensures \tcode{strcmp(what(), what_arg.c_str()) == 0}. @@ -321,11 +276,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{out_of_range}. - \pnum \ensures \tcode{strcmp(what(), what_arg) == 0}. @@ -356,11 +306,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{runtime_error}. - \pnum \ensures \tcode{strcmp(what(), what_arg.c_str()) == 0}. @@ -372,11 +317,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{runtime_error}. - \pnum \ensures \tcode{strcmp(what(), what_arg) == 0}. @@ -407,11 +347,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{range_error}. - \pnum \ensures \tcode{strcmp(what(), what_arg.c_str()) == 0}. @@ -423,11 +358,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{range_error}. - \pnum \ensures \tcode{strcmp(what(), what_arg) == 0}. @@ -457,11 +387,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{overflow_error}. - \pnum \ensures \tcode{strcmp(what(), what_arg.c_str()) == 0}. @@ -473,11 +398,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{overflow_error}. - \pnum \ensures \tcode{strcmp(what(), what_arg) == 0}. @@ -507,11 +427,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{underflow_error}. - \pnum \ensures \tcode{strcmp(what(), what_arg.c_str()) == 0}. @@ -523,11 +438,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects -Constructs an object of class -\tcode{underflow_error}. - \pnum \ensures \tcode{strcmp(what(), what_arg) == 0}. @@ -939,6 +849,8 @@ such type. \end{note} \indexlibrary{\idxcode{error_category}}% +\indexlibrary{\idxcode{error_category}!constructor}% +\indexlibrary{\idxcode{error_category}!destructor}% \indexlibrary{\idxcode{generic_category}}% \indexlibrary{\idxcode{system_category}}% \begin{codeblock} @@ -967,16 +879,6 @@ \rSec3[syserr.errcat.virtuals]{Virtual members} -\indexlibrary{\idxcode{error_category}!destructor}% -\begin{itemdecl} -virtual ~error_category(); -\end{itemdecl} - -\begin{itemdescr} -\pnum -\effects Destroys an object of class \tcode{error_category}. -\end{itemdescr} - \indexlibrarymember{name}{error_category}% \begin{itemdecl} virtual const char* name() const noexcept = 0; @@ -1030,16 +932,6 @@ \rSec3[syserr.errcat.nonvirtuals]{Non-virtual members} -\indexlibrary{\idxcode{error_category}!constructor}% -\begin{itemdecl} -constexpr error_category() noexcept; -\end{itemdecl} - -\begin{itemdescr} -\pnum -\effects Constructs an object of class \tcode{error_category}. -\end{itemdescr} - \indexlibrarymember{operator==}{error_category}% \begin{itemdecl} bool operator==(const error_category& rhs) const noexcept; @@ -1211,9 +1103,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects Constructs an object of type \tcode{error_code}. - \pnum \ensures \tcode{val_ == 0} and \tcode{cat_ == \&system_category()}. \end{itemdescr} @@ -1224,9 +1113,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects Constructs an object of type \tcode{error_code}. - \pnum \ensures \tcode{val_ == val} and \tcode{cat_ == \&cat}. \end{itemdescr} @@ -1239,14 +1125,10 @@ \begin{itemdescr} \pnum -\effects Constructs an object of type \tcode{error_code}. +\constraints \tcode{is_error_code_enum_v} is \tcode{true}. \pnum \ensures \tcode{*this == make_error_code(e)}. - -\pnum -\remarks \raggedright This constructor shall not participate in overload resolution unless\linebreak -\tcode{is_error_code_enum_v} is \tcode{true}. \end{itemdescr} \rSec3[syserr.errcode.modifiers]{Modifiers} @@ -1269,14 +1151,13 @@ \begin{itemdescr} \pnum -\ensures \tcode{*this == make_error_code(e)}. +\constraints \tcode{is_error_code_enum_v} is \tcode{true}. \pnum -\returns \tcode{*this}. +\ensures \tcode{*this == make_error_code(e)}. \pnum -\remarks \raggedright This operator shall not participate in overload resolution unless\linebreak -\tcode{is_error_code_enum_v} is \tcode{true}. +\returns \tcode{*this}. \end{itemdescr} \indexlibrarymember{clear}{error_code}% @@ -1363,7 +1244,7 @@ \begin{itemdescr} \pnum \effects -As if by: \tcode{os << ec.category().name() << ':' << ec.value();} +Equivalent to: \tcode{return os << ec.category().name() << ':' << ec.value();} \end{itemdescr} @@ -1414,9 +1295,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects Constructs an object of type \tcode{error_condition}. - \pnum \ensures \tcode{val_ == 0} and \tcode{cat_ == \&generic_category()}. \end{itemdescr} @@ -1427,9 +1305,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects Constructs an object of type \tcode{error_condition}. - \pnum \ensures \tcode{val_ == val} and \tcode{cat_ == \&cat}. \end{itemdescr} @@ -1442,14 +1317,10 @@ \begin{itemdescr} \pnum -\effects Constructs an object of type \tcode{error_condition}. +\constraints \tcode{is_error_condition_enum_v} is \tcode{true}. \pnum \ensures \tcode{*this == make_error_condition(e)}. - -\pnum -\remarks \raggedright This constructor shall not participate in overload resolution unless\linebreak -\tcode{is_error_condition_enum_v} is \tcode{true}. \end{itemdescr} @@ -1473,14 +1344,13 @@ \begin{itemdescr} \pnum -\ensures \tcode{*this == make_error_condition(e)}. +\constraints \tcode{is_error_condition_enum_v} is \tcode{true}. \pnum -\returns \tcode{*this}. +\ensures \tcode{*this == make_error_condition(e)}. \pnum -\remarks \raggedright This operator shall not participate in overload resolution unless\linebreak -\tcode{is_error_condition_enum_v} is \tcode{true}. +\returns \tcode{*this}. \end{itemdescr} \indexlibrarymember{clear}{error_condition}% @@ -1698,9 +1568,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects Constructs an object of class \tcode{system_error}. - \pnum \ensures \tcode{code() == ec} and\newline \tcode{string_view(what()).find(what_arg.c_str()) != string_view::npos}. @@ -1712,9 +1579,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects Constructs an object of class \tcode{system_error}. - \pnum \ensures \tcode{code() == ec} and \tcode{string_view(what()).find(what_arg) != string_view::npos}. @@ -1726,9 +1590,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects Constructs an object of class \tcode{system_error}. - \pnum \ensures \tcode{code() == ec}. \end{itemdescr} @@ -1739,9 +1600,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects Constructs an object of class \tcode{system_error}. - \pnum \ensures \raggedright \tcode{code() == error_code(ev, ecat)} and\linebreak \tcode{string_view(what()).find(what_arg.c_str()) != string_view::npos}. @@ -1753,9 +1611,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects Constructs an object of class \tcode{system_error}. - \pnum \ensures \raggedright \tcode{code() == error_code(ev, ecat)} and\linebreak \tcode{string_view(what()).find(what_arg) != string_view::npos}. @@ -1767,9 +1622,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -\effects Constructs an object of class \tcode{system_error}. - \pnum \ensures \tcode{code() == error_code(ev, ecat)}. \end{itemdescr}