Chapter 33 Flashcards

1
Q

Is it possible that we make a generic template specialize to specifically handle a particular type

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How compiler diagnose types error

A

Compiler do that with static type checking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the difference between overloading and templates

A

Overloading deals with different data types with similar operation. And template deals with different data types with identical operation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is template policy

A

The central idiom in policy-based design is a class template (called the host class), taking several type parameters as input, which are instantiated with types selected by the user (called policy classes), each implementing a particular implicit interface (called a policy)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly