Skip to content

Commit d5cb97d

Browse files
Sebastien Poncesponce
authored andcommitted
More links to godbolt, cppinsight and cppreference
1 parent ad18e40 commit d5cb97d

File tree

8 files changed

+24
-24
lines changed

8 files changed

+24
-24
lines changed

talk/concurrency/mutexes.tex

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

33
\begin{frame}[fragile]
44
\frametitlecpp[11]{Races}
5-
\begin{exampleblock}{Example code}
5+
\begin{exampleblock}{Example code \godboltLink{https://godbolt.org/z/oGz61Pn19}}
66
\begin{cppcode*}{}
77
int a = 0;
88
void inc() { a++; };
@@ -98,7 +98,7 @@
9898
\end{description}
9999
\end{block}
100100
\pause
101-
\begin{exampleblock}{Practically}
101+
\begin{exampleblock}{Practically \godboltLink{https://godbolt.org/z/a5TaaPrad}}
102102
\begin{cppcode*}{}
103103
int a = 0;
104104
std::mutex m;

talk/expert/cpp20concepts.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
leading to a substitution failure
2121
\end{itemize}
2222
\end{block}
23-
\begin{exampleblock}{Practical code}
23+
\begin{exampleblock}{Practical code \godboltLink{https://godbolt.org/z/e4T9q1jfh}}
2424
\scriptsize
2525
\begin{cppcode*}{}
2626
template
2727
<typename T,
28-
typename = std::enable_if_t<std::is_floating_point_v<T>>
28+
typename = std::enable_if_t<std::is_floating_point_v<T>>>
2929
bool equal( T e1, T e2 ) {
3030
return std::abs(e1-e2)<std::numeric_limits<T>::epsilon();
3131
}
@@ -56,7 +56,7 @@
5656
\item The keyword \mintinline{cpp}{requires} lets us define various constraints.
5757
\end{itemize}
5858
\end{block}
59-
\begin{exampleblock}{With concepts}
59+
\begin{exampleblock}{With concepts \godboltLink{https://godbolt.org/z/dWvM9Pvee}}
6060
\scriptsize
6161
\begin{cppcode*}{}
6262
template<typename T>

talk/expert/cpp20spaceship.tex

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

4747
\begin{frame}[fragile]
4848
\frametitlecpp[20]{The three-way comparison operator practically}
49-
\begin{exampleblock}{}
49+
\begin{exampleblock}{Output of \texttt{operator<=>} - \godboltLink{https://godbolt.org/z/o6Er1zjrf}}
5050
\begin{cppcode*}{}
5151
template <typename T>
5252
void three_way_compare( T lhs, T rhs ) {
@@ -92,7 +92,7 @@
9292
\begin{frame}[fragile]
9393
\frametitlecpp[20]{Exercising different orderings}
9494
\scriptsize
95-
\begin{exampleblock}{Example}
95+
\begin{exampleblock}{Example \godboltLink{https://godbolt.org/z/s8Gdae4bW}}
9696
\begin{cppcode*}{}
9797
struct Ratio {
9898
unsigned n, d ;

talk/expert/sfinae.tex

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

129129
\begin{frame}[fragile]
130130
\frametitlecpp[11]{Not so easy actually...}
131-
\begin{exampleblock}{Example}
131+
\begin{exampleblock}{Example \godboltLink{https://godbolt.org/z/Y9Ys4hvWq}}
132132
\small
133133
\begin{cppcode*}{}
134134
template <typename T, typename = void>
@@ -168,7 +168,7 @@
168168

169169
\begin{frame}[fragile]
170170
\frametitlecpp[17]{Previous introspection example using \texttt{void\_t}}
171-
\begin{exampleblock}{Example}
171+
\begin{exampleblock}{Example \godboltLink{https://godbolt.org/z/hfMxndP1x}}
172172
\begin{cppcode*}{}
173173
template <typename T, typename = void>
174174
struct hasFoo : std::false_type {};
@@ -212,7 +212,7 @@
212212

213213
\begin{frame}[fragile]
214214
\frametitle{SFINAE and the STL \hfill \cpp11/\cpp14}
215-
\begin{block}{\texttt{enable\_if}}
215+
\begin{block}{\texttt{enable\_if} \cpprefLink{https://en.cppreference.com/w/cpp/types/enable_if}}
216216
\begin{cppcode*}{linenos=false}
217217
template<bool B, typename T=void>
218218
struct enable_if;

talk/morelanguage/lambda.tex

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

245245
\begin{frame}[fragile]
246246
\frametitlecpp[11]{Anatomy of a lambda}
247-
\begin{block}{Lambdas are pure syntactic sugar - \href{https://cppinsights.io/lnk?code=aW50IG1haW4oKSB7CiAgaW50IHN1bSA9IDAsIG9mZnNldCA9IDE7CiAgYXV0byBsID0gWyZzdW0sIG9mZnNldF0oaW50IHgpIHsKICAgIHN1bSArPSB4ICsgb2Zmc2V0OwogIH07Cn0=&insightsOptions=cpp17&std=cpp17&rev=1.0}{{\color{blue!50!white} see cppinsights.io}}}
247+
\begin{block}{Lambdas are pure syntactic sugar - \cppinsightLink{https://cppinsights.io/s/67800da8}}
248248
\begin{itemize}
249249
\item they are replaced by a functor during compilation
250250
\end{itemize}
@@ -293,7 +293,7 @@
293293
\end{frame}
294294

295295
\begin{frame}[fragile]
296-
\frametitlecpp[11]{Higher-order lambdas}
296+
\frametitlecpp[11]{Higher-order lambdas \godboltLink{https://godbolt.org/z/GMj76Wer7}}
297297
\begin{exampleblock}{Example}
298298
\begin{cppcode*}{}
299299
auto build_incrementer = [](int inc) {

talk/morelanguage/morestl.tex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
\subsection[More]{More STL}
22

33
\begin{frame}[fragile]
4-
\frametitlecpp[17]{\texttt{std::string\_view}}
4+
\frametitlecpp[17]{\texttt{std::string\_view} \cpprefLink{https://en.cppreference.com/w/cpp/string/basic_string_view}}
55
\begin{block}{Non owning read-only view of a contiguous char sequence}
66
\begin{itemize}
77
\item Doesn't allocate memory
@@ -23,7 +23,7 @@
2323
\end{frame}
2424

2525
\begin{frame}[fragile]
26-
\frametitlecpp[20]{\texttt{std::span<T>} - Concept}
26+
\frametitlecpp[20]{\texttt{std::span<T>} - Concept \cpprefLink{https://en.cppreference.com/w/cpp/container/span}}
2727
\begin{block}{Non owning view of a contiguous sequence of items}
2828
\begin{itemize}
2929
\item Doesn't allocate memory
@@ -85,7 +85,7 @@
8585
\end{frame}
8686

8787
\begin{frame}[fragile]
88-
\frametitlecpp[17]{std::optional}
88+
\frametitlecpp[17]{std::optional \cpprefLink{https://en.cppreference.com/w/cpp/utility/optional}}
8989
\begin{block}{Manages an optionally contained value}
9090
\begin{itemize}
9191
\item Contextually converts to bool, telling if it contains something
@@ -148,7 +148,7 @@
148148
\end{frame}
149149

150150
\begin{frame}[fragile]
151-
\frametitlecpp[17]{std::variant}
151+
\frametitlecpp[17]{std::variant \cpprefLink{https://en.cppreference.com/w/cpp/utility/variant}}
152152
\begin{block}{A type-safe union}
153153
\begin{itemize}
154154
\item Allows the variable to hold any of the given types
@@ -176,7 +176,7 @@
176176

177177
\begin{frame}[fragile]
178178
\frametitlecpp[17]{std::variant and the visitor pattern}
179-
\begin{block}{\texttt{std::visit}}
179+
\begin{block}{\texttt{std::visit} \cpprefLink{https://en.cppreference.com/w/cpp/utility/variant/visit}}
180180
\begin{itemize}
181181
\item Applies a ``visitor'' to a given variant
182182
\begin{itemize}
@@ -185,7 +185,7 @@
185185
\end{itemize}
186186
\end{itemize}
187187
\end{block}
188-
\begin{exampleblock}{Practically}
188+
\begin{exampleblock}{Practically \godboltLink{https://godbolt.org/z/bxzEsM3de}}
189189
\small
190190
\begin{cppcode*}{gobble=2}
191191
struct Visitor {
@@ -210,7 +210,7 @@
210210
\item use inheritance to group a set of lambdas
211211
\end{itemize}
212212
\end{exampleblock}
213-
\begin{block}{Practically}
213+
\begin{block}{Practically \godboltLink{https://godbolt.org/z/WcdnT1hra}}
214214
\small
215215
\begin{cppcode*}{gobble=2}
216216
template<typename... Ts> // covered in expert part
@@ -242,7 +242,7 @@
242242
\end{frame}
243243

244244
\begin{frame}[fragile]
245-
\frametitlecpp[17]{std::any}
245+
\frametitlecpp[17]{std::any \cpprefLink{https://en.cppreference.com/w/cpp/utility/any}}
246246
\begin{block}{a type-safe container for single values of any type}
247247
\begin{itemize}
248248
\item Allows a variable to hold any type (say bye to \mintinline{cpp}{void*})
@@ -296,7 +296,7 @@
296296
\end{frame}
297297

298298
\begin{frame}[fragile]
299-
\frametitlecpp[11]{\texttt{std::tuple}}
299+
\frametitlecpp[11]{\texttt{std::tuple} \cpprefLink{https://en.cppreference.com/w/cpp/utility/tuple}}
300300
\begin{exampleblock}{}
301301
\begin{cppcode*}{}
302302
#include <tuple>

talk/morelanguage/raii.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
What do you expect ?
160160
\end{exampleblock}
161161
\pause
162-
\begin{alertblock}{Compilation Error}
162+
\begin{alertblock}{Compilation Error \godboltLink{https://godbolt.org/z/jfqKjocnh}}
163163
\begin{minted}{text}
164164
test.cpp:15:5: error: call to deleted constructor
165165
of 'std::unique_ptr<Foo>'

talk/morelanguage/ranges.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
\item They introduce easy functional programming to the STL
3131
\end{itemize}
3232
\end{block}
33-
\begin{exampleblock}{Example}
33+
\begin{exampleblock}{Example \godboltLink{https://godbolt.org/z/d1vTv4TMa}}
3434
{ \small
3535
\begin{cppcode*}{gobble=4}
3636
auto const numbers = std::views::iota(0, 6);
@@ -71,7 +71,7 @@
7171
\item Here, the minimal number of iterations is performed
7272
\end{itemize}
7373
\end{block}
74-
\begin{exampleblock}{Example}
74+
\begin{exampleblock}{Example \godboltLink{https://godbolt.org/z/bWe6W69oE}}
7575
\begin{cppcode*}{gobble=2}
7676
// print first 20 prime numbers above 1000000
7777
for (int i: std::views::iota(1000000)

0 commit comments

Comments
 (0)