[Development] C++20 structural types (was: C++20 @ Qt)

Thiago Macieira thiago.macieira at intel.com
Fri Nov 4 16:49:30 CET 2022


I've just hit this: should we make some of our very simple types even simpler 
so they're structural types[1] and thus can be passed as template parameters?

For example, QFlags. I've just tried it and I get:

error: ‘QFlags<Qt::AlignmentFlag>’ is not a valid type for a template non-type 
parameter because it is not structural
note: ‘QFlags<Qt::AlignmentFlag>::i’ is not public

[1] https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0732r2.pdf
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering





More information about the Development mailing list