Well, how about this (3.6.1):
The program must contain the global function main, which is the designated start of the program. [...] This function should not be overloaded. It must have a return type of int, but otherwise its type is determined by the implementation.
Since templates are not functions, I donβt think you have a choice in this matter. In particular, the function should be main , not main<> , as in your example; and your main not a function, but a template that rules out the existence of another function called main .
Kerrek SB
source share