Skip to content

Commit 342d740

Browse files
fix: fix revbox for prohibition of deleted definition of main (#50)
1 parent 7b77804 commit 342d740

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/docs/cpp/language/main_function.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ The `main` function has several restrictions (violation of which renders the pro
8181
- its address cannot be taken
8282
- it cannot be used in a <Missing>`typeid`</Missing> expression <Revision since="C++11">or a <Missing>`decltype`</Missing> specifier</Revision>
8383
- 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 <Missing>language linkage</Missing> in any namespace).
84-
- It cannot be defined <Revision since="C++11">as deleted or</Revision> declared with any language linkage<Revision since="C++11">, <Missing>constexpr</Missing></Revision><Revision since="C++20">, <Missing>consteval</Missing></Revision>, <Missing>inline</Missing>, or <Missing>static</Missing>.
84+
- It cannot be <Revision since="C++11">defined as deleted or</Revision> declared with any language linkage<Revision since="C++11">, <Missing>constexpr</Missing></Revision><Revision since="C++20">, <Missing>consteval</Missing></Revision>, <Missing>inline</Missing>, or <Missing>static</Missing>.
8585
- <Revision since="C++14">The return type of the `main` function cannot be deduced (`auto main() {...}` is not allowed).</Revision>
8686
- <Revision since="C++20">The `main` function cannot be a <Missing>coroutine</Missing>.</Revision>
8787
- <Revision since="C++20">The `main` function cannot attach to a named <Missing>module</Missing>.</Revision>

0 commit comments

Comments
 (0)