Const (computer programming): Difference between revisions

Content deleted Content added
Added a note about how the strchr issue could have been worked around in C11.
Line 305:
char*: strchr_m, \
const char*: strchr_c \
)(X,Y)</syntaxhighlight>C23'sHowever, actualthis solution doesis not usehow <code>_Generic</code>C23 butsolves isthe essentiallyissue.<ref equivalent.name="N3020"/>}} since C does not have function overloading, and instead, this is handled by having a single function where the input is constant but the output is writable:
<syntaxhighlight lang=cpp>
char *strchr(char const *s, int c);