C++ Programming Guide

Function Template Use

Once declared, templates can be used like any other function. Their use consists of naming the template and providing function arguments. The compiler infers the template type arguments from the function argument types. For example, you can use the previously declared template as follows.


double twicedouble( double item )
    { return twice( item ); }