[Development] (Bikeshed, pedantic) East constexpr vs West constexpr

Ville Voutilainen ville.voutilainen at gmail.com
Fri Sep 20 11:51:09 CEST 2024


On Thu, 19 Sept 2024 at 17:35, Volker Hilsheimer via Development
<development at qt-project.org> wrote:
> My preference would be "static constexpr inline”, as static is the most important piece of information (storage and calling convention in case of member functions), constexpr is “good to know”, and inline is in practice mostly an implementation detail.
>
> It also has the advantage that it keeps code grep-friendly, i.e. I can search for anything “static constexpr” (which for out-of-lined members is the clear preference in existing code), and find everything, even if it’s also inline.

+1 for the order.

I can easily find people who think the constexpr is more important
than the static, because that tells the reader that constant
initialization is going
to be performed. But that doesn't change my take on the order.


More information about the Development mailing list