Depends on what you mean by figurative. An evil C ++ implementation may reject it on the grounds that its signature int(int,char const*const*)
is different from one of the required allowed signatures int()
and int(int,char**)
. (An evil implementation might seemingly reject auto main(int argc,char* argv[]) -> int
or, indeed, any definition of main
, where the body is not { /* ... */ }
)
However, this is not typical. I don’t know of any implementations when adding a constant will cause a problem with calling main
, and since C ++ 11 added a bit about “similar” types, you will not violate the strict anti-aliasing rule when accessing a char**
object via char const * const *
variable char const * const *
.
Thus, although the corresponding implementation may technically abandon it, I think that it will be portable for any implementation that you might want to use.
source share