Skip to content

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.

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.

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 more Decl components.
  • 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;
(since C++11)
(until C++14)
template <class T>
constexpr std::remove_reference_t<T>&& move(T&& t) noexcept;
(since C++14)

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.

The DescList component is a general component for displaying a list of items and their descriptions.

None.

  • Default slot: One or more Desc components.
<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>
(since C99)

Complex number arithmetic

Internal component used by Desc. Not typically used directly.

The ParamDocList component displays a list of function or template parameters.

None.

  • Default slot: One or more ParamDoc components.
argc
-

Non-negative value representing the number of arguments passed to the program.

argv
-

Pointer to the first element of an array of argc + 1 pointers.

The ParamDoc component documents a single parameter.

  • name (required): The parameter name.
  • Default slot: The parameter description.

See above.

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.

The CHeader component renders an inline link to a C standard library header.

  • name (required): The header name without the .h suffix (e.g., "stdio").
  • displayName (optional): Custom display text.
  • nolink (optional): If true, renders as plain text without a link.

<stdio.h> is a C standard library header.

The CppHeader component renders an inline link to a C++ standard library header.

Same as CHeader.

<vector> is a C++ standard library header.

Base component for CHeader and CppHeader. Not used directly.

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 FeatureTestMacroValue components.
Feature test macro __cpp_consteval
Value Since Feature
201811L C++20

Immediate functions

202211L C++23

Making consteval propagate up

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.

The DRList component shows a list of defect reports.

None.

  • Default slot: One or more DR components.
CWG 1003 (C++98)
Link https://cplusplus.github.io/CWG/issues/1003.html
Applied to C++98
Behavior as published

supported parameter names of main were overly restricted

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.

The Missing component marks content that is still missing.

None.

  • Default slot: The text to mark as missing.

See this page for more information.

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 to until, 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. (since C++20) Some more words here.

This is removed in C++20. (until C++20) This applies from C++11 to C++17. (since C++11) (until C++20)

This is introduced in C++11 and deprecated since C++17.

(since C++11) (deprecated in C++17)

The RevisionBlock component renders a block-level container with revision-specific content.

  • since, until, removed, traits: Same as Revision.
  • noborder (optional): If true, removes the border.
  • vertical (optional): If true, uses vertical layout.
  • Default slot: The content.

This paragraph applies from C++11 to C++17.

(since C++11)
(until C++20)

This paragraph is introduced in C++11, deprecated in C++20.

(since C++11)
(deprecated in C++20)

The RevisionSelector component renders a dropdown for selecting a revision.

  • revisions (required): Array of CxxRevision strings.

Typically used automatically by the TableOfContents component.

Internal component used by Revision and RevisionBlock. Not used directly.

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…

The FlexTable component creates a flexible table layout using CSS flexbox.

None.

  • Default slot: The table cells.
Cell 1
Cell 2
Cell 3

The WG21PaperLink component renders a link to a WG21 paper.

  • paper (required): The paper identifier (e.g., "P1234R0").

See P1234R0 for details.