Skip to content

Commit b490514

Browse files
bernhardmgrubersponce
authored andcommitted
Improve wording on some slides
1 parent 5a12b7a commit b490514

File tree

6 files changed

+21
-20
lines changed

6 files changed

+21
-20
lines changed

talk/C++Course.tex

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
\item It is not for experts
4343
\item It is not complete at all (would need 3 weeks...)
4444
\begin{itemize}
45-
\item although is it already too long for the time we have
45+
\item although it is already too long for the time we have
4646
\item \inserttotalframenumber{} slides, \insertpresentationendpage{} pages, \total{ex@counter} exercises...
4747
\end{itemize}
4848
\end{itemize}
@@ -111,8 +111,8 @@
111111
\input{basicconcepts/headersinterfaces}
112112
\input{basicconcepts/auto}
113113
\begin{advanced}
114-
\input{basicconcepts/inline}
115-
\input{basicconcepts/assert}
114+
\input{basicconcepts/inline}
115+
\input{basicconcepts/assert}
116116
\end{advanced}
117117

118118
\section[OO]{Object orientation (OO)}
@@ -123,7 +123,7 @@
123123
\input{objectorientation/allocations}
124124
\input{objectorientation/advancedoo}
125125
\begin{advanced}
126-
\input{objectorientation/typecasting}
126+
\input{objectorientation/typecasting}
127127
\end{advanced}
128128
\input{objectorientation/operators}
129129
\input{objectorientation/functors}
@@ -136,7 +136,6 @@
136136
\begin{advanced}
137137
\input{morelanguage/constexpr}
138138
\end{advanced}
139-
140139
\input{morelanguage/exceptions}
141140
\begin{advanced}
142141
\input{morelanguage/move}

talk/expert/modules.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@
401401
\begin{itemize}
402402
\item I.e.\ the header does not require setup of preprocessor state before inclusion
403403
\end{itemize}
404-
\item All standard library headers are importable
404+
\item All \cpp standard library headers are importable
405405
\item C wrapper headers (\mintinline{cpp}{<c*>}) are not
406406
\end{itemize}
407407
\end{block}

talk/morelanguage/constexpr.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@
2828
\begin{itemize}
2929
\item A \mintinline{cpp}{constexpr} function \emph{may} be executed at compile time.
3030
\begin{itemize}
31-
\item Arguments must be \mintinline{cpp}{constexpr} or literals in order to benefit from compile time computation
31+
\item Arguments must be \mintinline{cpp}{constexpr} or literals in order to allow compile time evaluation
3232
\item Function body must be visible to the compiler
3333
\end{itemize}
3434
\item A \mintinline{cpp}{constexpr} function can also be used at runtime
3535
\item A \mintinline{cpp}{constexpr} variable must be initialized at compile time
3636
\item Classes can have \mintinline{cpp}{constexpr} member functions
3737
\item Objects used in constant expressions must be of \emph{literal type}:
3838
\begin{itemize}
39-
\item an integral, floating-point, enum, reference, pointer type
40-
\item a union (of at least one) or array of literal types
41-
\item a class type with a \mintinline{cpp}{constexpr} constructor and
39+
\item integral, floating-point, enum, reference, pointer type
40+
\item union (of at least one) or array of literal types
41+
\item class type with a \mintinline{cpp}{constexpr} constructor and
4242
the destructor is trivial (or \mintinline{cpp}{constexpr} since C++20)
4343
\end{itemize}
4444
\item A constexpr function is implicitly \mintinline{cpp}{inline} (header files)

talk/morelanguage/constness.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
\begin{frame}[fragile]
44
\frametitlecpp[98]{Constness}
5-
\begin{block}{The {\it const} keyword}
5+
\begin{block}{The \texttt{const} keyword}
66
\begin{itemize}
77
\item indicate that the element to the left is constant
88
\item this element won't be modifiable in the future
@@ -51,8 +51,8 @@
5151
\end{frame}
5252

5353
\begin{frame}[fragile]
54-
\frametitlecpp[98]{Method constness}
55-
\begin{block}{The {\it const} keyword for member functions}
54+
\frametitlecpp[98]{Member function constness}
55+
\begin{block}{The \texttt{const} keyword for member functions}
5656
\begin{itemize}
5757
\item indicate that the function does not modify the object
5858
\item in other words, \mintinline{cpp}{this} is a pointer to a constant object

talk/morelanguage/stl.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,12 @@
220220
\end{cppcode*}
221221
\end{exampleblock}
222222
\pause
223-
\begin{exampleblock}{Good practice}
223+
\begin{goodpracticeWithShortcut}{Use STL algorithms with lambdas}{STL and lambdas}
224224
\begin{itemize}
225-
\item Use STL algorithms with lambdas!
225+
\item Prefer lambdas over functors when using the STL
226226
\item Avoid binders like \mintinline{cpp}{std::bind2nd}, \mintinline{cpp}{std::ptr_fun}, etc.
227227
\end{itemize}
228-
\end{exampleblock}
228+
\end{goodpracticeWithShortcut}
229229
\end{frame}
230230

231231
\begin{frame}[fragile]

talk/morelanguage/templates.tex

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
struct Map {
9797
void set(const KeyType &key, ValueType value);
9898
ValueType get(const KeyType &key);
99-
}
99+
};
100100

101101
Map<std::string, int> m1;
102102
Map<float> m2; // Map<float, float>
@@ -115,7 +115,7 @@
115115
}
116116
// just declaration
117117
ValueType get(const KeyType &key);
118-
}
118+
};
119119

120120
// out-of-line definition
121121
template<typename KeyType, typename ValueType>
@@ -132,7 +132,7 @@
132132
\begin{itemize}
133133
\item integral types, pointer, enums in \cpp98
134134
\item \mintinline{cpp}{auto} in \cpp17
135-
\item floating-point and literal types in \cpp20
135+
\item literal types (includes floating points) in \cpp20
136136
\end{itemize}
137137
\end{block}
138138
\begin{cppcode*}{}
@@ -142,6 +142,8 @@
142142
float perimeter() {return 2*N*sin(PI/N)*m_radius;}
143143
float m_radius;
144144
};
145+
146+
Polygon<19> nonadecagon{3.3f};
145147
\end{cppcode*}
146148
\end{frame}
147149

@@ -413,7 +415,7 @@
413415
\begin{frame}[fragile]
414416
\frametitlecpp[17]{Class Template Argument Deduction (CTAD)}
415417
\begin{block}{Standard library examples}
416-
\begin{cppcode*}{}
418+
\begin{cppcode*}{gobble=2}
417419
std::pair p{1.2, true}; // std::pair<double, bool>
418420
std::tuple t{1.2, true, 32};
419421
// std::tuple<double, bool, int>

0 commit comments

Comments
 (0)