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_INSTANTIATION.cpp
Go to the documentation of this file.
1
// checking for explicit instantiation
2
3
25
// IMPLICIT_INSTANTIATION.cpp depends on foo<T>(T)
26
template
<
class
T>
27
T
foo
(
T
t
) {
return
t
; }
28
29
template
<
class
T>
30
struct
S
31
{
32
T
bar
() {
33
// explicit instantiation of S<T> (and, consequently,
34
// S<T>::bar()) must "implicitly" instantiate foo<T>(T)
35
return
foo
(
T
());
36
}
37
};
38
39
// the symbols expected to be produced by the explicit instantiation
40
// directives and their attributes are as follows:
41
// TEXT S<int>::bar()
42
// WEAK (or TEXT) foo<int>(int)
43
// TEXT S<char>::bar()
44
// WEAK (or TEXT) foo<char>(char)
45
46
// IMPLICIT_INSTANTIATION.cpp uses foo<int>(int)
47
template
class
S<int>
;
48
template
class
S<char>
;
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::bar
T bar()
Definition
EXPLICIT_INSTANTIATION.cpp:32
Generated by
1.9.8