Loading [MathJax]/extensions/TeX/AMSsymbols.js
DGtal
2.0.0
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
x
Variables
a
b
d
e
f
h
i
l
m
n
o
p
s
t
v
w
x
Typedefs
a
b
c
d
e
i
k
l
n
o
p
r
s
u
v
z
Enumerations
Enumerator
a
b
c
d
e
g
h
i
j
n
o
p
s
t
u
z
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
c
d
e
f
h
l
m
n
o
p
r
s
t
u
Enumerator
a
b
c
d
e
f
g
l
m
o
p
r
s
t
u
v
x
y
z
Related Symbols
a
b
c
d
e
f
g
i
k
l
m
o
p
s
t
u
Examples
DGtal
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
testPartialTemplateSpecialization.cpp
Go to the documentation of this file.
1
16
29
31
#include <iostream>
33
#include <boost/type_traits/is_arithmetic.hpp>
34
#include <boost/type_traits/is_integral.hpp>
35
#include <boost/utility/enable_if.hpp>
36
#include "DGtal/base/Common.h"
37
39
// Functions for testing class cpp11.
41
42
template
<
typename
TC,
typename
TD >
43
class
A
44
{
45
public
:
46
typedef
TC
C
;
47
48
A
(
const
C
& c );
49
};
50
51
template
<
typename
TC,
typename
TD >
52
inline
53
A< TC, TD >::A
(
const
C
& c )
54
{
55
boost::ignore_unused_variable_warning( c );
56
std::cout <<
"Generic"
<< std::endl;
57
}
53
A< TC, TD >::A
(
const
C
& c ) {
…
}
58
59
60
61
template
<
typename
TC >
//int specialization
62
class
B
:
public
A
< TC, int >
63
{
64
public
:
65
typedef
A< TC, int >
Super
;
66
typedef
typename
Super::C
C
;
//Compile en rajoutant cette ligne (et en changeant les appels à Super::C par C)
67
68
B
(
const
C
& c );
69
};
62
class
B
:
public
A
< TC, int > {
…
};
70
71
template
<
typename
TC>
72
inline
73
B<TC>::B
(
const
C
& c) :
Super
(c)
74
{
75
std::cout <<
"Specialized"
<< std::endl;
76
}
73
B<TC>::B
(
const
C
& c) :
Super
(c) {
…
}
77
78
79
80
int
main
(
int
/*argc*/
,
char
**
/*argv*/
)
81
{
82
B<int>
a(1);
83
84
return
0;
85
}
80
int
main
(
int
/*argc*/
,
char
**
/*argv*/
) {
…
}
86
// //
B
Definition
testPartialTemplateSpecialization.cpp:63
B::Super
A< TC, int > Super
Definition
testPartialTemplateSpecialization.cpp:65
B::C
Super::C C
Definition
testPartialTemplateSpecialization.cpp:66
B::B
B(const C &c)
Definition
testPartialTemplateSpecialization.cpp:73
A
Definition
testCountedConstPtrOrConstPtr.cpp:43
A::A
A(const C &c)
Definition
testPartialTemplateSpecialization.cpp:53
A::C
TC C
Definition
testPartialTemplateSpecialization.cpp:46
A::A
A(int _a)
Definition
testCountedConstPtrOrConstPtr.cpp:44
main
int main()
Definition
testBits.cpp:56
tests
base
testPartialTemplateSpecialization.cpp
Generated on
for DGtal by
1.14.0