Search Results

Search found 1 results on 1 pages for 'pt2cv'.

Page 1/1 | 1 

  • Const-Qualification of Main's Parameters in C++

    - by pt2cv
    The C++ standard mandates that all conforming implementations support the following two signatures for main: int main(); int main(int, char*[]); In case of the latter signature, would the addition of (top-level) const-ness break any language rules? For example: int main(const int argc, char** const argv); From my understanding, top-level const qualification doesn't affect the function's signature hash, so it should be legal as far as the specification is concerned. Also, did anyone ever encounter an implementation which rejected this type of modification?

    Read the article

1