Skip to content

Commit 5e07c6d

Browse files
Sebastien Poncesponce
authored andcommitted
tiny fixes found along the way on third day of advanced course
1 parent b75fc73 commit 5e07c6d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

talk/concurrency/threadsasync.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
\subsection[thr]{Threads and async}
22

33
\begin{frame}[fragile]
4-
\frametitlecpp[11]{Basic concurrency}
4+
\frametitle{Basic concurrency \hfill \cpp11/\cpp20}
55
\begin{block}{Threading}
66
\begin{itemize}
77
\item \cpp11 added \mintinline{cpp}{std::thread} in \mintinline{cpp}{<thread>} header

talk/expert/perfectforwarding.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@
167167
f(4); // rvalue -> T&& is int&&
168168
double d = 3.14;
169169
f(d); // lvalue -> T&& is double&
170-
float f() {...}
171-
f(f()); // rvalue -> T&& is float&&
170+
float g() {...}
171+
f(g()); // rvalue -> T&& is float&&
172172
std::string s = "hello";
173173
f(s); // lvalue -> T&& is std::string&
174174
f(std::move(s)); // rvalue -> T&& is std::string&&

talk/expert/variadictemplate.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@
8282
\begin{exampleblock}{Example}
8383
\begin{cppcode*}{}
8484
template<typename... Args>
85-
T sum1(Args... args) {
85+
auto sum1(Args... args) {
8686
return (args + ...); // unary fold over +
8787
} // parentheses mandatory
8888
template<typename... Args>
89-
T sum2(Args... args) {
89+
auto sum2(Args... args) {
9090
return (args + ... + 0); // binary fold over +
9191
} // parentheses mandatory
9292
int sum = sum1(); // error

0 commit comments

Comments
 (0)