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
OVERLOAD_OF_TEMPLATE_FUNCTION.cpp
Go to the documentation of this file.
1
// checking complicated partial ordering
2
3
26
template
<
class
T,
class
U>
27
class
S
{ };
28
29
template
<
class
T,
class
U>
30
S<T, U>
&
operator<<
(
S<T, U>
&
s
,
T
)
31
{
32
return
s
;
33
}
34
35
template
<
class
T,
class
U>
36
S<T, U>
&
operator<<
(
S<T, U>
&
s
,
char
)
37
{
38
return
s
;
39
}
40
41
template
<
class
U>
42
S<char, U>
&
operator<<
(
S<char, U>
&
s
,
char
)
43
{
44
return
s
;
45
}
46
47
template
<
class
U>
48
S<int, U>
&
operator<<
(
S<int, U>
&
s
,
int
)
49
{
50
return
s
;
51
}
52
53
void
foo
()
54
{
55
S<char, int>
sci;
56
S<int, int>
sii;
57
58
sci <<
'a'
;
59
sii << 1;
60
}
T
#define T
Definition
17.names.cpp:163
s
#define s
Definition
rw_alg_test.h:221
operator<<
S< T, U > & operator<<(S< T, U > &s, T)
Definition
OVERLOAD_OF_TEMPLATE_FUNCTION.cpp:30
foo
void foo()
Definition
OVERLOAD_OF_TEMPLATE_FUNCTION.cpp:53
S
Definition
COLLAPSE_TEMPLATE_STATICS.cpp:40
Generated by
1.9.8