Template¶
Breathe has support for class and function templates. They are output as follows. For a class with a single template parameter:
.. doxygenclass:: templateclass
:project: template_class
:members:
It renders as:
a class with a template parameter
Public Functions
- Templates
- T -
this is the template parameter
templateclass()default constructor
templateclass(T const & m)constructor with template argument
- Parameters
- m -
the argument
T method(T const & t)member accepting template argument and returning template argument
- Return
- returns value of type T
- Parameters
- t -
argument of type T
With multiple template parameters it renders as:
a class with three template parameters
Public Functions
- Templates
- T -
this is the first template parameter
- U -
this is the second template parameter
- N -
this is the third template parameter, it is a non-type parameter
anothertemplateclass()default constructor
anothertemplateclass(T const & m1, U const & m2)constructor with two template argument
- Parameters
- m1 -
first argument
- m2 -
second argument
U method(T const & t)member accepting template argument and returning template argument
- Return
- returns value of type U
- Parameters
- t -
argument
A function with single template parameter renders as:
a function with one template arguments
- Return
- return value of type T
- Templates
- T -
this is the template parameter
- Parameters
- arg1 -
argument of type T
With multiple template parameters it renders as:
a function with three template arguments
- Return
- return value of type T
- Templates
- T -
this is the first template parameter
- U -
this is the second template parameter
- N -
this is the third template parameter, it is a non-type parameter
- Parameters
- arg1 -
first argument of type T
- arg2 -
second argument of type U