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_BEFORE_DEFINITION.cpp
Go to the documentation of this file.
1
// checking for instantiation before definition
2
3
25
#include "config.h"
26
27
#ifdef _RWSTD_NO_IMPLICIT_INCLUSION
28
// tell "instantiation_before_definition.h" to #include its
29
// implementation file, instantiation_before_definition.cc
30
# define INCLUDE_CC_FILE
31
#endif
// _RWSTD_NO_IMPLICIT_INCLUSION
32
33
#ifdef _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
34
// tell "instantiation_before_definition.h" to use explicit
35
// function template specialization instead of the extern
36
// template extension
37
# define SPECIALIZE_FUNCTION_TEMPLATE
38
#endif
// _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
39
40
#define INSTANTIATE_TEMPLATE
41
#include "
instantiation_before_definition.h
"
42
43
// test exercises the ability to explicitly instantiate a template
44
// lexically before the definition of the template (exercises, for
45
// example, IBM VAC++ 7.0 bug #448:
46
// http://iwww.cvo.roguewave.com/bugzilla/show_bug.cgi?id=448)
47
48
int
main
()
49
{
50
InstantiatedBeforeDefined<int>
ibd;
51
52
return
ibd.
defined_first
(0)
53
+ ibd.
instantiated_first
(0)
54
+
instantiated_before_defined
(0);
55
}
main
int main()
Definition
EXPLICIT_INSTANTIATION_BEFORE_DEFINITION.cpp:48
instantiated_before_defined
T instantiated_before_defined(T t)
Definition
instantiation_before_definition.cc:26
instantiation_before_definition.h
InstantiatedBeforeDefined
Definition
instantiation_before_definition.h:37
InstantiatedBeforeDefined::instantiated_first
T instantiated_first(T)
Definition
instantiation_before_definition.cc:34
InstantiatedBeforeDefined::defined_first
T defined_first(T t)
Definition
instantiation_before_definition.h:38
Generated by
1.9.8