From e9a541bbac0b1540583b694db5fd545f3702d07d Mon Sep 17 00:00:00 2001 From: mumujun Date: Tue, 2 Dec 2025 23:43:55 +0800 Subject: [PATCH 1/3] [Fix] Review and modify the comment. --- .../docs/cpp/{ => language}/comments.mdx | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) rename src/content/docs/cpp/{ => language}/comments.mdx (87%) 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. From 73885275ae0ab746d5ffc054d0524dbecda5b039 Mon Sep 17 00:00:00 2001 From: mumujun Date: Wed, 3 Dec 2025 00:21:56 +0800 Subject: [PATCH 2/3] [Fix] Add some to main_function. --- .../docs/cpp/language/main_function.mdx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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** + + From 0678ca5dc21f2ed2de13ea6f8ef0feb49cc9675f Mon Sep 17 00:00:00 2001 From: mumujun Date: Wed, 3 Dec 2025 11:32:01 +0800 Subject: [PATCH 3/3] [Fix] The deployment issue. --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) 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 }}