According to the standard in 3.6.1/3, it’s not :
The function
main
shall not be used
(3.2) within a program
The definition of used being :
An object or non-overloaded
function is used if its name appears in a potentially-evaluated expression.
More Related Contents:
- What is the proper declaration of main in C++?
- Difference between void main and int main in C/C++? [duplicate]
- Using paragraphs 8.5.3p4 and p5 in the C++11 Standard, how do I prove that the snippet below doesn’t compile?
- divide a number by 2 recursively
- Function Recurssion: [duplicate]
- How can this code be reversed? (recursion)
- C++ throwing exception in recursive algorithm
- Why aren’t variable-length arrays part of the C++ standard?
- Where do I find the current C or C++ standard documents?
- What are the new features in C++17?
- What’s the difference between __PRETTY_FUNCTION__, __FUNCTION__, __func__?
- Where exactly does C++ standard say dereferencing an uninitialized pointer is undefined behavior?
- Why SDL defines main macro?
- Is main() really start of a C++ program?
- Tail recursion in C++
- A most vexing parse error: constructor with no arguments
- Why does C++ output negative numbers when using modulo?
- Can the arguments of main’s signature in C++ have the unsigned and const qualifiers? [duplicate]
- Computing length of a C string at compile time. Is this really a constexpr?
- Is the order of iterating through std::map known (and guaranteed by the standard)?
- Stack overflow caused by recursive function
- Defining a variable in the condition part of an if-statement?
- Base pointer to array of derived objects
- Standard Library Containers with additional optional template parameters?
- Is auto_ptr deprecated?
- Creating N nested for-loops
- Can I legally reinterpret_cast between layout-compatible standard-layout types?
- Recursion in c++ Factorial Program
- Does the C++ standard specify anything on the representation of floating point numbers?
- Do pointers to string literals remain valid after a function returns?