mrdocs::toString

toString overloads

Synopses

Convert an auto‐kind to its spelling.

constexpr
std::string_view
toString(AutoKind kind) noexcept;

Convert a FundamentalTypeKind to a string.

std::string_view
toString(FundamentalTypeKind kind) noexcept;

Return the operator's written spelling ("+", "[]", "new", ...).

std::string_view
toString(OperatorKind kind) noexcept;

Convert a cv qualifier kind to its string form.

constexpr
std::string_view
toString(QualifierKind kind) noexcept;

Return the written ref‐qualifier syntax (&, &&, or empty).

constexpr
std::string_view
toString(ReferenceKind kind) noexcept;

Convert a TypeKind to its string representation.

std::string_view
toString(TypeKind kind) noexcept;

Convert the name to a human‐readable string.

std::string
toString(Name const& N);

Convert a template argument to a human‐readable string.

std::string
toString(TArg const& arg) noexcept;

Convert a described enumerator to its kebab‐case string form.

template<class E>
requires describe::has_describe_enumerators<E>::value
constexpr
std::string_view
toString(E e) noexcept;

Render a type to a human‐readable string.

std::string
toString(
    Type const& T,
    std::string_view Name = "");

Convert ExplicitInfo to a string.

std::string
toString(
    ExplicitInfo const& info,
    bool resolved = false,
    bool implicit = false);

Convert NoexceptInfo to a string.

std::string
toString(
    NoexceptInfo const& info,
    bool resolved = false,
    bool implicit = false);

Return Value

  • String naming the keyword.

  • The string representation of the kind

  • The operator spelling, empty for OperatorKind::None.

  • The written qualifier syntax; empty for QualifierKind::None.

  • The ref‐qualifier spelling; empty for ReferenceKind::None.

  • The kind's string representation.

  • The textual form of the name.

  • Descriptive text for the argument.

  • A view over static storage holding the enumerator's kebab‐case name.

  • Text representation of the type.

  • The string representation of the explicit‐specifier.

  • The string representation of the noexcept‐specifier.

Parameters

Name

Description

kind

The auto kind.

e

The enumerator to convert.

T

Type to render.

Name

Optional identifier to append.

info

The explicit‐specifier information.

resolved

If true, the operand is not shown when the explicit‐specifier is non‐dependent.

implicit

If true, implicit explicit‐specifiers are shown.

Created with MrDocs