Hey there, Welcome to a guide on C++ templates! 🎉 In this article, we will explore the ins and outs of using C++ templates and delve into the reaso...
For further actions, you may consider blocking this person and/or reporting abuse
This is true. People may confuse with the real performance issue with templates: they templates may incur compile time overhead (as each template instantiation must be compiled) and code size bloat (as each template instantiation must be stored).
Templates are a very powerful tool, but beginner (and intermediate too) developers must remember that they are just a tool. Templates are not hammers and all problems are not nails. I can recall when I was a young C++ learner, I wanted to use templates so I was looking for places to do so. Don't do that XD
Yeah , I personally just use templates when I don't have to repeat the logic but still need the flexibility they provide.