What is Template Specialization?



What is Template Specialization?..

Answer / bob

there are partial and full specializations for template
class, and only full partial specialization for template
function.

template <class T, size_t size>
class Object {};

full specialization:
template <> class Object<int, 10> {};

partial specialization:
template <size_t size> class Object<char, size> {};

Function specialization:
template <typename T>
void reserve(T begin, T end)

Specialization:
void reserver(char *begin, char *end) //actually overload
function

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More STL Interview Questions

write a piece of c++ code which allocate memory to the 50 object of type CObj

2 Answers  


What is stl language?

0 Answers  


Define stl.

0 Answers  


Write a program to print the swapping in two no and using three variable.

5 Answers   Broadridge,


How is stl different from c++ standard library?

0 Answers  






Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

0 Answers  


what is the acronym of the term 'C.O.M.P.U.T.E.R' ?

17 Answers   Config Systems, Google, Wipro,


How do you convert stl to steps?

0 Answers  


wap in c++ which accept a integer array and its size as argument and replaces element having even values with its half and element having odd values with twice its value

1 Answers  


How Find, Replace and Go To commands ca be used to substitute one character string for another? Explain with the heIp of an example.

1 Answers  


What is a standard template library (stl)?

0 Answers  


HOW TO GET "H1B" -VISA 4 USA FOR MY SON?HE HAD COMPLETED "MS"(IT)FROM AUSTALIA 2007.I AM WORKING IN U.S.A.

0 Answers  


Categories