Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 404 Bytes

6.53.md

File metadata and controls

18 lines (12 loc) · 404 Bytes

(a)

int calc(int&, int&);
int calc(const int&, const int&);
// OK, overloaded function takes reference to `const`

(b)

int calc(char*, char*);
int calc(const char*, const char*);
// OK, overloaded function takes pointer to `const`

(c)

int calc(char*, char*);
int calc(char* const, char* const);
// Error, redeclare the same function, top-level `const` is ignored