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_CONST_MEMBER_EXPR_CONST.cpp
Go to the documentation of this file.
1
// checking for type-dependent constant expressions
2
3
25
#include "config.h"
26
27
struct
A
{
typedef
int
I
; };
28
29
template
<
class
T>
30
struct
B
31
{
32
typedef
int
I
;
33
typedef
typename
T::I
J
;
34
35
static
const
I
i
= 0;
36
static
const
J
j
= 1;
37
};
38
39
template
<
class
T>
40
const
typename
B<T>::I
B<T>::i
;
41
42
template
<
class
T>
43
const
typename
B<T>::J
B<T>::j
;
44
45
template
<
class
T>
46
int
foo
(
T
)
47
{
48
enum
{
i
=
B<T>::i
};
49
enum
{
j
=
B<T>::j
};
50
51
return
i
+
j
;
52
}
53
54
int
bar
()
55
{
56
return
foo
(
A
());
57
}
i
#define i
Definition
17.names.cpp:126
T
#define T
Definition
17.names.cpp:163
j
#define j
Definition
17.names.cpp:127
bar
int bar()
Definition
STATIC_CONST_MEMBER_EXPR_CONST.cpp:54
foo
#define foo(buf, s,...)
Definition
VA_LIST_FUNC_MACRO.cpp:28
A
Definition
NAMESPACE.cpp:25
B
Definition
NAMESPACE.cpp:31
A::I
int I
Definition
STATIC_CONST_MEMBER_EXPR_CONST.cpp:27
B
Definition
DEFAULT_TEMPLATE_ARGS.cpp:29
B::I
int I
Definition
STATIC_CONST_MEMBER_EXPR_CONST.cpp:32
B::J
T::I J
Definition
STATIC_CONST_MEMBER_EXPR_CONST.cpp:33
I
Definition
20.meta.unary.nothrow.cpp:274
J
Definition
20.meta.unary.nothrow.cpp:320
Generated by
1.9.8