Skip to content

Commit 4e1f6a6

Browse files
committed
Add an example
1 parent c6751dd commit 4e1f6a6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

source/templates.tex

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,20 @@
151151
so all specializations of a template belong to the same scope as it does.
152152
\end{note}
153153

154+
\begin{example}
155+
\begin{codeblock}
156+
void f();
157+
class f; // OK
158+
namespace N {
159+
void f(int);
160+
}
161+
using N::f; // OK
162+
template<typename> void f(long); // OK
163+
template<typename> void f(long long); // OK
164+
template<> void f<int>(long long); // OK, doesn't bind a name
165+
\end{codeblock}
166+
\end{example}
167+
154168
\pnum
155169
\indextext{entity!templated}%
156170
An entity is \defn{templated}

0 commit comments

Comments
 (0)