![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <template_declaration.h>
Public Member Functions | |
| std::size_t | visibleParameterCount () const |
| Returns the number of template parameters that are visible in rendered output — SFINAE-annotated parameters are excluded. | |
| std::string | to_std_string_for_rendering () const |
| Returns a string representation that excludes SFINAE-annotated parameters. | |
| QString | to_qstring () const |
| QString | to_qstring_multiline () const |
| QSet< QString > | parameterNames () const |
| Returns the set of all declared template parameter names. | |
| QSet< QString > | requiredParameterNamesForFunctions () const |
| Returns the set of template parameter names that are API-significant and should be documented for functions. | |
| Public Member Functions inherited from TemplateDeclarationStorage | |
| std::string | to_std_string () const |
Public Attributes | |
| std::optional< std::string > | requires_clause |
| Public Attributes inherited from TemplateDeclarationStorage | |
| std::vector< RelaxedTemplateParameter > | parameters |
Definition at line 445 of file template_declaration.h.
Returns the set of all declared template parameter names.
This extracts the name from each template parameter's valued_declaration. Parameters without names (such as unnamed template parameters) are not included in the returned set.
This is useful for documentation validation, allowing QDoc to verify that template parameters can be referenced using the \a command.
Definition at line 561 of file template_declaration.h.
|
inlinenodiscard |
Returns the set of template parameter names that are API-significant and should be documented for functions.
This includes only non-type template parameters (such as {int Size}) and template-template parameters, which carry meaning that isn't implied by function parameter types.
Type template parameters (such as {typename T}) are excluded because they typically serve to type function parameters, and documenting the function parameter implicitly covers the template parameter's role.
For class template parameters, use parameterNames() instead, as all template parameters are part of the class's primary API surface.
Definition at line 586 of file template_declaration.h.
|
inline |
Definition at line 487 of file template_declaration.h.
References to_std_string_for_rendering().
|
inline |
Definition at line 515 of file template_declaration.h.
|
inlinenodiscard |
Returns a string representation that excludes SFINAE-annotated parameters.
Used by to_qstring() and to_qstring_multiline() so that the rendered signature shows a clean requires clause.
The inherited to_std_string() retains all parameters (including SFINAE ones) for internal matching where parameter counts must agree between code-parsed and \fn-parsed declarations.
Definition at line 470 of file template_declaration.h.
Referenced by to_qstring().
|
inlinenodiscard |
Returns the number of template parameters that are visible in rendered output — SFINAE-annotated parameters are excluded.
Definition at line 453 of file template_declaration.h.
| std::optional<std::string> RelaxedTemplateDeclaration::requires_clause |
Definition at line 447 of file template_declaration.h.