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_TEMPLATE_BEFORE_DEFINITION.cpp
Go to the documentation of this file.
1
// checking for extern template before definition
2
3
25
#include "config.h"
26
27
#ifndef _RWSTD_NO_extern_template_before_definition_imp
28
// establish a dependency on the source file to get it
29
// compiled first and link with the object file
30
// LDOPTS = extern_template_before_definition_imp.o
31
#endif
32
33
#ifdef _RWSTD_NO_IMPLICIT_INCLUSION
34
// tell "instantiation_before_definition.h" to #include its
35
// implementation file, instantiation_before_definition.cc
36
# define INCLUDE_CC_FILE
37
#endif
// _RWSTD_NO_IMPLICIT_INCLUSION
38
39
#ifdef _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
40
// tell "instantiation_before_definition.h" to use explicit
41
// function template specialization instead of the extern
42
// template extension
43
# define SPECIALIZE_FUNCTION_TEMPLATE
44
#endif
// _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
45
46
#define EXTERN_TEMPLATE
47
#include "
instantiation_before_definition.h
"
48
49
// test exercises the ability to declare an explicit instantiation
50
// of a template using the "extern template" syntax and lexically
51
// before the definition of the template (exercises, for example,
52
// gcc 4.0.2 bug #24511:
53
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24511)
54
55
int
main
()
56
{
57
InstantiatedBeforeDefined<int>
ibd;
58
59
return
ibd.
defined_first
(0)
60
+ ibd.
instantiated_first
(0)
61
+
instantiated_before_defined
(0);
62
}
main
int main()
Definition
EXTERN_TEMPLATE_BEFORE_DEFINITION.cpp:55
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