...
When attempting to const-qualify a type as part of a declaration that uses reference type, a programmer may accidentally write:
| Code Block | ||||
|---|---|---|---|---|
| ||||
char &const p; |
instead of:
| Code Block | ||||
|---|---|---|---|---|
| ||||
char const &p; // Or: const char &p; |
...
...
When attempting to const-qualify a type as part of a declaration that uses reference type, a programmer may accidentally write:
| Code Block | ||||
|---|---|---|---|---|
| ||||
char &const p; |
instead of:
| Code Block | ||||
|---|---|---|---|---|
| ||||
char const &p; // Or: const char &p; |
...