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.cpp
Go to the documentation of this file.
1
// checking for extern function template extension
2
3
25
// include a file containing the definition of a template
26
// and an extern template directive referencing an explicit
27
// instantiation of the same template in extern_function_template_imp.o
28
29
#include "
extern_function_template_imp.h
"
30
31
// establish a dependency on extern_function_template_imp.o to make sure
32
// the extern_function_template_imp.cpp is compiled before this file
33
#ifndef _RWSTD_NO_extern_function_template_imp
34
35
// link with the object file below
36
// LDOPTS = extern_function_template_imp.o
37
38
#endif
// _RWSTD_NO_extern_function_template_imp
39
40
int
main
()
41
{
42
S<int>
s
;
43
44
int
res
= 0;
45
46
// verify that the call compiles and links
47
res
+=
foobar
(
s
).
t
;
48
49
// verify that the call resolves to the definition emitted
50
// by the explicit instantiation in extern_function_template_imp.o
51
// and not the one here
52
return
!(1 ==
res
);
53
}
res
#define res
Definition
17.names.cpp:531
s
#define s
Definition
rw_alg_test.h:221
foobar
void foobar()
Definition
EXCEPTION_SPECIFICATION.cpp:60
main
int main()
Definition
EXTERN_FUNCTION_TEMPLATE.cpp:40
extern_function_template_imp.h
S
Definition
COLLAPSE_TEMPLATE_STATICS.cpp:40
S::t
static T t
Definition
COLLAPSE_TEMPLATE_STATICS.cpp:42
Generated by
1.9.8