Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
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
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
48int main ()
49{
51
52 return ibd.defined_first (0)
53 + ibd.instantiated_first (0)
55}
T instantiated_before_defined(T t)