From abf0a1c9a81c0423cea70f9bb31449cf0d45ef02 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Wed, 3 Dec 2025 14:47:02 +0800 Subject: [PATCH] fix: fix revbox for prohibition of deleted definition of `main` "Defined as deleted" should be wrapped in the rev box as a whole. --- src/content/docs/cpp/language/main_function.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/cpp/language/main_function.mdx b/src/content/docs/cpp/language/main_function.mdx index 9e75a35d..576a6d35 100644 --- a/src/content/docs/cpp/language/main_function.mdx +++ b/src/content/docs/cpp/language/main_function.mdx @@ -81,7 +81,7 @@ The `main` function has several restrictions (violation of which renders the pro - its address cannot be taken - it cannot be used in a `typeid` expression or a `decltype` specifier - It cannot be predefined and cannot be overloaded: effectively, the name `main` in the global namespace is reserved for functions (although it can be used to name classes, namespaces, enumerations, and any entity in a non-global namespace, except that an entity named `main` cannot be declared with C language linkage in any namespace). -- It cannot be defined as deleted or declared with any language linkage, constexpr, consteval, inline, or static. +- It cannot be defined as deleted or declared with any language linkage, constexpr, consteval, inline, or static. - The return type of the `main` function cannot be deduced (`auto main() {...}` is not allowed). - The `main` function cannot be a coroutine. - The `main` function cannot attach to a named module.