[Development] API style guide: scoped enum or not?
Marc Mutz
marc.mutz at qt.io
Fri May 5 06:43:01 CEST 2023
On 04.05.23 19:35, André Somers wrote:
[...]
> Other fallout would be that currently A, B, and C will most often
> include E in their name. That makes for the code becoming
>
> E::EA, E::EB, E::EC or E::AE, E::BE, E::CE. I don't like that. Do you
> think there also is tooling to go to a renamed version w/o the enum
> name? Or would it be feasible to add such tooling?
Since the rename is specific to the enum at hand, there's no hope that
such tooling exists today. However, simple semantic symbol replacement
is an easy thing to implement in clang-tidy, yes. That could be
accompanied by Thiago's memory_order trick and Q_DECL_DEPRECATED.
Thanks,
Marc
--
Marc Mutz <marc.mutz at qt.io>
Principal Software Engineer
The Qt Company
Erich-Thilo-Str. 10 12489
Berlin, Germany
www.qt.io
Geschäftsführer: Mika Pälsi, Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin,
Registergericht: Amtsgericht Charlottenburg,
HRB 144331 B
More information about the Development
mailing list