C++ Logo

SG12

Advanced search

Subject: Re: [ub] What does "The function main shall not be used within a program" mean?
From: Ville Voutilainen (ville.voutilainen_at_[hidden])
Date: 2014-01-22 04:07:59


On 22 January 2014 09:13, Stephen Clamage <stephen.clamage_at_[hidden]> wrote:
> All issues of the standard explicitly forbid calling main recursively, in 5.2.2/9.

Thanks. Minor nit: it says
"Recursive calls are permitted, except to the function named main (3.6.1)."
Since there's that cross-reference, it's otherwise correct, but I'd prefer it
to say "to the main function" instead of "to the function named main", since
nothing prevents me from having functions named main in user-defined namespaces
or as member functions of classes. That's perhaps not a topic for this
particular
study group, though.


SG12 list run by herb.sutter at gmail.com