Not knowing what a handle and value difficult to answer your question. I'll try to guess what it is about templates.
We will not dive into the dark world of metaprogramming, we will only look at the tip of the iceberg. Here is a simple example of using a pattern:
template<class T> T summ(const T &x, const T &y){ return x + y; }
If you call a function in code like this:
double x = 1; double y = 2; double z = summ(x, y);
The compiler will see that you should use double as T and create a double summ(const double &x, const double &y) function double summ(const double &x, const double &y) .
Unfortunately, the compiler cannot always understand which type should be used. In such cases, he needs help. To do this, use diamond syntax (diamond syntax). For example:
template<class T> class MyClass{ T _variable; //... }; MyClass<int> myObject; //алмазный синтаксис
If you go back to our first example, you can also write there:
double x = 1; double y = 2; int z = summ<int>(x, y);
I repeat once again, type substitution at compile time is the simplest and most superficial use of templates. The same Alexandrescu in his book is doing up with them that it becomes scary.
min(int,int)- for two integers, the same for twodouble, even for two lines - in a word, for everything that can be compared. And you can write one in which the type itself acts as a variable parameter. This is the function template. There are class templates, etc., but these are details. - Harry