Skip to content
Snippets Groups Projects
Commit b5cfc39c authored by Francesco Giacomini's avatar Francesco Giacomini
Browse files

final touches

parent eaa0b2bb
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,7 @@
\institute{INFN-CNAF}
\date{ESC'17 -- Bertinoro, 23-28 October 2017}
\date{ESC'17 -- Bertinoro, 22-28 October 2017}
%\date[Short Occasion] % (optional)
%{Date / Occasion}
......
......@@ -81,15 +81,6 @@
\end{itemize}
\end{frame}
\begin{frame}{Hands-on}
\begin{itemize}
\item Learn how to format automatically your code with clang-format
\item C++ and Memory $\rightarrow$ Format
\item Format \code{hello.cpp} using the default settings
\item Create a configuration file and play with the settings
\end{itemize}
\end{frame}
\section{Type deduction}
\begin{frame}[fragile]{\texttt{auto}}
......@@ -874,7 +865,7 @@ $ ./a.out
\begin{frame}{Hands-on}
\begin{itemize}
\item C++ and Memory $\rightarrow$ Pointers
\item C++ and Memory $\rightarrow$ Memory issues
\item Compile, run directly and run through valgrind and/or ASan
\begin{itemize}
\item \code{non\_owning\_pointer.cpp}
......@@ -1186,8 +1177,11 @@ auto s = std::shared\_ptr<FILE>\{
\begin{frame}{Hands-on}
\begin{itemize}
\item Try the code snippets
\item C++ and Memory $\rightarrow$ Pointers
\item Adapt the previous exercises to use smart pointers
\item C++ and Memory $\rightarrow$ Memory issues
\begin{itemize}
\item Adapt the exercises to use smart pointers
\end{itemize}
\item C++ and Memory $\rightarrow$ Smart pointers
\item Starting from \code{dir.cpp}, write code to:
\begin{itemize}
\item create a smart pointer managing a \code{DIR} resource obtained with
......@@ -1205,7 +1199,7 @@ auto s = std::shared\_ptr<FILE>\{
\section{Move semantics}
\begin{frame}[fragile]{Copy vs move}
\begin{frame}[fragile]{We can do better than copying}
\begin{columns}
\begin{column}{.45\textwidth}
......@@ -1419,7 +1413,7 @@ String \alert<6>{s3}\{\alert<5>{get\_string()}\}\alert<7>{;}}\end{codeblock}
\end{frame}
\begin{frame}[fragile]{Copy vs move \insertcontinuationtext}
\begin{frame}[fragile]{Copy vs move}
\begin{columns}
\begin{column}{.45\textwidth}
......@@ -2261,3 +2255,28 @@ class Thing \{
\end{itemize}
\end{frame}
\begin{frame}{Hands-on}
\begin{itemize}
\item C++ and Memory $\rightarrow$ Contracts
\item Identify
\begin{itemize}
\item the invariant of the String class
\item the pre-conditions and the post-condition of its member functions
(when applicable)
\item other logical checkpoints both at compile time and run time
\end{itemize}
\item Express them with \code{static\_assert}s, \code{assert}s and exceptions,
including \code{noexcept}
\item Hint: imagine to remove the default constructor of \code{String} and see
what the consequences are
\end{itemize}
\end{frame}
\begin{frame}{Hands-on}
\begin{itemize}
\item C++ and Memory $\rightarrow$ Static analysis
\end{itemize}
\end{frame}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment