Commands Reference

This page lists every doc-comment command MrDocs understands, grouped by category. See Documenting the Code for an introduction.

Notation

The Syntaxes listed for each command use these conventions:

<arg>

A required argument.

[arg]

An optional argument.

{ arg }

A Paragraph argument: free-form text that runs until a blank line or the next command.

a / b

A paired command with an opening (a) and closing (b) form.

...

A multi-line body (for example, the contents of a code or math block).

Parameter Types

Every command argument has a type that determines how MrDocs parses it. When a type is itself a documentation node it links to that node’s command; the remaining types are described here.

Paragraph

Free-form text that runs until a blank line or the next command. It may contain inline markup and references, but the command itself does nothing special with it.

Text

A span of inline text on the command’s line, with no block structure.

Symbol

The name of a C++ entity (a parameter, type, or symbol). MrDocs resolves and links it where it can.

Direction

One of in, out, or in,out.

Language

A fenced-code language tag, such as cpp.

Path

A file path or URL.

Math

A LaTeX math expression.

Code

Verbatim source lines, reproduced without markup processing.

Markup Blocks

Paragraph

Syntaxes:

  • plain prose

  • @details { text }

A paragraph is the most basic block structure in a doc comment. Any plain text that is not part of another command is treated as a paragraph. Consecutive lines of text are merged into a single paragraph; a blank line starts a new one.

The @details command is an explicit way to begin the detailed description section, but in practice you rarely need it — any text after the brief summary is already treated as detail paragraphs.

Type Parameter Description

Paragraph

text

The paragraph body. Plain prose is detected automatically; @details begins the detailed-description section explicitly.

Example
/** Computes the absolute value of an integer.

    Returns the input unchanged when non-negative,
    otherwise returns its negation.
 */
int absolute(int x);
Preview
absolute

Computes the absolute value of an integer.

Synopsis

Declared in <paragraph.cpp>

int
absolute(int x);
Description

Returns the input unchanged when non‐negative, otherwise returns its negation.

See also: Heading

Heading

Syntax: @par [title] { content }

The @par command creates a named heading (subsection) inside a doc comment. The text on the same line as @par becomes the heading title; subsequent lines form the body of that section.

Type Parameter Description

Text

title

The heading text, on the same line as @par. If omitted, no heading is emitted.

Paragraph

content

The section body, on the lines after @par.

Example
/** A configuration record.

    @par Thread safety
    Instances are immutable after construction
    and may be shared across threads without locking.
 */
struct config { };
Preview
config

A configuration record.

Synopsis

Declared in <heading.cpp>

struct config;
Thread safety

Instances are immutable after construction and may be shared across threads without locking.

See also: Paragraph

List

Syntaxes:

  • @li { item }

  • @arg { item }

  • - (Markdown bullet)

Creates an unordered (bulleted) list inside a doc comment. You can use the Javadoc/Doxygen @li command, its alias @arg, or Markdown-style dash bullets (`- `). All three syntaxes produce the same list structure.

Type Parameter Description

Paragraph

item

The text of one list item.

Example
/** Initializes the connection.

    The function performs three steps in order:

    - Allocates the socket.
    - Performs the handshake.
    - Caches the credentials.
 */
void connect();
Preview
connect

Initializes the connection.

Synopsis

Declared in <list.cpp>

void
connect();
Description

The function performs three steps in order:

  • Allocates the socket.

  • Performs the handshake.

  • Caches the credentials.

Table

Syntax: <table>

Creates a table inside a doc comment using HTML table markup. MrDocs parses standard HTML <table>, <tr>, <th>, and <td> elements and converts them to a table in the output format.

Example
/** Returns a status code describing the result of `parse`.

    <table>
    <tr><th>Code</th><th>Meaning</th></tr>
    <tr><td>0</td><td>Success</td></tr>
    <tr><td>1</td><td>Syntax error</td></tr>
    <tr><td>2</td><td>I/O error</td></tr>
    </table>
 */
int parse_status();
Preview
parse_status

Returns a status code describing the result of parse.

Synopsis

Declared in <table.cpp>

int
parse_status();
Description
Code Meaning

0

Success

1

Syntax error

2

I/O error

Return Value

a status code describing the result of parse.

Code Block

Syntaxes:

  • @code[{.lang}] ... @endcode

  • @verbatim …​ @endverbatim

Inserts a block of preformatted code into the documentation. Everything between the opening and closing tags is preserved verbatim, including whitespace and indentation.

@code and @verbatim produce the same output. Use @code for source code and @verbatim for other preformatted text, though MrDocs treats them identically.

Type Parameter Description

Language

lang

Optional language hint for syntax highlighting, e.g. cpp.

Code

code

The verbatim source between the opening command and @endcode/@endverbatim.

Example
/** Computes a hash code for a byte sequence.

    Typical use:

    @code
    auto h = compute_hash("hello", 5);
    @endcode
 */
unsigned compute_hash(const char* data, unsigned n);
Preview
compute_hash

Computes a hash code for a byte sequence.

Synopsis

Declared in <code‐block.cpp>

unsigned int
compute_hash(
    char const* data,
    unsigned int n);
Description

Typical use:

auto h = compute_hash("hello", 5);

Admonitions

Syntaxes:

  • @note { text }

  • @warning { text }

  • @tip { text }

  • @important { text }

  • @caution { text }

Admonition commands wrap a paragraph in a callout block. The five kinds differ in urgency:

  • @note — supplementary information the reader should be aware of.

  • @tip — a helpful suggestion or best practice.

  • @important — information critical to correct usage.

  • @warning — something that could lead to unexpected behavior if ignored.

  • @caution — something that could cause data loss, security issues, or other serious problems.

The text following the command becomes the body of the admonition block.

Type Parameter Description

Paragraph

text

The admonition body.

Example
/** Closes the handle.

    @note Closing a handle invalidates any iterators
    that point into the underlying buffer.

    @warning Do not call this from a destructor that
    runs during program termination.

    @tip Prefer the RAII wrapper `scoped_handle`,
    which closes automatically at scope exit.
 */
void close_handle();
Preview
close_handle

Closes the handle.

Synopsis

Declared in <admonitions.cpp>

void
close_handle();
Description

Closing a handle invalidates any iterators that point into the underlying buffer.

Do not call this from a destructor that runs during program termination.

Prefer the RAII wrapper scoped_handle, which closes automatically at scope exit.

Quote

Syntax: > text

The AST defines a Quote node, but no parser path produces it yet. When that lands, it will hold a blockquote inside a doc comment.

Type Parameter Description

Paragraph

text

The quoted text; prefix each line with >.

Not yet supported: MrDocs does not yet produce correct output for this command.

See also: Paragraph

Thematic Break

Syntaxes:

  • ---

  • ***

  • ___

The AST defines a ThematicBreak node, but no parser path produces it yet. When that lands, it will render as a horizontal rule between doc-comment sections.

Not yet supported: MrDocs does not yet produce correct output for this command.

See also: Heading

Definition List

Syntax: term : definition

The AST defines a DefinitionList node, but no parser path produces it yet. When that lands, it will hold a definition list of term-description pairs.

Type Parameter Description

Text

term

The term being defined.

Paragraph

definition

A definition, on a line prefixed with :.

Not yet supported: MrDocs does not yet produce correct output for this command.

See also: List

Footnote Definition

Syntax: [^label]: text

The AST defines a FootnoteDefinition node, but no parser path produces it yet. When that lands, it will hold the body of a footnote that inline content can reference.

Type Parameter Description

Text

label

The footnote identifier that references point to.

Paragraph

text

The footnote body.

Not yet supported: MrDocs does not yet produce correct output for this command.

See also: Footnote Reference

Math Block

Syntax: expression

The AST defines a block-level Math node, but no parser path produces it yet. This is the block form, separate from the inline $…​$ and ... math that already works. When that lands, it will hold a standalone math expression as its own block.

Type Parameter Description

Math

expression

A standalone LaTeX math expression.

Not yet supported: MrDocs does not yet produce correct output for this command.

See also: Math

Metadata Blocks

Summary

Syntaxes:

  • @brief { text }

  • @short { text }

The @brief command marks its content as the brief description (summary) of the documented symbol. The first sentence of a doc comment is automatically treated as the brief, so you only need @brief when you want to override that behavior or when the automatic detection does not capture what you intend.

@short is an alias for @brief.

Type Parameter Description

Paragraph

text

The brief, one-sentence summary of the symbol.

Example
/** @brief Connects to a remote endpoint.

    Establishes a TCP connection to the given host and port
    and returns a handle for subsequent operations.
 */
int connect_to(const char* host, int port);
Preview
connect_to

Connects to a remote endpoint.

Synopsis

Declared in <summary.cpp>

int
connect_to(
    char const* host,
    int port);
Description

Establishes a TCP connection to the given host and port and returns a handle for subsequent operations.

See also: Paragraph

Parameters

Syntax: @param[<dir>] <name> { description }

The @param command documents a function parameter. Write one @param per parameter you want to describe. The parameter name follows the command, and everything after it is the description.

An optional direction indicator can appear in square brackets between @param and the parameter name to specify how data flows through the parameter.

Type Parameter Description

Direction

dir

Optional parameter direction.

Symbol

name

The function parameter being documented; must match the signature.

Paragraph

description

Description of the parameter.

Example
/** Copies bytes from one buffer to another.

    @param[out] dst The destination buffer.
                    Must be at least `n` bytes long.
    @param[in]  src The source buffer.
    @param[in]  n   The number of bytes to copy.
 */
void copy_bytes(char* dst, const char* src, unsigned n);
Preview
copy_bytes

Copies bytes from one buffer to another.

Synopsis

Declared in <parameters.cpp>

void
copy_bytes(
    char* dst,
    char const* src,
    unsigned int n);
Parameters

Name

Description

dst [out]

The destination buffer. Must be at least n bytes long.

src [in]

The source buffer.

n [in]

The number of bytes to copy.

Template Parameters

Syntax: @tparam <name> { description }

The @tparam command documents a template parameter. It works like @param, but for type, non-type, and template-of-template parameters.

Type Parameter Description

Symbol

name

The template parameter; must match the template declaration.

Paragraph

description

Description of the template parameter.

Example
/** Returns the larger of two values.

    @tparam T A type that supports `operator<`.
 */
template <typename T>
T const& max_of(T const& a, T const& b);
Preview
max_of

Returns the larger of two values.

Synopsis

Declared in <template‐parameters.cpp>

template<typename T>
T const&
max_of(
    T const& a,
    T const& b);
Return Value

the larger of two values.

Template Parameters

Name

Description

T

A type that supports operator<.

See also: Parameters

Returns

Syntaxes:

  • @return { description }

  • @returns { description }

  • @result { description }

The @return command documents the return value of a function. All three spellings are equivalent. You can use multiple @return commands when a function returns a composite value and you want to describe each part separately.

Type Parameter Description

Paragraph

description

Description of the return value.

Example
/** Looks up a configuration value by key.

    @returns The value associated with the key,
             or `nullptr` when no such key exists.
 */
const char* lookup(const char* key);
Preview
lookup

Looks up a configuration value by key.

Synopsis

Declared in <returns.cpp>

char const*
lookup(char const* key);
Return Value

The value associated with the key, or nullptr when no such key exists.

See also: Parameters, Exceptions

Exceptions

Syntaxes:

  • @throw <exception> { description }

  • @throws <exception> { description }

  • @exception <exception> { description }

The @throw command documents an exception that a function may throw. All three spellings are equivalent. The exception type follows the command, and the rest of the line (and continuation lines) describe when or why the exception is thrown.

Type Parameter Description

Symbol

exception

The exception type that may be thrown, e.g. std::invalid_argument.

Paragraph

description

When and why the exception is thrown.

Example
/** Parses an integer from a string.

    @throws std::invalid_argument when the text does not
            contain a valid integer representation.
 */
int parse_int(const char* text);
Preview
parse_int

Parses an integer from a string.

Synopsis

Declared in <exceptions.cpp>

int
parse_int(char const* text);
Exceptions

Name

Thrown on

std::invalid_argument

when the text does not contain a valid integer representation.

See also: Returns, Preconditions

Preconditions

Syntax: @pre { description }

The @pre command documents a precondition that must hold before calling the function. You can use multiple @pre commands to list several preconditions; each one renders as a separate bullet in a "Preconditions" section.

Type Parameter Description

Paragraph

description

A condition that must hold before the call.

Example
/** Reads the next byte from the stream.

    @pre The stream must be open and have at least
         one byte available.
 */
char next_byte();
Preview
next_byte

Reads the next byte from the stream.

Synopsis

Declared in <preconditions.cpp>

char
next_byte();
Preconditions
  • The stream must be open and have at least one byte available.

Postconditions

Syntax: @post { description }

The @post command documents a postcondition that is guaranteed after the function returns successfully. Like @pre, you can use multiple @post commands to list several postconditions; each renders as a separate bullet in a "Postconditions" section.

Type Parameter Description

Paragraph

description

A condition guaranteed after the call.

Example
/** Sorts the elements of `buffer` in ascending order.

    @post For every index i in [0, n - 1),
          `buffer[i] <= buffer[i + 1]`.
 */
void sort_buffer(int* buffer, unsigned n);
Preview
sort_buffer

Sorts the elements of buffer in ascending order.

Synopsis

Declared in <postconditions.cpp>

void
sort_buffer(
    int* buffer,
    unsigned int n);
Postconditions
  • For every index i in [0, n ‐ 1),] buffer[i]<= buffer[i + 1].

See also: Preconditions

See-also

Syntaxes:

  • @see { references }

  • @sa { references }

The @see command adds an entry to the "See also" section of the documented symbol. The argument is parsed as inline content, so you can include cross-references, links, or plain text. Multiple @see commands produce multiple entries.

@sa is a Doxygen-compatible alias for @see.

@see looks special, but its argument is just an ordinary paragraph. MrDocs does not auto-link names inside it (Doxygen’s documentation is misleading on this point). To link to a symbol, use @ref inside the paragraph.

Type Parameter Description

Paragraph

references

The text shown in the See Also section. Typically references to related symbols, but parsed as an ordinary paragraph.

Example
/** Computes the sum of two values. */
double sum(double a, double b);

/** Computes the average of two values.

    @see @ref sum
 */
double average(double a, double b);
Preview
average

Computes the average of two values.

Synopsis

Declared in <see‐also.cpp>

double
average(
    double a,
    double b);
See Also

sum

sum

Computes the sum of two values.

Synopsis

Declared in <see‐also.cpp>

double
sum(
    double a,
    double b);

See also: Cross-reference

Relates

Syntaxes:

  • @relates <name>

  • @related <name>

  • @relatedalso <name>

  • @relatesalso <name>

  • @memberof <name>

Declares that the documented free function is logically related to (or a member of) the specified class or struct. MrDocs stores each target in the symbol’s relates field and renders it under Non-Member Functions. @related, @relatedalso, and @relatesalso are aliases for @relates; @memberof behaves the same way.

Type Parameter Description

Symbol

name

The class or struct this free function is related to.

Example
/** A pixel record. */
struct pixel { int x, y; };

/** Computes the Euclidean distance between two pixels.

    @relates pixel
 */
double distance(pixel const& a, pixel const& b);
Preview
pixel

A pixel record.

Synopsis

Declared in <relates.cpp>

struct pixel;
Data Members

Name

x

y

Non-Member Functions

Name

Description

distance

Computes the Euclidean distance between two pixels.

pixel::x
Synopsis

Declared in <relates.cpp>

int x;
pixel::y
Synopsis

Declared in <relates.cpp>

int y;
distance

Computes the Euclidean distance between two pixels.

Synopsis

Declared in <relates.cpp>

double
distance(
    pixel const& a,
    pixel const& b);
Parameters

Name

Description

a

A pixel record.

b

A pixel record.

Function Object

Syntaxes:

  • @functionobject

  • @functor

Marks a constexpr variable as an Algorithm Function Object (AFO) (the niebloid pattern: a callable object that stands in for a function). Place the command on the variable or on its function-object record; it never goes on operator(). MrDocs then documents the variable as a function whose signature and text come from the record’s operator() overloads, falling back to the variable’s own doc comment when operator() is undocumented. The record’s own doc comment is not used. With auto-function-objects enabled (the default) a variable whose type has only operator() overloads is detected automatically, so the command is needed only when the type has extra public members that defeat detection. @functor is an alias for @functionobject.

Document the operator(), not the variable or the record: that is where MrDocs takes the AFO’s signature and description from.

Example
struct scale_fn
{
    /** Returns `x` scaled by the configured factor. */
    int operator()(int x) const;

    int factor; // extra member: auto-detection skips this type
};

/** @functionobject

    The extra `factor` member defeats auto-detection.
 */
constexpr scale_fn scale = {2};
Preview
scale

Returns x scaled by the configured factor.

Synopsis

Declared in <function‐object.cpp>

int
scale(int x);

This function is defined as an Algorithm Function Object (AFO).

Return Value

x scaled by the configured factor.

See Below

Syntax: @seebelow

Marks the symbol so its synopsis renders as /* see below */ instead of the full declaration, for interfaces whose exact form is unspecified.

Example
/** A handle whose exact representation is unspecified.

    @seebelow
 */
class handle
{
    int fd_;
public:
    /** Close the handle. */
    void close();
};
Preview
handle

A handle whose exact representation is unspecified.

Synopsis

Declared in <see‐below.cpp>

class handle { /* see-below */ };

Implementation Defined

Syntax: @implementationdefined

Marks the symbol as implementation-defined, so its details are hidden from the generated documentation.

Example
namespace detail {
/** An opaque RAII token.

    @implementationdefined
 */
struct scope_token { ~scope_token(); };
}

/** Attach a key/value pair to the current logging scope.

    @return An opaque token whose type is implementation-defined;
            store it in `auto`.
 */
detail::scope_token scoped_context(char const* key, char const* value);
Preview
scoped_context

Attach a key/value pair to the current logging scope.

Synopsis

Declared in <implementation‐defined.cpp>

/* implementation-defined */
scoped_context(
    char const* key,
    char const* value);
Return Value

An opaque token whose type is implementation‐defined; store it in auto.

Inlines

Emphasis

Syntaxes:

  • *text*

  • _text_

  • @a <word>

  • @e <word>

  • @em <word>

  • <em>text</em>

Renders its content in italic (emphasized) style. Use * or _ around the emphasized text. The Doxygen commands @a, @e, and @em emphasize the single word that follows them.

Type Parameter Description

Text

word

The word to emphasize (command form). The Markdown/HTML forms wrap a span of text.

Example
/** Counts the number of *unique* elements in the input.

    Duplicates are detected by `operator==` comparison.
 */
unsigned count_unique(int const* values, unsigned n);
Preview
count_unique

Counts the number of unique elements in the input.

Synopsis

Declared in <emphasis.cpp>

unsigned int
count_unique(
    int const* values,
    unsigned int n);
Description

Duplicates are detected by operator== comparison.

See also: Strong

Strong

Syntaxes:

  • **text**

  • __text__

  • @b <word>

  • @strong <word>

  • <strong>text</strong>

Renders its content in bold (strong) style. Use ** or __ around the bold text. The Doxygen commands @b and @strong bold the single word that follows them.

Type Parameter Description

Text

word

The word to render bold (command form). The Markdown/HTML forms wrap a span of text.

Example
/** Returns whether the input is **non-zero**.

    Useful as a predicate in algorithms.
 */
bool is_nonzero(int x);
Preview
is_nonzero

Returns whether the input is non‐zero.

Synopsis

Declared in <strong.cpp>

bool
is_nonzero(int x);
Description

Useful as a predicate in algorithms.

Return Value

whether the input is non‐zero.

See also: Emphasis

Code Span

Syntaxes:

  • `text`

  • @c <word>

  • @p <word>

  • <code>text</code>

Renders its content in a monospace code font, inline within the surrounding text. Markdown-style backtick delimiters wrap the text to be rendered as code. The Doxygen commands @c and @p apply code formatting to the single word that follows them. The HTML <code> tag is also recognized.

Type Parameter Description

Text

word

The word to render as inline code (command form). The Markdown/HTML forms wrap a span of text.

Example
/** Sets the value pointed to by `target`.

    The previous value of `*target` is overwritten.
 */
void set_value(int* target, int new_value);
Preview
set_value

Sets the value pointed to by target.

Synopsis

Declared in <code‐span.cpp>

void
set_value(
    int* target,
    int new_value);
Description

The previous value of *target is overwritten.

See also: Code Block

Strikethrough

Syntaxes:

  • ~~text~~

  • <del>text</del>

Renders its content with a horizontal line through the middle, for deleted or deprecated text. Wrap the text in double tildes (~~).

Type Parameter Description

Text

text

The text to strike through.

Example
/** Sends a request to the server.

    Replaces the ~~deprecated~~ `send_raw` API.
 */
int send_request(const char* path);
Preview
send_request

Sends a request to the server.

Synopsis

Declared in <strikethrough.cpp>

int
send_request(char const* path);
Description

Replaces the deprecated send_raw API.

Highlight

Syntaxes:

  • ==text==

  • <mark>text</mark>

Renders its content with a highlighted background, drawing attention to specific words or phrases. Markdown-style double equals signs (==) wrap the text. The HTML <mark> tag is also recognized.

Type Parameter Description

Text

text

The text to highlight.

Example
/** Logs a message at the given severity.

    Messages with ==error== severity are also written to `stderr`.
 */
void log(int severity, const char* msg);
Preview
log

Logs a message at the given severity.

Synopsis

Declared in <highlight.cpp>

void
log(
    int severity,
    char const* msg);
Description

Messages with error severity are also written to stderr.

Superscript

Syntaxes:

  • ^text^

  • <sup>text</sup>

Renders its content as superscript, positioned above the baseline. Use for footnote markers, exponents, and ordinal indicators. Wrap the text in carets (^).

Type Parameter Description

Text

text

The text to raise as superscript.

Not yet supported: MrDocs does not yet produce correct output for this command.

See also: Subscript

Subscript

Syntaxes:

  • ~text~

  • <sub>text</sub>

Renders its content as subscript, positioned below the baseline. Use for chemical formulas, mathematical indices, and similar notation. Wrap the text in single tildes (~).

Type Parameter Description

Text

text

The text to lower as subscript.

Not yet supported: MrDocs does not yet produce correct output for this command.

See also: Superscript

Math

Syntaxes:

  • $expression$ (inline)

  • expression (display)

Renders a mathematical expression. Single dollar signs ($…​$) produce an inline math span that flows within surrounding text. Double dollar signs (...) produce a display math block, typically centered on its own line. The content between the delimiters is treated as a literal math expression and is not parsed for Markdown or other formatting.

Type Parameter Description

Math

expression

A LaTeX math expression; $…​$ inline, ... display.

Not yet supported: MrDocs does not yet produce correct output for this command.

See also: Code Span

Syntaxes:

  • [text](url)

  • <a href="url">text</a>

Creates a hyperlink to an external URL. The Markdown form puts the visible text in square brackets and the URL in parentheses. The HTML form uses an <a> tag with an href attribute.

Type Parameter Description

Text

text

The link text.

Path

url

The destination URL.

Example
/** A logger compatible with the
    [SLF4J specification](https://www.slf4j.org).
 */
struct logger { };
Preview
logger

A logger compatible with the SLF4J specification.

Synopsis

Declared in <link.cpp>

struct logger;

See also: Cross-reference, Image

Image

Syntaxes:

  • ![alt](src)

  • <img src="src" alt="alt">

  • @image <format> <file> ["caption"]

Embeds an image inline. The Markdown form is an exclamation mark, alt text in square brackets, then the source path in parentheses. The HTML form uses an <img> tag with src and alt attributes.

Type Parameter Description

Text

format

Output format the image applies to, e.g. html.

Path

file

Path to the image file.

Text

caption

Optional caption.

Not yet supported: MrDocs does not yet produce correct output for this command.

See also: Link

Cross-reference

Syntaxes:

  • @ref <name> ["text"]

  • @link <name> ... @endlink

Creates a cross-reference to another documented symbol. The @ref command takes a symbol name (optionally namespace-qualified) and produces a link to that symbol’s documentation page. Qualified names use :: separators (e.g., @ref A::f1, @ref ::A::f1). Operator names are supported (e.g., @ref F::operator+).

Type Parameter Description

Symbol

name

Qualified name of the symbol to link to.

Text

text

Optional display text for the link.

Example
/** Triples the input. */
int triple(int x);

/** Doubles the input.

    Closely related to @ref triple.
 */
int twice(int x);
Preview
triple

Triples the input.

Synopsis

Declared in <cross‐reference.cpp>

int
triple(int x);
twice

Doubles the input.

Synopsis

Declared in <cross‐reference.cpp>

int
twice(int x);
Description

Closely related to triple.

See also: Link, See-also

Footnote Reference

Syntax: [^label]

The AST defines a FootnoteReference node, but no parser path produces it yet. When that lands, it will hold an inline reference to a footnote definition.

Type Parameter Description

Text

label

The identifier of the footnote definition to reference.

Not yet supported: MrDocs does not yet produce correct output for this command.

Copy

Syntaxes:

  • @copydoc <reference>

  • @copybrief <reference>

  • @copydetails <reference>

Copy documentation from another symbol. @copydoc copies the whole doc comment (brief, description, and every metadata block); @copybrief copies only the brief; @copydetails copies only the detailed description. Useful for overloads, redeclarations, and wrappers that share documentation with another symbol.

Type Parameter Description

Symbol

reference

The symbol whose documentation to copy.

Example
/** Encodes a byte sequence as base-64.

    @param  data The bytes to encode.
    @param  n    Number of bytes in `data`.
    @returns A null-terminated base-64 string. Owned by the caller.
 */
char* b64_encode(const char* data, unsigned n);

/** @copydoc b64_encode */
char* base64(const char* data, unsigned n);
Preview
b64_encode

Encodes a byte sequence as base‐64.

Synopsis

Declared in <copydoc.cpp>

char*
b64_encode(
    char const* data,
    unsigned int n);
Return Value

A null‐terminated base‐64 string. Owned by the caller.

Parameters

Name

Description

data

The bytes to encode.

n

Number of bytes in data.

base64

Encodes a byte sequence as base‐64.

Synopsis

Declared in <copydoc.cpp>

char*
base64(
    char const* data,
    unsigned int n);
Return Value

A null‐terminated base‐64 string. Owned by the caller.

Parameters

Name

Description

data

The bytes to encode.

n

Number of bytes in data.

Line Break

Syntaxes:

  • <br>

  • <br/>

The <br> HTML tag marks a hard line break inside inline content. MrDocs accepts both <br> and the self-closing <br/>. The visible rendering is still being refined: the parser consumes the tag without emitting an explicit line-break element yet.

Not yet supported: MrDocs does not yet produce correct output for this command.

See also: Soft Break

Soft Break

Syntaxes:

  • newline within a paragraph

  • \ (at end of line)

The AST defines a SoftBreak node, but no parser path produces it yet. A soft break is a line break that renderers may collapse to a space, in contrast to the hard <br> break.

Not yet supported: MrDocs does not yet produce correct output for this command.

See also: Line Break