[Development] better compile-time os detection

Thiago Macieira thiago.macieira at intel.com
Fri Jul 24 15:55:59 CEST 2026


On Thursday, 23 July 2026 23:07:58 Pacific Daylight Time EXT Tim Blechmann via 
Development wrote:
> * no ifdef at the caller site

That benefit does not need the tag.

> * better support for hierarchies (i.e. Os::Current could be "macos", but
> would match "darwin"). one can easily introduce an overload for "macos"
> later
> * tag dispatching composes quite nicely

Can we have more examples of how tag dispatching would be useful?

Because this is a design question for the API: do we need a tag in the first 
place? Or just a set of booleans?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Principal Engineer - Intel DCG - Platform & Sys. Eng.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5176 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20260724/40a92cf5/attachment.bin>


More information about the Development mailing list