The C++ language domain.
Unknown Field: copyright | |
Copyright 2007-2022 by the Sphinx team, see AUTHORS. | |
Unknown Field: license | |
BSD, see LICENSE for details. |
Constant | T |
Important note on ids ---------------------------------------------------------------------------- |
Variable | logger |
Undocumented |
Variable | udl_identifier_re |
Undocumented |
Class | _DuplicateSymbolError |
Undocumented |
Class | AliasNode |
Undocumented |
Class | AliasTransform |
Undocumented |
Class | ASTAlignofExpr |
Undocumented |
Class | ASTArray |
Undocumented |
Class | ASTAssignmentExpr |
Undocumented |
Class | ASTBase |
Undocumented |
Class | ASTBaseClass |
Undocumented |
Class | ASTBinOpExpr |
Undocumented |
Class | ASTBooleanLiteral |
Undocumented |
Class | ASTBracedInitList |
Undocumented |
Class | ASTCastExpr |
Undocumented |
Class | ASTCharLiteral |
Undocumented |
Class | ASTClass |
Undocumented |
Class | ASTCommaExpr |
Undocumented |
Class | ASTConcept |
Undocumented |
Class | ASTDeclaration |
Undocumented |
Class | ASTDeclarator |
Undocumented |
Class | ASTDeclaratorMemPtr |
Undocumented |
Class | ASTDeclaratorNameBitField |
Undocumented |
Class | ASTDeclaratorNameParamQual |
Undocumented |
Class | ASTDeclaratorParamPack |
Undocumented |
Class | ASTDeclaratorParen |
Undocumented |
Class | ASTDeclaratorPtr |
Undocumented |
Class | ASTDeclaratorRef |
Undocumented |
Class | ASTDeclSpecs |
Undocumented |
Class | ASTDeclSpecsSimple |
Undocumented |
Class | ASTDeleteExpr |
Undocumented |
Class | ASTEnum |
Undocumented |
Class | ASTEnumerator |
Undocumented |
Class | ASTExplicitCast |
Undocumented |
Class | ASTExplicitSpec |
Undocumented |
Class | ASTExpression |
Undocumented |
Class | ASTFallbackExpr |
Undocumented |
Class | ASTFoldExpr |
Undocumented |
Class | ASTFunctionParameter |
Undocumented |
Class | ASTIdentifier |
Undocumented |
Class | ASTIdExpression |
Undocumented |
Class | ASTInitializer |
Undocumented |
Class | ASTLiteral |
Undocumented |
Class | ASTNamespace |
Undocumented |
Class | ASTNestedName |
Undocumented |
Class | ASTNestedNameElement |
Undocumented |
Class | ASTNewExpr |
Undocumented |
Class | ASTNoexceptExpr |
Undocumented |
Class | ASTNoexceptSpec |
Undocumented |
Class | ASTNumberLiteral |
Undocumented |
Class | ASTOperator |
No class docstring; 1/5 method documented |
Class | ASTOperatorBuildIn |
Undocumented |
Class | ASTOperatorLiteral |
Undocumented |
Class | ASTOperatorType |
Undocumented |
Class | ASTPackExpansionExpr |
Undocumented |
Class | ASTParametersQualifiers |
Undocumented |
Class | ASTParenExpr |
Undocumented |
Class | ASTParenExprList |
Undocumented |
Class | ASTPointerLiteral |
Undocumented |
Class | ASTPostfixArray |
Undocumented |
Class | ASTPostfixCallExpr |
Undocumented |
Class | ASTPostfixDec |
Undocumented |
Class | ASTPostfixExpr |
Undocumented |
Class | ASTPostfixInc |
Undocumented |
Class | ASTPostfixMember |
Undocumented |
Class | ASTPostfixMemberOfPointer |
Undocumented |
Class | ASTPostfixOp |
Undocumented |
Class | ASTRequiresClause |
Undocumented |
Class | ASTSizeofExpr |
Undocumented |
Class | ASTSizeofParamPack |
Undocumented |
Class | ASTSizeofType |
Undocumented |
Class | ASTStringLiteral |
Undocumented |
Class | ASTTemplateArgConstant |
Undocumented |
Class | ASTTemplateArgs |
Undocumented |
Class | ASTTemplateDeclarationPrefix |
Undocumented |
Class | ASTTemplateIntroduction |
Undocumented |
Class | ASTTemplateIntroductionParameter |
Undocumented |
Class | ASTTemplateKeyParamPackIdDefault |
Undocumented |
Class | ASTTemplateParam |
Undocumented |
Class | ASTTemplateParamConstrainedTypeWithInit |
Undocumented |
Class | ASTTemplateParamNonType |
Undocumented |
Class | ASTTemplateParams |
Undocumented |
Class | ASTTemplateParamTemplateType |
Undocumented |
Class | ASTTemplateParamType |
Undocumented |
Class | ASTThisLiteral |
Undocumented |
Class | ASTTrailingTypeSpec |
Undocumented |
Class | ASTTrailingTypeSpecDecltype |
Undocumented |
Class | ASTTrailingTypeSpecDecltypeAuto |
Undocumented |
Class | ASTTrailingTypeSpecFundamental |
Undocumented |
Class | ASTTrailingTypeSpecName |
Undocumented |
Class | ASTType |
Undocumented |
Class | ASTTypeId |
Undocumented |
Class | ASTTypeUsing |
Undocumented |
Class | ASTTypeWithInit |
Undocumented |
Class | ASTUnaryOpExpr |
Undocumented |
Class | ASTUnion |
Undocumented |
Class | ASTUserDefinedLiteral |
Undocumented |
Class | CPPAliasObject |
No class docstring; 0/3 instance variable, 0/1 class variable, 1/1 method documented |
Class | CPPClassObject |
Undocumented |
Class | CPPConceptObject |
Undocumented |
Class | CPPDomain |
C++ language domain. |
Class | CPPEnumeratorObject |
Undocumented |
Class | CPPEnumObject |
Undocumented |
Class | CPPExprRole |
Undocumented |
Class | CPPFunctionObject |
Undocumented |
Class | CPPMemberObject |
Undocumented |
Class | CPPNamespaceObject |
This directive is just to tell Sphinx that we're documenting stuff in namespace foo. |
Class | CPPNamespacePopObject |
Undocumented |
Class | CPPNamespacePushObject |
Undocumented |
Class | CPPObject |
Description of a C++ language object. |
Class | CPPTypeObject |
Undocumented |
Class | CPPUnionObject |
Undocumented |
Class | CPPXRefRole |
Undocumented |
Class | DefinitionParser |
No class docstring; 0/3 property, 0/1 instance variable, 2/47 methods documented |
Class | LookupKey |
Undocumented |
Class | Symbol |
Undocumented |
Class | SymbolLookupResult |
Undocumented |
Function | _make_phony_error_name |
Undocumented |
Function | setup |
Undocumented |
Variable | _expression_assignment_ops |
Undocumented |
Variable | _expression_bin_ops |
Undocumented |
Variable | _expression_unary_ops |
Undocumented |
Variable | _fold_operator_re |
Undocumented |
Variable | _id_char_from_prefix |
Undocumented |
Variable | _id_explicit_cast |
Undocumented |
Variable | _id_fundamental_v1 |
Undocumented |
Variable | _id_fundamental_v2 |
Undocumented |
Variable | _id_operator_unary_v2 |
Undocumented |
Variable | _id_operator_v1 |
Undocumented |
Variable | _id_operator_v2 |
Undocumented |
Variable | _id_prefix |
Undocumented |
Variable | _id_shorthands_v1 |
Undocumented |
Variable | _keywords |
Undocumented |
Variable | _max_id |
Undocumented |
Variable | _operator_re |
Undocumented |
Variable | _simple_type_specifiers_re |
Undocumented |
Variable | _string_re |
Undocumented |
Variable | _visibility_re |
Undocumented |
Multiple id generation schemes are used due to backwards compatibility. - v1: 1.2.3 <= version < 1.3
The style used before the rewrite. It is not the actual old code, but a replication of the behaviour.
All versions are generated and attached to elements. The newest is used for the index. All of the versions should work as permalinks.
Each signature is in a desc_signature node, where all children are desc_signature_line nodes. Each of these lines will have the attribute 'sphinx_line_type' set to one of the following (prioritized): - 'declarator', if the line contains the name of the declared object. - 'templateParams', if the line starts a template parameter list, - 'templateParams', if the line has template parameters
Note: such lines might get a new tag in the future.
No other desc_signature nodes should exist (so far).
See https://www.nongnu.org/hcb/ for the grammar, and https://github.com/cplusplus/draft/blob/master/source/grammar.tex, and https://github.com/cplusplus/concepts-ts for the newest grammar.
template-parameter
type-parameter
"class" "..."[opt] identifier[opt]
# also, from C++17 we can have "typename" in template templates
# Make the semicolon optional. # For now: drop the attributes (TODO). # Use at most 1 init-declarator. -> decl-specifier-seq init-declarator -> decl-specifier-seq declarator initializer
- storage-class-specifier ->
- ( "static" (only for member_object and function_object)
"extern" (only for member_object and function_object)"register") thread_local[opt] (only for member_object)
(it can also appear before the others)
simple-type-specifier
stricter grammar for decl-specifier-seq (with everything, each object uses a subset):
visibility storage-class-specifier function-specifier "friend" "constexpr" "volatile" "const" trailing-type-specifier # where trailing-type-specifier can no be cv-qualifier
# Inside e.g., template parameters a strict subset is used # (see type-specifier-seq) trailing-type-specifier ->
- simple-type-specifier ->
- ::[opt] nested-name-specifier[opt] type-name
::[opt] nested-name-specifier "template" simple-template-id"char" | "bool" | etc.decltype-specifierelaborated-type-specifier -> class-key attribute-specifier-seq[opt] ::[opt] nested-name-specifier[opt] identifier | class-key ::[opt] nested-name-specifier[opt] template[opt] simple-template-id | "enum" ::[opt] nested-name-specifier[opt] identifiertypename-specifier -> "typename" ::[opt] nested-name-specifier identifier | "typename" ::[opt] nested-name-specifier template[opt] simple-template-id
class-key -> "class" | "struct" | "union" type-name ->* identifier | simple-template-id # ignoring attributes and decltype, and then some left-factoring trailing-type-specifier ->
rest-of-trailing ("class" | "struct" | "union" | "typename") rest-of-trailing built-in -> "char" | "bool" | etc. decltype-specifier
template-argument "..."[opt]
constant-expression
ptr-declarator
noptr-declarator
- declarator-id attribute-specifier-seq[opt] ->
"..."[opt] id-expressionrest-of-trailing
"*" attribute-specifier-seq[opt] cv-qualifier-seq[opt]
# function_object must use a parameters-and-qualifiers, the others may # use it (e.g., function pointers) parameters-and-qualifiers ->
"(" parameter-clause ")" attribute-specifier-seq[opt] cv-qualifier-seq[opt] ref-qualifier[opt] exception-specification[opt]
ref-qualifier -> "&" | "&&" exception-specification ->
"noexcept" ("(" constant-expression ")")[opt] "throw" ("(" type-id-list ")")[opt]
# TODO: we don't implement attributes # member functions can have initializers, but we fold them into here memberFunctionInit -> "=" "0" # (note: only "0" is allowed as the value, according to the standard, # right?)
enum-key -> "enum" | "enum struct" | "enum class" enum-base ->
":" type
identifier
We additionally add the possibility for specifying the visibility as the first thing.
may not have any template argument lists
"template" "<" template-parameter-list ">" nested-name-specifier
grammar, single type: based on a type in a function parameter, but without a name:
parameter-declaration
- -> attribute-specifier-seq[opt] decl-specifier-seq
- abstract-declarator[opt]
# Drop the attributes -> decl-specifier-seq abstract-declarator[opt]
Can start with a templateDeclPrefix.
goal: as a type_object which must have a declarator, and optionally with a initializer grammar:
decl-specifier-seq declarator initializer
Can start with a templateDeclPrefix.
goal: a function declaration, TODO: what about templates? for now: skip grammar: no initializer
decl-specifier-seq declarator
Can start with a templateDeclPrefix.
goal: a class declaration, but with specification of a base class grammar:
nested-name "final"[opt] (":" base-specifier-list)[opt]
- base-specifier-list ->
- base-specifier "..."[opt]
base-specifier-list, base-specifier "..."[opt]
- base-specifier ->
- base-type-specifier
"virtual" access-spe"cifier[opt] base-type-specifieraccess-specifier[opt] "virtual"[opt] base-type-specifier
Can start with a templateDeclPrefix.
goal: a directive to put all following declarations in a specific scope grammar:
nested-name
Value |
|