What is the disadvantage of templates ?

Answers were Sorted based on User's Feedback



What is the disadvantage of templates ?..

Answer / atul jawale

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

What is the disadvantage of templates ?..

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

Post New Answer

More STL Interview Questions

how to overload << and >> operator in c++

3 Answers   Wipro,


sir please send me bpcl previous question papers

0 Answers   BPCL Bharat Petroleum,


if x<>=z then statement end what is the cyclomatic complexity

5 Answers  


Difference between Structure and Class in C++?

5 Answers   Caritor,


how to making game in c++ ?

0 Answers  






Is stl part of c++ standard?

0 Answers  


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

5 Answers   Broadridge,


What is Constructor

14 Answers   Angel Broking,


Distinguish between: a) Normal layout & Print Layout views b) Windows Clipboard & office Clipboard c) Save & Save As Commands d) Program File & Data File e) Pie Charts & Barr Charts

0 Answers  


What is meant by stl in c++?

0 Answers  


What is C++ could you enplane me please?

1 Answers  


Write a program in C++ returning starting locations of a substring using pointers

1 Answers  


Categories