mrdocs::Corpus::get

Return the Symbol with the specified symbol ID.

Synopsis

Declared in <mrdocs/Corpus.hpp>

template<class T = Symbol>
requires std::derived_from<T, Symbol>
T const&
get(SymbolID const& id) const noexcept;

Description

This function uses the find function to locate the Symbol with the specified symbol ID. The result is converted to the specified type T and returned.

The function exists can be used to determine if an Symbol with the specified symbol ID exists. If the id does not exist, the behavior is undefined.

If the Symbol is not of type T, the behavior is undefined.

Return Value

the Symbol with the specified symbol ID.

Parameters

Name Description

id

A unique identifier for a symbol.

Created with MrDocs