[Development] Qt UDL operators

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Mon Apr 4 17:07:39 CEST 2022


Hi,

Il 04/04/22 15:53, Sona Kurazyan ha scritto:
> I see two main issues with keeping both:
> 
> - If we want to add UDLs with same names for different domains in future, adding the "q"-prefixed counterparts will be problematic. For example, let's say we want to add Qt::inline Literals::inline OtherDomain::_s, what should be the "q"-prefixed version of it? We can name it to something like _qXs, where X is some domain specific letter, but it will require even more typing, and make the name inconsistent with Qt::inline Literals::inline OtherDomain::_s.

I'm not sure how this work: unless the new _s takes another kind input 
(e.g. number literals), you can't add it no matter what, as users under 
"using namespace Qt;" would then get a conflict...?


> 
> - We will have multiple ways of doing the same thing, and I assume, it might be confusing for users.

Sure thing, that's why I'm OK at deprecating one of the two.

Thanks,

-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20220404/70d547e3/attachment.bin>


More information about the Development mailing list