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
STATIC_TEMPLATE_MEMBER_INIT.cpp
Go to the documentation of this file.
1
// checking initialization of static template data memebers
2
3
25
template
<
class
T>
26
struct
S
27
{
28
static
T
a
;
29
static
T
b
;
30
};
31
32
template
<
class
T>
33
T
S<T>::a
;
// <-- NOT initialized
34
35
template
<
class
T>
36
T
S<T>::b
= 0;
// <-- explicitly initialized
37
38
int
main
()
39
{
40
// g++ on DEC OSF and IBM AIX fails to link
41
return
S<char>::a
+
S<char>::b
;
42
}
T
#define T
Definition
17.names.cpp:163
main
int main()
Definition
STATIC_TEMPLATE_MEMBER_INIT.cpp:38
S
Definition
COLLAPSE_TEMPLATE_STATICS.cpp:40
S::b
static T b
Definition
STATIC_TEMPLATE_MEMBER_INIT.cpp:29
S::a
static T a
Definition
STATIC_TEMPLATE_MEMBER_INIT.cpp:28
Generated by
1.9.8