libcmdf icon indicating copy to clipboard operation
libcmdf copied to clipboard

reserved identifier violation

Open elfring opened this issue 1 year ago • 2 comments

I would like to point out that a prefix like “cmdf__does eventually not fit to the expected naming convention of the C++ language standard. Would you like to adjust your selection for unique names?

elfring avatar Dec 19 '22 13:12 elfring

Hi @elfring, thank you for the comment.

The naming convention is indeed not very C++ friendly; it was done so because the library was meant to be used from C, and C++ support was only added afterwards.

Changing the naming convention to remove the cmdf__ prefix will break the C API, so I prefer not to do so, even at the expense of violating the standard's recommendations.

I am leaving this issue open, and any ideas will be greatly appreciated.

ronen25 avatar Dec 25 '22 14:12 ronen25

…, so I prefer not to do so,

Double underscores may be used at some places also for C identifiers.

even at the expense of violating the standard's recommendations.

:thought_balloon: Should such an implementation detail be reconsidered any more if questionable identifiers might be reused also for C++ software components?

elfring avatar Dec 25 '22 14:12 elfring