What is the disadvantage of templates ?
Answers were Sorted based on User's Feedback
Disadvantages of templates:
1. Many compilers historically have very poor support for
templates, so the use of templates can make code somewhat
less portable.
2. Almost all compilers produce confusing, unhelpful error
messages when errors are detected in template code. This
can make templates difficult to develop.
3. Each use of a template may cause the compiler to
generate extra code (an instantiation of the template), so
the indiscriminate use of templates can lead to code bloat,
resulting in excessively large executables.
| Is This Answer Correct ? | 40 Yes | 7 No |
Answer / ranjit
one disadvantage is non-standards conforming compilers.
templates can also sometimes make maintaining code harder
and less clear, although the exact opposite can be said as
well.
Templates aren't *inherently* code bloating.
| Is This Answer Correct ? | 14 Yes | 15 No |
how to swap two numbers in a linked list without exchanging the data but only the links?
draw a flowchart that accepts two numbers and checks if the first is divisible by the second.
what's the difference between abstract class and concreate class? what's the meaning of standard template library(STL)?
What are the various types of stl containers?
write a piece of c++ code which allocate memory to the 50 object of type CObj
What is stl stack?
What are the components of stl?
help me i need a c++ program which takes sequesnce of characters and outputed sequence of their token taypes, work same compiler in lexical analysis phase
How can you create a bulleted list, numbered list and an outline by using bullets and numbering command. Explain with the help of example.
what are you now programming Languages C+
give me the defination of inheritance?
what is template and type convertion