File: advancedtemplates.yo

package info (click to toggle)
c%2B%2B-annotations 13.02.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,576 kB
  • sloc: cpp: 25,297; makefile: 1,523; ansic: 165; sh: 126; perl: 90; fortran: 27
file content (204 lines) | stat: -rw-r--r-- 6,601 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204

includefile(advancedtemplates/intro)

lsect(SUBTLE)(Subtleties)
    includefile(advancedtemplates/subtle)

COMMENT( SF: at c++20: compiles OK
    lsubsect(RETURN NESTED)(Returning types nested under class templates)
    includefile(advancedtemplates/returnnested)
END)

    lsubsect(TYPERES)(Type resolution for base class members)
    includefile(advancedtemplates/basenameresolution)

    lsubsect(DOTTEMP)(::template, .template and ->template)
    includefile(advancedtemplates/dottemplate)

sect(Template Meta Programming)

    subsect(Values according to templates)
    includefile(advancedtemplates/values)

        lsubsubsect(INTTYPE)(Converting integral types to types)
        includefile(advancedtemplates/int2type)

    lsubsect(ALTERNATIVES)(Selecting alternatives using templates)
    includefile(advancedtemplates/alternatives)

        subsubsect(Defining overloading members)
        includefile(advancedtemplates/overloaded)

        lsubsubsect(IFELSE)
            (Class structure as a function of template parameters)
        includefile(advancedtemplates/classstructure)

        subsubsect(An illustrative example)
        includefile(advancedtemplates/example)
        
    subsect(Templates: Iterations by Recursion)
    includefile(advancedtemplates/iterating)

lsect(UDL)(User-defined literals)
includefile(advancedtemplates/userdefined)

lsect(TEMPTEMPPAR)(Template template parameters)
includefile(advancedtemplates/templateparam)

    subsect(Policy classes - I)
    includefile(advancedtemplates/policies)

    subsect(Policy classes - II: template template parameters)
    includefile(advancedtemplates/templateparam2)

        subsubsect(The destructor of Policy classes)
        includefile(advancedtemplates/destructor)

    subsect(Structure by Policy)
    includefile(advancedtemplates/structure)

lsect(ALIASES)(Alias Templates)
includefile(advancedtemplates/aliases)

lsect(TRAIT)(Trait classes)
includefile(advancedtemplates/trait)

    lsubsect(CLASSORNOT)(Distinguishing class from non-class types)
    includefile(advancedtemplates/distinguish.yo)

    lsubsect(TYPETRAITS)(Available type traits)
    includefile(advancedtemplates/availabletraits)

lsect(ERRCODEENUM)(Defining `ErrorCodeEnum' and 'ErrorConditionEnum'
                          enumerations) 
    includefile(advancedtemplates/errorcodeenum)

    lsubsect(ERRCAT)(Deriving classes from std::error_category) 
    includefile(advancedtemplates/errorcategory)

lsect(NOEXCEPT)(Using `noexcept' when offering the `strong guarantee')
includefile(advancedtemplates/noexcept)

sect(More conversions to class types)

    subsect(Types to types)
    includefile(advancedtemplates/typetype)

    lsubsect(NULLTYPE)(An empty type)
    includefile(advancedtemplates/nulltype)

    lsubsect(TYPECONV)(Type convertibility)
    includefile(advancedtemplates/conversion)

        subsubsect(Determining inheritance)
        includefile(advancedtemplates/inheritance)

lsect(TEMPLIST)(Template TypeList processing)
    includefile(advancedtemplates/listintro)

    subsect(The length of a TypeList)
    includefile(advancedtemplates/length)

    lsubsect(SEARCHTYPE)(Searching a TypeList)
    includefile(advancedtemplates/search)

    lsubsect(ATINDEX)(Selecting from a TypeList)
    includefile(advancedtemplates/select)

    subsect(Prefixing/Appending to a TypeList)
    includefile(advancedtemplates/append)

    subsect(Erasing from a TypeList)
    includefile(advancedtemplates/erase)

        subsubsect(Erasing the first occurrence)
        includefile(advancedtemplates/erasefirst)

        subsubsect(Erasing a type by its index)
        includefile(advancedtemplates/eraseindex)

        subsubsect(Erasing all occurrences of a type)
        includefile(advancedtemplates/eraseall)

        subsubsect(Erasing duplicates)
        includefile(advancedtemplates/erasedup)

sect(Using a TypeList)
includefile(advancedtemplates/using)

    subsect(The Wrap and Multi class templates)
    includefile(advancedtemplates/multi)

    subsect(The MultiBase class template)
    includefile(advancedtemplates/multibase)

    lsubsect(GENSUPPORT)(Support templates)
    includefile(advancedtemplates/support)

    subsect(Using Multi)
    includefile(advancedtemplates/usingmulti)

sect(Expression Templates)
includefile(advancedtemplates/expressiontemplates)

    subsect(Designing an Expression Template)
    includefile(advancedtemplates/designing)

    subsect(Implementing an Expression Template)
    includefile(advancedtemplates/implementing)

    subsect(The BasicType trait class and ordering classes)
    includefile(advancedtemplates/basictype)

lsect(CONCEPTS)(Concepts)
includefile(advancedtemplates/concepts/intro)

    lsubsect(CONDEF)(Defining concepts)
    includefile(advancedtemplates/concepts/defining)
    
    subsect(Requirements)
    includefile(advancedtemplates/concepts/requirements)
    
        lsubsubsect(REQSIMPLE)(Simple requirements)
        includefile(advancedtemplates/concepts/simple)
    
        subsubsect(Type requirements)
        includefile(advancedtemplates/concepts/type)
    
        lsubsubsect(REQCOMP)(Compound requirements)
        includefile(advancedtemplates/concepts/compound)
    
        lsubsubsect(REQNEST)(Nested requirements)
        includefile(advancedtemplates/concepts/nested)
    
    lsubsect(CXXCONCEPTS)(Predefined concepts)
    includefile(advancedtemplates/concepts/predefined)
    
        subsubsect(Concepts specifying one template type parameter)
        includefile(advancedtemplates/concepts/oneparam)
    
        subsubsect(Concepts specifying two template type parameters)
        includefile(advancedtemplates/concepts/twoparams)
    
        lsubsubsect(CXXMULTI)
                   (Concepts specifying multiple template type parameters) 
        includefile(advancedtemplates/concepts/multipleparams)
    
    lsubsect(CONPACK)(Applying concepts to template parameter packs)
    includefile(advancedtemplates/concepts/parampack)
    
    subsect(Applying concepts to free functions)
    includefile(advancedtemplates/concepts/freefunctions)
    
    subsect(Implementing constrained class members)
    includefile(advancedtemplates/concepts/constrained)
    
    subsect(Constrained partial specializations)
    includefile(advancedtemplates/concepts/specializations)
    
        subsubsect(Function- and class template declarations)
        includefile(advancedtemplates/concepts/declarations)
    
        lsubsubsect(BOUNDCONCEPT)(Bound free-operators)
        includefile(advancedtemplates/concepts/boundfriends)