static constexpr inline ...sounds right, anything else sounds wrong to me. ________________________________ Von: Development <development-boun...@qt-project.org> im Auftrag von Thiago Macieira <thiago.macie...@intel.com> Gesendet: Mittwoch, 18. September 2024 17:18 An: development@qt-project.org <development@qt-project.org> Betreff: [Development] (Bikeshed, pedantic) East constexpr vs West constexpr
Which one are we? That is, constexpr inline foobar or inline constexpr foobar I prefer the former. And then there's the question of the ordering when static is present too. Data: we prefer to write "static inline" at 9:1 $ git sgrep 'static inline' \* '!*/3rdparty/*' | wc -l 4199 $ git sgrep 'inline static' \* '!*/3rdparty/*' | wc -l 464 and we prefer "static constexpr" at 18:1: $ git sgrep 'static constexpr' \* '!*/3rdparty/*' | wc -l 3344 $ git sgrep 'constexpr static' \* '!*/3rdparty/*' | wc -l 181 We have a 4:1 preference to constexpr inline: $ git sgrep 'constexpr inline' \* '!*/3rdparty/*' | wc -l 1273 $ git sgrep 'inline constexpr' \* '!*/3rdparty/*' | wc -l 341 And there are a couple of places using all three: $ git sgrep 'static constexpr inline' \* '!*/3rdparty/*' | wc -l 57 $ git sgrep 'static inline constexpr' \* '!*/3rdparty/*' | wc -l 53 $ git sgrep 'inline static constexpr' \* '!*/3rdparty/*' | wc -l 16 $ git sgrep 'inline constexpr static' \* '!*/3rdparty/*' | wc -l 0 $ git sgrep 'constexpr inline static' \* '!*/3rdparty/*' | wc -l 0 $ git sgrep 'constexpr static inline' \* '!*/3rdparty/*' | wc -l 13 -- Thiago Macieira - thiago.macieira (AT) intel.com Principal Engineer - Intel DCAI Platform & System Engineering
-- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development