The function
main shall not be used within
a program
. A program that defines
main as
deleted or that declares
main to be
inline,
static,
constexpr, or
consteval is ill-formed
. The function
main shall not be a coroutine (
[dcl.fct.def.coroutine])
. The
main function shall not be declared with a
linkage-specification (
[dcl.link])
. A program
that declares a variable
main that belongs to the global scope, or
that declares a function
main that belongs to the global scope and
is attached to a named module, or
that declares an entity named
main
with C language linkage (in any namespace)
is ill-formed
. The name
main is
not otherwise reserved
.