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 |
what is strcture i++ i ++i answer to this i=5 what is the out put
what is a template?
2 Answers Amazon, BITS, IBS, Wipro,
In what cases using of a 'template' is a better approach then using of a 'base class'?
6 Answers Lucent, Mind Tree, Wipro,
What is C++ could you enplane me please?
what's the difference between abstract class and concreate class? what's the meaning of standard template library(STL)?
How to write a function that goes through an array of characters and eliminates any elements that are not letters (Legal letters can be either in an uppercase or a lowercase format.) The function removeNonLetters should return the new effective size of the array as the result.
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
Is stl part of c++ standard?
why we are using the fork command?.. how it works?
why & sign is used in copy constructor
What does stl mean in slang?
what is c++