For anyone interested, here's a patch: https://codereview.qt-project.org/c/qt/qtbase/+/337616
-- Best Regards, Andrei ________________________________ From: Development <[email protected]> on behalf of Thiago Macieira <[email protected]> Sent: Wednesday, March 3, 2021 8:58 PM To: [email protected] <[email protected]> Subject: Re: [Development] User-defined literals for QString (and QByteArray) On Wednesday, 3 March 2021 07:53:25 PST Andrei Golubev wrote: > This is the proposal in a nutshell. I'd like to have some feedback and then > some suggestions regarding: > > * Whether we want this for QByteArray as well (similarly to QString it > allows "from raw data" construction, but then it's not really a string > class, is it?) I don't think it's necessary. That doesn't happen often enough and when it does, fromRawData is probably enough. > * What suffix to use: in the example above I used "_q", but maybe "_qs" > is better or something totally different I think _qs. > * How to call a namespace: I'd probably go with "QtLiterals" but (looking > at [2]) maybe there should be a richer hierarchy? For example, > "QtLiterals::StringLiterals", so that the suffix could be reused without > conflicts, etc. No preference. > * Whether *View classes need it (in theory they should allow implicit > construction, so probably not) No, they don't, since you can already construct them without too much typing. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel DPG Cloud Engineering _______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
_______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
