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
extern_function_template_imp.h
Go to the documentation of this file.
1
2
24
// avoid including <config.h> here to avoid inadvertently
25
// trying to introduce dependencies on other config tests
26
// that the config infrastructure won't know about (since
27
// it only searches .cpp files for them)
28
// #include <config.h>
29
30
#if __GNUG__ >= 3
31
// disable gcc 3.x (and beyond) error: ISO C++ forbids the use
32
// of `extern' on explicit instantiations
33
# pragma GCC system_header
34
#endif
// gcc >= 3
35
36
37
template
<
class
T>
38
struct
S
39
{
40
T
t
;
41
};
42
43
template
<
class
T>
44
S<T>
foobar
(
S<T>
s
)
45
{
46
#if defined (INSTANTIATE)
47
s
.
t
= 1;
48
#else
// if !defined (INSTANTIATE)
49
s
.t = -1;
50
#endif
// INSTANTIATE
51
52
return
s
;
53
}
54
55
#if defined (INSTANTIATE)
56
57
template
S<int>
foobar
(
S<int>
);
58
59
#else
// if !defined (INSTANTIATE)
60
61
extern
template
S<int>
foobar
(
S<int>
);
62
63
#endif
// INSTANTIATE
T
#define T
Definition
17.names.cpp:163
t
#define t
Definition
17.names.cpp:136
s
#define s
Definition
rw_alg_test.h:221
foobar
void foobar()
Definition
EXCEPTION_SPECIFICATION.cpp:60
S
Definition
COLLAPSE_TEMPLATE_STATICS.cpp:40
S::t
static T t
Definition
COLLAPSE_TEMPLATE_STATICS.cpp:42
Generated by
1.9.8