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
FUNC_PARTIAL_SPEC.cpp
Go to the documentation of this file.
1
// checking function template overload
2
3
25
template
<
class
T,
class
U>
26
struct
A
{ };
27
28
template
<
class
T,
class
U>
29
int
foo
(
A<T, U>
,
T
)
30
{
31
return
0;
32
}
33
34
template
<
class
T,
class
U>
35
int
foo
(
A<T, U>
,
char
)
36
{
37
return
1;
38
}
39
40
template
<
class
U>
41
int
foo
(
A<char, U>
,
char
)
42
{
43
return
2;
44
}
45
46
int
main
()
47
{
48
A<double, double>
add;
49
A<char, double>
acd;
50
51
return
!(0 ==
foo
(add, 0.0) && 1 ==
foo
(add,
'a'
) && 2 ==
foo
(acd,
'a'
));
52
}
T
#define T
Definition
17.names.cpp:163
main
int main()
Definition
FUNC_PARTIAL_SPEC.cpp:46
foo
#define foo(buf, s,...)
Definition
VA_LIST_FUNC_MACRO.cpp:28
A
Definition
NAMESPACE.cpp:25
A
Definition
DEFAULT_TEMPLATE_ARGS.cpp:26
Generated by
1.9.8