mrdocs

Core MrDocs support utilities.

Namespaces

Name

Description

doc

Doc‐comment enums and helpers that describe admonition kinds.

dom

Objects representing JSON‐like values.

files

Filesystem helpers (join, temp, canonicalize) used throughout MrDocs.

helpers

Handlebars helper registry for templates.

js

JavaScript interop helpers for the embedded runtime.

lua

Lua interop helpers for the optional scripting/backend integration.

report

Reporting utilities (messages, statistics, sinks).

Types

Name

Description

AnyFileVisitor

Polymorphic visitor for files discovered during traversal.

ArrayType

C++ array type (bounded or unbounded).

ArrayView

A non‐owning, read‐only view over a contiguous array of T.

AutoType

Represents auto or decltype(auto) placeholder type.

BadExpectedAccess

Base class for accessing an empty Expected.

BadExpectedAccess<void>

Exception thrown when reading the value of an empty Expected.

BaseInfo

Metadata for a direct base.

ConceptSymbol

Info for concepts.

Config

Configuration used to generate the Corpus and Docs

ConstantExprInfo

Represents an expression with a (possibly known) value

ConstantTArg

Non‐type template argument.

ConstantTParam

A constant template parameter

Corpus

The collection of declarations in extracted form.

DecltypeType

decltype(expr) type wrapper.

DocComment

A processed documentation comment attached to a declaration.

DomCorpus

Front‐end factory for producing Dom nodes.

EnumConstantSymbol

Info for enum constants.

EnumSymbol

Metadata for an enumeration declaration.

Error

Holds the description of an error, or success.

Exception

Type of all exceptions thrown by the API.

ExecutorGroup

A set of execution agents for performing concurrent work.

ExecutorGroupBase

Base class that owns a pool of execution agents and a shared work queue.

Expected

A container holding an error or a value.

Expected<T, E>

Expected specialization for void values. Holds either success (no payload) or an unexpected error E.

Expected<T&, E>

Expected specialization for lvalue references. Holds either a bound reference to T or an unexpected error E.

ExplicitInfo

Stores only the operand of the explicit‐specifier or noexcept‐specifier as a string. The complete expression is not preserved at this time. This is a temporary design and may be improved in the future.

ExprInfo

Represents an expression

FormatString

A format string with source location.

FriendInfo

Info for friend declarations.

FunctionSymbol

Metadata for a function or method.

FunctionType

Function type with parameters, qualifiers, and noexcept info.

Generator

Base class for documentation generators.

Generators

A dynamic list of Generator elements.

GlobPattern

A glob pattern matcher

GuideSymbol

Info for deduction guides.

Handlebars

A handlebars environment

HandlebarsError

An error thrown or returned by Handlebars

HandlebarsOptions

Options for handlebars

IdentifierName

Represents an identifier

LValueReferenceType

An lvalue reference type.

Location

Source location of a symbol or entity.

MemberPointerType

Pointer‐to‐member type (object or function).

Name

Represents a name for a named Type

NamedType

A type identified by name (possibly fundamental).

NamespaceAliasSymbol

Info for namespace aliases.

NamespaceSymbol

Describes a namespace and its members.

NamespaceTranche

Buckets the members that appear inside a namespace.

NoexceptInfo

Captures a noexcept specification and its evaluated form.

Optional

A compact optional that automatically uses nullable_traits<T> when available.

Optional<T&>

Optional reference wrapper that never owns storage.

OutputRef

Reference to output stream used by handlebars

Overload

Combines multiple callable types into a single overloaded function object.

OverloadsSymbol

Represents a set of function overloads.

Param

Represents a single function parameter

ParseResult

The result of a parse operation.

PathGlobPattern

A glob pattern matcher for paths

PointerType

Pointer type wrapper.

Polymorphic

A polymorphic value‐type.

RValueReferenceType

An rvalue reference type.

RangeFor

Range adapter to expose first/last flags inside range‐for loops.

RecordInterface

The aggregated interface for a given struct, class, or union.

RecordSymbol

Metadata for struct, class, or union.

RecordTranche

A group of members that have the same access specifier.

ReferenceDirectories

Reference directories used to resolve paths

ScopeExit

Execute a callable when the enclosing scope exits unless dismissed.

ScopeExitRestore

RAII helper that restores a referenced value on scope exit.

SourceInfo

Stores source information for a declaration.

SourceLocation

A source location with filename prettification.

SpecializationName

Represents a (possibly qualified) symbol name with template arguments.

SplitLinesAdaptor

Range adaptor that constructs a SplitLinesView.

SplitLinesView

A lazy input range of std::string_view lines split on all known line breaks.

StringHash

Transparent hash functor for string‐like keys.

Symbol

Base class with common properties of all symbols

SymbolCommonBase

Base class for providing variant discriminator functions.

SymbolGlobPattern

A glob pattern matcher for C++ symbols

SymbolID

A unique identifier for a symbol.

TArg

Base class for any template argument.

TArgCommonBase

CRTP base that fixes the argument kind.

TParam

Base class for a template parameter declaration.

TParamCommonBase

CRTP base that fixes the parameter kind.

TaskGroup

A subset of possible work in a thread pool.

TemplateInfo

Information about templates and specializations thereof.

TemplateTArg

Template template argument.

TemplateTParam

Template template parameter.

ThreadPool

A pool of threads for executing work concurrently.

Type

A possibly qualified type.

TypeCommonBase

CRTP base that ties a concrete type to a fixed TypeKind.

TypeTArg

Type template argument.

TypeTParam

Type template parameter.

TypedefSymbol

Info for typedef and using declarations.

Unexpected

Holds an unexpected error value for Expected.

UsingSymbol

Info for using declarations.

VariableSymbol

A variable.

Visitor

A visitor for a type

YCombinator

Enables recursive lambdas by passing a self‐reference as the first argument.

add_const_from

Propagate const qualification from From to To, keeping references.

add_cv_from

Propagate both const and volatile qualifiers from From to To.

add_cvref_from

Propagate cv‐qualification and reference category from From to To.

add_lvalue_reference_from

Propagate lvalue‐reference from From to To if present.

add_reference_from

Propagate reference qualification from From to To.

add_rvalue_reference_from

Propagate rvalue‐reference from From to To if present.

add_volatile_from

Propagate volatile qualification from From to To, keeping references.

any_callable

A movable, type‐erased function object.

any_callable<R(Args...)>

Type‐erased callable wrapper for signature R(Args...).

make_dependent

Dependent alias of T, useful for delaying instantiation.

nullable_traits

nullable_traits<T> defines how to treat a T as “nullable” without an external engaged bit.

nullable_traits<Location>

nullable_traits specialization for Location.

nullable_traits<T>

nullable_traits for types with a sentinel.

nullable_traits<Polymorphic<T>>

nullable_traits for Polymorphic<T>.

sentinel_traits

Defines a customization point for types that have an intrinsic sentinel value denoting “null”.

sentinel_traits<std::nullptr_t>

sentinel_traits specialization for std::nullptr_t.

sentinel_traits<T>

sentinel_traits specialization for unsigned integral types.

sentinel_traits<T*>

sentinel_traits specialization for raw pointers.

unexpect_t

Tag type used to select unexpected construction.

unlock_guard

A scoped guard which unlocks a mutex.

UnorderedStringMap

unordered_map keyed by std::string with transparent hashing.

UnorderedStringMultiMap

unordered_multimap keyed by std::string with transparent hashing.

add_const_from_t

Alias for add_const_from<From, To>::type.

add_cv_from_t

Alias for add_cv_from<From, To>::type.

add_cvref_from_t

Alias for add_cvref_from<From, To>::type.

add_lvalue_reference_from_t

Alias for add_lvalue_reference_from<From, To>::type.

add_reference_from_t

Alias for add_reference_from<From, To>::type.

add_rvalue_reference_from_t

Alias for add_rvalue_reference_from<From, To>::type.

add_volatile_from_t

Alias for add_volatile_from<From, To>::type.

make_dependent_t

Alias for make_dependent<T, U>::type.

Enums

Name

Description

AccessKind

Access specifier.

AutoKind

The kind of auto keyword used in a declaration.

ConstexprKind

constexpr/`consteval` specifier kinds

ExplicitKind

Explicit specifier kinds

ExtractionMode

Determine why a symbol is extracted

FileKind

Classifies where a file originates from.

FunctionClass

Function classifications

FundamentalTypeKind

Categorically describes a fundamental type.

ListKind

Classification of list ordering.

NameKind

Kinds of names that appear in type and symbol metadata.

NoexceptKind

Exception specification kinds

OperatorKind

Operator kinds

QualifierKind

Type qualifiers

RecordKeyKind

The kind of record: struct, class, or union.

ReferenceKind

Reference type kinds

StorageClassKind

Storage class kinds

SymbolKind

Info variant discriminator

TArgKind

The kind of template argument.

TParamKeyKind

The keyword a template parameter was declared with

TParamKind

Discriminates the different template parameter categories.

TableAlignmentKind

Horizontal alignment for table columns.

TemplateSpecKind

The kind of template or specialization.

TypeKind

Variants of C++ types captured in metadata.

UsingClass

The class of using declaration.

Functions

Name

Description

CompareDerived

Compares two polymorphic objects that have visit functions

HTMLEscape

HTMLEscape overloads

addMember

Append a new function overload to the set.

allMembers

allMembers overloads

assert_failed

Handler invoked when MRDOCS_ASSERT fails.

bottomUpTraverse

Traverse a DocComment tree bottom‐up (post‐order).

canMerge

Check whether two symbols may be merged.

cast

cast overloads

cast_or_null

cast_or_null overloads

compareSymbolNames

Return the result of comparing s0 to s1.

contains

Determine if a range contains a specific element.

contains_any

Determine if a range contains any of the specified elements.

contains_n

Determine if a range contains at least N instances of the specified element.

contains_n_any

Determine if a range contains at least N instances of any of the specified elements.

countSymbolKind

Count the number of SymbolKind enumerators.

createFrame

Create child data objects.

dyn_cast

dyn_cast overloads

dyn_cast_or_null

dyn_cast_or_null overloads

endsWithOneOf

Determine if a string ends with one of the specified characters

escapeExpression

find_last_of

Find the last element in a range that matches an element in the specified range.

forEachFile

forEachFile overloads

formatError

Return a formatted error.

fromString

Convert a string to a FundamentalTypeKind.

getDefaultAccessString

Return the default accessibility for a record key kind.

getGenerators

Return a reference to the global Generators instance.

getOperatorKind

Return the short name of an operator as a string.

getOperatorKindFromSuffix

Return the short name of an operator as a string.

getOperatorName

Return the name of an operator as a string.

getOperatorReadableName

Return the human‐readable name of the operator

getParents

getParents overloads

getPrimaryLocation

getPrimaryLocation overloads

getSafeOperatorName

Return the safe name of an operator as a string.

getShortOperatorName

Return the short name of an operator as a string.

getSinglePageFullPath

Return the full path for single page output.

innerType

Return the inner type.

innerTypePtr

Return the inner type.

innermostType

innermostType overloads

isAlphaNumeric

isAlphaNumeric overloads

isAlphabetic

isAlphabetic overloads

isBinaryOperator

Determines whether the operator is potentially binary.

isDigit

isDigit overloads

isEmpty

Determine if a value is empty

isLowerCase

isLowerCase overloads

isUnaryOperator

Determines whether the operator is potentially unary.

isUpperCase

isUpperCase overloads

isWhitespace

isWhitespace overloads

is_null

is_null helper that uses nullable_traits<T> if available.

is_one_of

Determine if an element is equal to any of the elements in the specified range.

isa

Return true if the polymorphic object holds a value of type To.

isa_or_null

Return true if pointer is non‐null and referent is of type To.

leastSpecific

Compare ExtractionModes and returns the least specific

ltrim

ltrim overloads

makeChar

Apply the "char" specifier to the type

makeLong

Apply the "long" specifier to the type

makeOverload

Factory function that creates an Overload from the given callables.

makeShort

Apply the "short" specifier to the type

makeSigned

Apply the "signed" specifier to the type

makeUnsigned

Apply the "unsigned" specifier to the type

makeVisitor

Make a visitor for a base type

make_array_view

make_array_view overloads

make_null

make_null helper that uses nullable_traits<T> if available.

match

Applies a set of callables to a std::variant using std::visit and Overload.

merge

merge overloads

mostSpecific

Compare ExtractionModes and returns the most specific

null_of

null_of helper that constructs a null T using nullable_traits<T>.

operator|

Pipe a contiguous character range into the adaptor.

overrides

Determine if one function would override the other

parse

Parse a string view

reindentCode

Reindent code by removing the common leading spaces and adding the specified indent.

replace

Return the substring without leading and trailing horizontal whitespace.

rtrim

rtrim overloads

safeString

safeString overloads

startsWithOneOf

Determine if a string starts with one of the specified characters

swap

swap overloads

tag_invoke

tag_invoke overloads

toBase16Str

Convert a SymbolID to a string

toCamelCase

Convert a string to camelCase using ASCII letter rules.

toKebabCase

Convert a string to kebab‐case using ASCII letter rules.

toLowerCase

toLowerCase overloads

toPascalCase

Convert a string to PascalCase using ASCII letter rules.

toSnakeCase

Convert a string to snake_case using ASCII letter rules.

toString

toString overloads

toUpperCase

toUpperCase overloads

to_underlying

Return the value as its underlying type.

topDownTraverse

Traverse a DocComment tree top‐down (pre‐order).

trim

trim overloads

visit

visit overloads

visitIndexed

Visits a std::variant and calls the combined callable with the active index and the value.

yCombinator

Factory that creates a YCombinator from a callable.

operator<<

Write to output

operator==

Equality operators

operator!=

Inequality operators

operator<

Less‐than operators

operator<=

Less‐than‐or‐equal operators

operator>

Greater‐than operators

operator>=

Greater‐than‐or‐equal operators

operator<=>

Three‐way comparison operators

Variables

Name

Description

splitLines

Split a string view into lines, recognizing all common line breaks

unexpect

Tag object to request unexpected construction.

Concepts

Name

Description

ClearableContainerLike

Internal concept that matches “empty‐clear default‐constructible” types.

DocCommentNode

Concept to check if a type represents a DocComment node.

DocCommentNodeTraversable

Types that can be traversed by DocComment helpers.

HasParse

Concept to determine if there's a parse function for a type.

HasSentinel

Concept that is satisfied when sentinel_traits<T> declares a usable sentinel.

SymbolParent

A concept for types that have Symbol members.

dereferenceable

Determine if a type is dereferenceable

has_nullable_traits_v

Utility concept that returns true if T has a nullable_traits specialization enabled.

pair_like

Concept to check if a type is pair‐like

polymorphic_storage_for

Concept to check if a type is representing a polymorphic storage

range_of

Concept to check if a type is a range of T

range_of_tuple_like

Concept to check if a range is a range of tuple‐like elements

reference_constructs_from_temporary_v

Like reference_converts_from_temporary_v, but for construction.

reference_converts_from_temporary_v

True when binding To from From would require a temporary conversion.

tuple_like

Concept to check if a type is tuple‐like

Deduction Guides

Name

Description

ArrayView<T>

Deduce ArrayView element type from C‐style array.

ArrayView<T>

Deduce ArrayView element type from pointer and count.

Overload<Ts...>

Class template argument deduction guide for Overload.

RangeFor<Container>

Deduction guide for RangeFor.

ScopeExit<F>

Deduction guide for ScopeExit.

ScopeExitRestore<T>

Deduction guide for ScopeExitRestore taking a reference.

ScopeExitRestore<T>

Deduction guide for ScopeExitRestore taking a reference and new value.

Unexpected<E>

Deduction guide for Unexpected, forwarding the error type.

Using Declarations

Name

Description

source_location

Alias to std::source_location when available.

Description

The public mrdocs namespace here centralizes assert/assume hooks so we can swap behavior (terminate, throw, debugbreak) in one place without leaking platform specifics into the rest of the codebase.

Doc‐comment enums and helpers that describe admonition kinds.

Reporting utilities (messages, statistics, sinks).

The report namespace owns severity enums, message structs, and output sinks so tooling and libraries emit diagnostics in a uniform, testable format regardless of UI.

Created with MrDocs