Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Everyone,

Recently, I went through template concept of C++. Learnt below mentioned topics
A) Basics of template and its use.
B) Template function and class
C) How to define member function which uses template versus Inline template function.
D) Template specialization
F) Non-type parameters for templates

I refered below link..
http://www.cplusplus.com/doc/tutorial/templates/

Questions:
1- What else I should learn in template? Is there any other important topic?
2- Any better link or reference?



Regards,
Joy
Posted
Comments
chandanadhikari 28-Oct-13 7:14am    
hi, hope you are already doing it but if not then do some programming to test your understanding instead of just reading through and knowing the concepts theoretically.

1 solution

You didn't specifically mention whether this was covered, but beyond (full) Template Specialization you should also learn to use Partial Template Specialization.

There is a recent article on Template Metaprogramming Programming[^] which heavily uses partial specialization. It is probably difficult to understand for someone new to C++ Templates, but it provides great and useful examples that you can experiment with.

The new C++ 11 standard introduced new template features, e. g. variadic templates[^]. Additionally, the STL got some new functionality in C++ 11, e. g. std::result_of[^], which helps you determine the result type of an operation inside a template function or templated class.

Something else to check would be specifics on your IDEs support of templates: e. g. I know that VisualStudio 2010 doesn't support some legal template syntax expressions (I specifically had some trouble with forward declarations of template member functions). And of course VS and other IDEs don't usually support all the newest features of the most recent standard. For VS you can check on C++11 support on their site[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900