Component Documentation for LLM
This document provides comprehensive documentation for all custom components used in CppDoc. Each section includes a description, props, and usage examples.
Behavior
Section titled “Behavior”The Behavior component gives highlight colors to its content, used for emphasizing keywords related to program behaviors.
kind(required): One of"well-def","impl-def","unspec","undef","ill-formed","ifndr".
It is well-defined to do this.
It is implementation-defined how this is achieved.
It is unspecified which function argument will be evaluated first.
The behavior is undefined to add two signed integers that overflows the result.
It is ill-formed to use an undefined identifier.
The program is ill-formed no diagnostics required if it violates the one-definition rule.
Declaration Documentation
Section titled “Declaration Documentation”DeclDoc
Section titled “DeclDoc”The DeclDoc component gives brief introduction to a C/C++ declaration. It can contain multiple Decl components.
autorevSince(optional): The revision since which the declaration is available (e.g.,"C++11"). Enables autorev.id(optional): A numeric identifier to display as “Declaration #id”.
decl(named): One or moreDeclcomponents.- Default slot: The description text.
int main() { /* body */ }A main function running independently of environment-provided arguments.
Multiple declarations:
int main() { /* body */ }int main(int argc, char *argv[]) { /* body */ }A main function is the entry point of a program.
With revision:
template <typename T>typename std::remove_reference<T>::type&& move(T&& t) noexcept;template <class T>constexpr std::remove_reference_t<T>&& move(T&& t) noexcept;std::move is used to indicate that an object t may be “moved from”.
The Decl component wraps a code block inside a DeclDoc. It has no props.
See above.
Description List
Section titled “Description List”DescList
Section titled “DescList”The DescList component is a general component for displaying a list of items and their descriptions.
None.
- Default slot: One or more
Desccomponents.
<assert.h> Conditionally compiled macro that compares its argument to zero
<ctype.h> Functions to determine the type contained in character data
The Desc component represents a single item in a description list.
autorevSince(optional): Enables autorev for this item.kind(optional): A string displayed in parentheses after the description.
item(named): The item being described (e.g., a header link).- Default slot: The description text.
<assert.h> Conditionally compiled macro that compares its argument to zero
With revision:
<complex.h> Complex number arithmetic
DescItem
Section titled “DescItem”Internal component used by Desc. Not typically used directly.
Parameters
Section titled “Parameters”ParamDocList
Section titled “ParamDocList”The ParamDocList component displays a list of function or template parameters.
None.
- Default slot: One or more
ParamDoccomponents.
argcNon-negative value representing the number of arguments passed to the program.
argvPointer to the first element of an array of argc + 1 pointers.
ParamDoc
Section titled “ParamDoc”The ParamDoc component documents a single parameter.
name(required): The parameter name.
- Default slot: The parameter description.
See above.
DocLink
Section titled “DocLink”The DocLink component renders an inline link to a page associated with a doc key or absolute path.
src(required): The doc key (e.g.,"cpp.library.utilities.move") or absolute path (e.g.,"/cpp/library/utilities/move").
- Default slot: The link text.
Check out this page for more information.
Check out this page for more information.
If the doc key does not exist, the component renders as plain text with missing styling.
CHeader
Section titled “CHeader”The CHeader component renders an inline link to a C standard library header.
name(required): The header name without the.hsuffix (e.g.,"stdio").displayName(optional): Custom display text.nolink(optional): Iftrue, renders as plain text without a link.
<stdio.h> is a C standard library header.
CppHeader
Section titled “CppHeader”The CppHeader component renders an inline link to a C++ standard library header.
Same as CHeader.
<vector> is a C++ standard library header.
Header
Section titled “Header”Base component for CHeader and CppHeader. Not used directly.
Feature Test Macros
Section titled “Feature Test Macros”FeatureTestMacro
Section titled “FeatureTestMacro”The FeatureTestMacro component renders a box that shows information about a feature test macro.
name(required): The macro name (e.g.,"__cpp_consteval").
- Default slot: One or more
FeatureTestMacroValuecomponents.
Feature test macro __cpp_consteval
| Value | Since | Feature |
|---|---|---|
| 201811L | C++20 | Immediate functions |
| 202211L | C++23 | Making |
FeatureTestMacroValue
Section titled “FeatureTestMacroValue”The FeatureTestMacroValue component represents a single value of a feature test macro.
value(required): The macro value (e.g.,"201811L").since(required): The revision since which this value is defined (e.g.,"C++20").
- Default slot: The feature description.
See above.
Defect Reports
Section titled “Defect Reports”DRList
Section titled “DRList”The DRList component shows a list of defect reports.
None.
- Default slot: One or more
DRcomponents.
CWG 1003 (C++98)
| Link | https://cplusplus.github.io/CWG/issues/1003.html |
|---|---|
| Applied to | C++98 |
| Behavior as published | supported parameter names of |
| Correct behavior | all valid parameter names are supported |
The DR component renders a single defect report.
kind(required): Either"cwg"(Core Working Group) or"lwg"(Library Working Group).id(required): The defect report number.std(required): The standard revision to which the defect applies (e.g.,"C++98").
behavior-published(named): Description of the behavior as published.correct-behavior(named): Description of the correct behavior.
See above.
Missing Content
Section titled “Missing Content”Missing
Section titled “Missing”The Missing component marks content that is still missing.
None.
- Default slot: The text to mark as missing.
See this page for more information.
Revision Components
Section titled “Revision Components”Revision
Section titled “Revision”The Revision component renders an inline span with revision-specific content.
since(optional): The revision since which the content applies.until(optional): The revision until which the content applies.removed(optional): Alternative tountil, indicates removal revision.traits(optional): Array of{ trait: string, since: CxxRevision }for traits like “deprecated”.
- Default slot: The revision-specific content.
Some words here. This is introduced in C++20. Some more words here.
This is removed in C++20. This applies from C++11 to C++17.This is introduced in C++11 and deprecated since C++17.
RevisionBlock
Section titled “RevisionBlock”The RevisionBlock component renders a block-level container with revision-specific content.
since,until,removed,traits: Same asRevision.noborder(optional): Iftrue, removes the border.vertical(optional): Iftrue, uses vertical layout.
- Default slot: The content.
This paragraph applies from C++11 to C++17.
This paragraph is introduced in C++11, deprecated in C++20.
RevisionSelector
Section titled “RevisionSelector”The RevisionSelector component renders a dropdown for selecting a revision.
revisions(required): Array ofCxxRevisionstrings.
Typically used automatically by the TableOfContents component.
RevisionTags
Section titled “RevisionTags”Internal component used by Revision and RevisionBlock. Not used directly.
AutoCollapse
Section titled “AutoCollapse”The AutoCollapse component automatically collapses content that exceeds a maximum height, with an expand button.
maxHeight(optional): Maximum height in pixels before collapsing (default: 200).
- Default slot: The content to collapse.
Long content here…
FlexTable
Section titled “FlexTable”The FlexTable component creates a flexible table layout using CSS flexbox.
None.
- Default slot: The table cells.
WG21PaperLink
Section titled “WG21PaperLink”The WG21PaperLink component renders a link to a WG21 paper.
paper(required): The paper identifier (e.g.,"P1234R0").
See P1234R0 for details.