You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c4d5fbe
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: exercise/tasks.tex
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ \section{Recursion}
13
13
14
14
\section{Function traits}
15
15
\label{sec:fcttraits}
16
-
Finish the implementation of \texttt{function\_traits} and \texttt{lambda\_traits}, such that the program compiles successfully! Note, that it is sufficient for \texttt{function\_traits} to only accept instances of \texttt{std::function}. Think about how you can use your implementation of \texttt{function\_traits} with lambda expressions and implement this logic in \texttt{lambda\_traits}. Note further, that invocations of \texttt{std::function} are not critical in terms of possible performance penalties in this scenario, as long as the traits are available at compile time (as required in \texttt{main}).
16
+
Finish the implementation of \texttt{function\_traits} and \texttt{lambda\_traits} such that the program compiles successfully! Note that it is sufficient for \texttt{function\_traits} to only accept instances of \texttt{std::function}. Think about how you can use your implementation of \texttt{function\_traits} with lambda expressions and implement this logic in \texttt{lambda\_traits}. Note further that invocations of \texttt{std::function} are not critical in terms of possible performance penalties in this scenario, as long as the traits are available at compile time (as required in \texttt{main}).
17
17
18
18
\inputcpplisting{snippet21a}
19
19
@@ -22,7 +22,7 @@ \section{Function traits}
22
22
\newpage
23
23
24
24
\section{Passing lambdas as argument}
25
-
Implement \texttt{Filters} as an logical \textit{or} filter gathering, such that the program below compiles and runs successfully.
25
+
Implement \texttt{Filters} as an logical \textit{or} filter gathering such that the program below compiles and runs successfully.
26
26
27
27
\inputcpplisting{snippet20a}
28
28
@@ -40,7 +40,7 @@ \section{Passing lambdas as argument}
40
40
\begin{lstlisting}
41
41
template <typename F> void Filters::add_filter(F)
42
42
\end{lstlisting}
43
-
that adds a filter to the gathering. Note, that in the example there is no common type in terms of \texttt{std::common\_type\_t} for \texttt{f1}, \texttt{f2} and \texttt{f3}:
43
+
that adds a filter to the gathering. Note that in the example there is no common type in terms of \texttt{std::common\_type\_t} for \texttt{f1}, \texttt{f2} and \texttt{f3}:
44
44
\begin{lstlisting}
45
45
using T12 = std::common_type_t<decltype(f1), decltype(f2)>; // OK
46
46
using T123 = std::common_type_t<T12, decltype(f3)>; // Compile-time error!
0 commit comments