Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
EXTERNAL_HEADERS
RSL
etc
config
src
EXPLICIT_MEMBER_INSTANTIATION.cpp
Go to the documentation of this file.
1
// checking for explicit instantiation of members
2
3
25
template
<
class
T>
26
T
foo
(
T
t
) {
return
t
; }
27
28
template
<
class
T>
29
struct
S
30
{
31
T
bar
()
const
{
32
// explicit instantiation of S<T> (and, consequently,
33
// S<T>::bar()) must "implicitly" instantiate foo<T>(T)
34
return
foo
(
T
());
35
}
36
37
static
void
baz
(
T
t
) {
38
foo
(
t
);
39
}
40
};
41
42
template
int
S<int>::bar
()
const
;
43
template
double
S<double>::bar
()
const
;
44
45
template
void
S<char>::baz
(
char
);
46
template
void
S<unsigned>::baz
(
unsigned
);
T
#define T
Definition
17.names.cpp:163
t
#define t
Definition
17.names.cpp:136
foo
#define foo(buf, s,...)
Definition
VA_LIST_FUNC_MACRO.cpp:28
S
Definition
COLLAPSE_TEMPLATE_STATICS.cpp:40
S::baz
static void baz(T t)
Definition
EXPLICIT_MEMBER_INSTANTIATION.cpp:37
S::bar
T bar() const
Definition
EXPLICIT_MEMBER_INSTANTIATION.cpp:31
Generated by
1.9.8