[Development] C++20 comparisons @ Qt (was: Re: C++20 @ Qt)

Ivan Solovev ivan.solovev at qt.io
Wed Sep 20 19:03:22 CEST 2023


> We did _not_ deprecate qSwap().

Well, the source code shows that it _is_ deprecated:
<https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qswap.qdoc>
https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qswap.qdoc

I was not able to find a documentation page for qSwap in Qt 6.5,
but here's the link to 6.2: https://doc.qt.io/qt-6.2/qtalgorithms-obsolete.html#qSwap

------------------------------

Ivan Solovev
Senior Software Engineer

The Qt Company GmbH
Erich-Thilo-Str. 10
12489 Berlin, Germany
ivan.solovev at qt.io
www.qt.io

Geschäftsführer: Mika Pälsi,
Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin,
Registergericht: Amtsgericht
Charlottenburg, HRB 144331 B
________________________________
From: Development <development-bounces at qt-project.org> on behalf of Marc Mutz via Development <development at qt-project.org>
Sent: Wednesday, September 20, 2023 5:25 PM
To: development at qt-project.org <development at qt-project.org>
Subject: Re: [Development] C++20 comparisons @ Qt (was: Re: C++20 @ Qt)

On 20.09.23 14:42, Ivan Solovev via Development wrote:
> We have deprecated qSwap()

FTR:

We did _not_ deprecate qSwap(). We banned it from inline Qt code when we
know we can use one of the other ways:

- lhs.swap(rhs);
- std::swap(lhs, rhs);
- qt_ptr_swap(lhs, rhs);

We still use it in generic code, e.g. QList().

--
Marc Mutz <marc.mutz at qt.io>
Principal Software Engineer

The Qt Company
Erich-Thilo-Str. 10 12489
Berlin, Germany
https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.qt.io%2F&data=05%7C01%7Civan.solovev%40qt.io%7C39da86d7aa2a4531845d08dbb9ee2348%7C20d0b167794d448a9d01aaeccc1124ac%7C0%7C0%7C638308204676895209%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=wQIWQCOhPEs0IiKdpvAgU1pOqotlP3eOSFHFr%2B7UdFM%3D&reserved=0<http://www.qt.io/>

Geschäftsführer: Mika Pälsi, Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin,
Registergericht: Amtsgericht Charlottenburg,
HRB 144331 B

--
Development mailing list
Development at qt-project.org
https://lists.qt-project.org/listinfo/development
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20230920/91941651/attachment-0001.htm>


More information about the Development mailing list