mrdocs::VariableSymbol

A variable.

Synopsis

Declared in <mrdocs/Metadata/Symbol/Variable.hpp>

struct VariableSymbol final
    : SymbolCommonBase<SymbolKind::Variable>

Description

This includes variables at namespace or record scope.

Base Classes

NameDescription
SymbolCommonBase<SymbolKind::Variable>Base class for providing variant discriminator functions.

Member Functions

NameDescription
VariableSymbol [constructor]Create a variable symbol bound to an ID.
operator<=> Compare variables by type, flags, and initializer.

Static Member Functions

Name
isConcept
isEnum
isEnumConstant
isFunction
isGuide
isNamespace
isNamespaceAlias
isOverloads
isRecord
isTypedef
isUsing
isVariable

Data Members

NameDescription
Attributes Raw attribute spellings attached to the variable.
BitfieldWidth The width of the bitfield
HasNoUniqueAddress Whether the variable uses [[no_unique_address]].
Initializer The default member initializer, if any.
IsBitfield Whether the field is a bitfield
IsConstexpr Whether the variable is constexpr.
IsConstinit Whether the variable is constinit.
IsDeprecated Whether the variable is marked deprecated.
IsInline Whether the variable is declared inline.
IsMaybeUnused Whether the variable carries [[maybe_unused]].
IsMutable Whether the field is declared mutable
IsRecordField True if this variable is a data member of a record.
IsThreadLocal Whether the variable is thread_local.
IsVariant Whether the field is a variant member
StorageClass Storage class specifier applied to the variable.
Template The template information, if any.
Type The type of the variable

Static Data Members

Name
kind_id

Non-Member Functions

NameDescription
canMergeCheck whether two symbols may be merged.
getPrimaryLocationDetermine a location to use when none is explicitly chosen.