Re: [Development] Proposing to change https://wiki.qt.io/API_Design_Principles#Enums_in_classes to require scoped enums

2025-01-17 Thread Thiago Macieira
On Friday 17 January 2025 15:12:36 Pacific Standard Time Marco Bubke via Development wrote: > TouchPoint::Pressed -> Touch::Pressed > > enum class Touch : int { >Pressed, >... > }; > > They than could be forward declared too. As a side-effect, that means they can't be extracted by moc

Re: [Development] Proposing to change https://wiki.qt.io/API_Design_Principles#Enums_in_classes to require scoped enums

2025-01-17 Thread Marco Bubke via Development
Hi On 16.01.25 11:58, Marc Mutz via Development wrote: Hi, Groundhog Day... Like every API review, so also in 6.9, we have the discussions between proponents of scoped vs. unscoped enums in class scope. One little side note. Putting enumerations into classes can introduce a dependency. Usin

Re: [Development] Proposing to change https://wiki.qt.io/API_Design_Principles#Enums_in_classes to require scoped enums

2025-01-17 Thread Marc Mutz via Development
On 17.01.25 16:52, Allan Sandfeld Jensen wrote: > Did anyone ever suggest or put pressure on the C++ standard committee to add > strong unscoped enums? Someone did: // https://gcc.godbolt.org/z/69zWsoGP9 enum class Strong { One, Two, Three }; #ifdef __cpp_using_enum using enum Strong;

Re: [Development] Proposing to change https://wiki.qt.io/API_Design_Principles#Enums_in_classes to require scoped enums

2025-01-17 Thread Allan Sandfeld Jensen
Btw, that reminds me. Did anyone ever suggest or put pressure on the C++ standard committee to add strong unscoped enums? Best regards Allan -- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development

Re: [Development] Proposing to change https://wiki.qt.io/API_Design_Principles#Enums_in_classes to require scoped enums

2025-01-17 Thread Allan Sandfeld Jensen
On Thursday 16 January 2025 12:31:30 Central European Standard Time Tor Arne Vestbø via Development wrote: > > On Jan 16, 2025, at 11:56, Marc Mutz via Development > > wrote: > > is a very _un_-Qt-ish one. In Qt, we believe that brevity does not > > automatically equal readability¹, and the more