diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 44468c3..5bafafa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,6 +26,7 @@ jobs: deploy: needs: build runs-on: ubuntu-latest + if: github.repository == 'cppdoc-cc/cppdoc' environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} diff --git a/src/content/docs/cpp/comments.mdx b/src/content/docs/cpp/language/comments.mdx similarity index 87% rename from src/content/docs/cpp/comments.mdx rename to src/content/docs/cpp/language/comments.mdx index e843c69..681f233 100644 --- a/src/content/docs/cpp/comments.mdx +++ b/src/content/docs/cpp/language/comments.mdx @@ -1,27 +1,35 @@ --- title: Comments description: Auto‑generated from cppreference +cppdoc: + keys: ["cpp.lang.comments"] --- import { Desc, DescList, DocLink } from '@components/index'; - -# Comments +import { Decl, DeclDoc } from "@components/decl-doc"; Comments serve as a sort of in-code documentation. When inserted into a program, they are effectively ignored by the compiler; they are solely intended to be used as notes by the humans that read source code. Although specific documentation is not part of the C++ standard, several utilities exist that parse comments with different documentation formats. ## Syntax -#### Block Comment -Often known as "C-style" or "multi-line" comments. - -``` -/* comment */ -``` -#### Single-line Comment -Often known as "C++-style" or "single-line" comments. -``` -// comment -``` + + + ```cpp + /* comment */ + ``` + + + Often known as "C-style" or "multi-line" comments. + + + + + ```cpp + // comment + ``` + + Often known as "C++-style" or "single-line" comments. + All comments are removed from the program at translation phase 3 by replacing each comment with a single whitespace character. diff --git a/src/content/docs/cpp/language/main_function.mdx b/src/content/docs/cpp/language/main_function.mdx index 50a2536..9e75a35 100644 --- a/src/content/docs/cpp/language/main_function.mdx +++ b/src/content/docs/cpp/language/main_function.mdx @@ -9,6 +9,7 @@ import Code from "@astrojs/starlight/components"; import Behavior from "@components/Behavior.astro"; import { Decl, DeclDoc } from "@components/decl-doc"; import { DR, DRList } from "@components/defect-report"; +import { Desc, DescList, DocLink } from '@components/index'; import Missing from "@components/Missing.astro"; import { ParamDoc, ParamDocList } from "@components/param-doc"; import { Revision } from "@components/revision"; @@ -131,8 +132,16 @@ argv[3] == 0 ## References -- C++23 standard (ISO/IEC 14882:2024): + + +
+ Extended Content +
+
+ +- C++23 standard (ISO/IEC 14882:2024) - 6.9.3.1 main function [basic.start.main] +
## Defect reports @@ -175,3 +184,11 @@ The following behavior-changing defect reports were applied retroactively to pre + +## See also + + + + C documentation for **main function** + +