added missing section about error_category to the adv. templ. chapter

This commit is contained in:
Frank B. Brokken 2017-12-03 10:24:28 +01:00
parent 06d3234fa7
commit dd099d8ba4
5 changed files with 5 additions and 18 deletions

View file

@ -1,3 +1,4 @@
includefile(advancedtemplates/intro) includefile(advancedtemplates/intro)
lsect(SUBTLE)(Subtleties) lsect(SUBTLE)(Subtleties)
@ -149,4 +150,3 @@ includefile(advancedtemplates/expressiontemplates)
subsect(The BasicType trait class and ordering classes) subsect(The BasicType trait class and ordering classes)
includefile(advancedtemplates/basictype) includefile(advancedtemplates/basictype)

View file

@ -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 tt(std::error_code) we can use it in our programs. Here is a little demo
program illustrating its use: 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. In the next section defining and using error conditions is covered in detail.

View file

@ -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 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, 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 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 Errors can usually be categorized. In our simulator we might recognize user
input errors, unavailable requests, system failures, etc.. 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 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 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 value (as an tt(int)). The function must return tt(true) if its
tt(error_code) is associated with the provided error condition enum tt(error_code) is associated with the received error condition enum
value. tt(Equivalent) itself doesn't perform those checks. Rather, it value. tt(Equivalent) itself doesn't perform those checks. Rather, it
retrieves the tt(error_code's error_category) and uses that object's retrieves the tt(error_code's error_category) and uses that object's
tt(equivalent) function to perform the test: tt(equivalent) function to perform the test:

View file

@ -36,8 +36,6 @@ IFDEF(latex)(latexcommand(
\pagestyle{headings} \pagestyle{headings}
\pagenumbering{arabic}))() \pagenumbering{arabic}))()
COMMENT(
COMMENT( 1 ) COMMENT( 1 )
lchapter(Overview)(Overview Of The Chapters) lchapter(Overview)(Overview Of The Chapters)
includefile(overview) includefile(overview)
@ -74,14 +72,10 @@ COMMENT( 9 )
lchapter(MEMORY)(Classes And Memory Allocation) lchapter(MEMORY)(Classes And Memory Allocation)
includefile(memory) includefile(memory)
END)
COMMENT( 10 ) COMMENT( 10 )
lchapter(EXCEPTIONS)(Exceptions) lchapter(EXCEPTIONS)(Exceptions)
includefile(exceptions) includefile(exceptions)
COMMENT(
COMMENT( 11 ) COMMENT( 11 )
lchapter(OVERLOADING)(More Operator Overloading) lchapter(OVERLOADING)(More Operator Overloading)
includefile(overloading) includefile(overloading)
@ -130,19 +124,13 @@ COMMENT( 22 )
lchapter(TEMPCLASS)(Class Templates) lchapter(TEMPCLASS)(Class Templates)
includefile(classtemplates) includefile(classtemplates)
END)
COMMENT( 23 ) COMMENT( 23 )
lchapter(ADVANCEDTEMPL)(Advanced Template Use) lchapter(ADVANCEDTEMPL)(Advanced Template Use)
includefile(advancedtemplates) includefile(advancedtemplates)
COMMENT(
COMMENT( 24 ) COMMENT( 24 )
lchapter(CONCRETE)(Concrete Examples) lchapter(CONCRETE)(Concrete Examples)
includefile(concrete) includefile(concrete)
END)
IFDEF(latex)(latexcommand(\printindex))() IFDEF(latex)(latexcommand(\printindex))()

View file

@ -75,4 +75,3 @@ includefile(exceptions/function)
lsect(CONSEXCEPTIONS)(Exceptions in constructors and destructors) lsect(CONSEXCEPTIONS)(Exceptions in constructors and destructors)
includefile(exceptions/constructors) includefile(exceptions/constructors)