Skip to content

Commit

Permalink
Add box on namespace aliases as suggested by Attila.
Browse files Browse the repository at this point in the history
  • Loading branch information
hageboeck committed Oct 2, 2024
1 parent 7e4c52b commit 48a8bce
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions talk/basicconcepts/scopesnamespaces.tex
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@

\begin{frame}[fragile]
\frametitlecpp[17]{Nested namespaces}
Easier way to declare nested namespaces
\begin{alertblock}{\cpp98}
\begin{alertblock}{\cpp98: Old way to declare nested namespaces}
\begin{cppcode*}{}
namespace A {
namespace B {
Expand All @@ -171,13 +170,18 @@
}
\end{cppcode*}
\end{alertblock}
\begin{exampleblock}{\cpp17}
\begin{exampleblock}{\cpp17: Nested declaration}
\begin{cppcode*}{}
namespace A::B::C {
//...
}
\end{cppcode*}
\end{exampleblock}
\begin{exampleblock}{\cpp17: Namespace alias}
\begin{cppcode*}{}
namespace ABC = A::B::C;
\end{cppcode*}
\end{exampleblock}
\end{frame}

\begin{advanced}
Expand Down

0 comments on commit 48a8bce

Please sign in to comment.