Chapter 37 Flashcards

1
Q

What is resolution order of compiler for templates

A
  • first compiler search for complete specialization
  • If it fails then it try to search partial specialization
  • In the end it searches for general templates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is resolution order of compiler for template functions

A
  • Ordinary function
  • Complete specialization
  • Partial specialization
  • Generic template
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Is template compatible with inheritance

A

Yes

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

What is the basic rule to work on templates in inheritance

A

The derived class must take at least as many template parameter as required in base class.

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

Can class template inherit another class template

A

Yes

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

Can we get complete specialization or ordinary class inherited from template class

A

No

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

Can we get complete specialization or ordinary class from partial specialization

A

No

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