mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-16 07:48:44 +01:00
added missing section about error_category to the adv. templ. chapter
This commit is contained in:
parent
06d3234fa7
commit
dd099d8ba4
5 changed files with 5 additions and 18 deletions
|
@ -1,3 +1,4 @@
|
|||
|
||||
includefile(advancedtemplates/intro)
|
||||
|
||||
lsect(SUBTLE)(Subtleties)
|
||||
|
@ -149,4 +150,3 @@ includefile(advancedtemplates/expressiontemplates)
|
|||
|
||||
subsect(The BasicType trait class and ordering classes)
|
||||
includefile(advancedtemplates/basictype)
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ category class we take the following steps:
|
|||
tt(std::error_code) we can use it in our programs. Here is a little demo
|
||||
program illustrating its use:
|
||||
|
||||
verbinsert(-as4 examples/errcode/part/main.cc;
|
||||
verbinsert(-as4 examples/errcode/part/main.cc)
|
||||
|
||||
In the next section defining and using error conditions is covered in detail.
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ related to its on-board calculator. If we're using facilities provided by
|
|||
libraries then several more enums might also be available that we could use in
|
||||
our simulator. E.g., there could be a data base of airport approach charts,
|
||||
defining an tt(ApproachChartError) enum, and the simulator's GPS might come
|
||||
with its own tt(GPGError) enum.
|
||||
with its own tt(GPSError) enum.
|
||||
|
||||
Errors can usually be categorized. In our simulator we might recognize user
|
||||
input errors, unavailable requests, system failures, etc..
|
||||
|
@ -50,8 +50,8 @@ new error conditions to the current set. Here is its interface:
|
|||
|
||||
The members tt(name) and tt(message) have trivial implementations. The member
|
||||
tt(equivalent) receives an tt(error_code) object and an error condition enum
|
||||
value (as an tt(int)). The function must return tt(true) if the provided
|
||||
tt(error_code) is associated with the provided error condition enum
|
||||
value (as an tt(int)). The function must return tt(true) if its
|
||||
tt(error_code) is associated with the received error condition enum
|
||||
value. tt(Equivalent) itself doesn't perform those checks. Rather, it
|
||||
retrieves the tt(error_code's error_category) and uses that object's
|
||||
tt(equivalent) function to perform the test:
|
||||
|
|
|
@ -36,8 +36,6 @@ IFDEF(latex)(latexcommand(
|
|||
\pagestyle{headings}
|
||||
\pagenumbering{arabic}))()
|
||||
|
||||
COMMENT(
|
||||
|
||||
COMMENT( 1 )
|
||||
lchapter(Overview)(Overview Of The Chapters)
|
||||
includefile(overview)
|
||||
|
@ -74,14 +72,10 @@ COMMENT( 9 )
|
|||
lchapter(MEMORY)(Classes And Memory Allocation)
|
||||
includefile(memory)
|
||||
|
||||
END)
|
||||
|
||||
COMMENT( 10 )
|
||||
lchapter(EXCEPTIONS)(Exceptions)
|
||||
includefile(exceptions)
|
||||
|
||||
COMMENT(
|
||||
|
||||
COMMENT( 11 )
|
||||
lchapter(OVERLOADING)(More Operator Overloading)
|
||||
includefile(overloading)
|
||||
|
@ -130,19 +124,13 @@ COMMENT( 22 )
|
|||
lchapter(TEMPCLASS)(Class Templates)
|
||||
includefile(classtemplates)
|
||||
|
||||
END)
|
||||
|
||||
COMMENT( 23 )
|
||||
lchapter(ADVANCEDTEMPL)(Advanced Template Use)
|
||||
includefile(advancedtemplates)
|
||||
|
||||
COMMENT(
|
||||
|
||||
COMMENT( 24 )
|
||||
lchapter(CONCRETE)(Concrete Examples)
|
||||
includefile(concrete)
|
||||
|
||||
END)
|
||||
|
||||
IFDEF(latex)(latexcommand(\printindex))()
|
||||
|
||||
|
|
|
@ -75,4 +75,3 @@ includefile(exceptions/function)
|
|||
|
||||
lsect(CONSEXCEPTIONS)(Exceptions in constructors and destructors)
|
||||
includefile(exceptions/constructors)
|
||||
|
||||
|
|
Loading…
Reference in a new issue