This episode is the last of this mini series about C++ templates.
So this is what we have been building up to in the previous three episodes, namely understanding a relatively complex piece of template code.
The code presented here is a version of transform that has a few changes compared to the standard version:
(1) It take a container as argument instead of two iterators and (2) it returns a container with the transformed values.
The key thing in here, however, is that it will either create the result container and return that, or it will reuse the input container.
The reuse is in case the result container and input container is the same type, and the input container is an r-value.
Links:
* Our scheduled trainings: [ Ссылка ]
* Our onsite trainings: [ Ссылка ]
0:00 The end goal - kdalgorithms::transform
1:28 transform without the optimization
3:24 Understanding the tests
5:50 Why an in person training - over just learning from you tube
7:33 Debugging with the mata-programming doesn't work
12:30 transform in C++17
15:37 std::forward
17:30 if constexr
19:28 transform in C++14 - using tag dispatching
23:33 Outro and special thank you's
The example code showcased in this video is available here: [ Ссылка ]
The video is presented by Jesper Pedersen, who started with Qt back when Qt was widgets only and the version was 1.44, which gives him 21 years of experience with Qt. Since 2000 he has taught almost 100 Qt classes, ranging from Qt Widgets to QML. Heck, Jesper even taught a few classes on QTopia Core — Trolltech's initial attempt at creating a phone stack. Today Jesper holds a fancy business title, but that doesn't prevent him from coding both in his job and in his spare time.
Every month our newsletter is featuring technical blogs on Qt, C++ and 3D topics: [ Ссылка ]
About KDAB:
KDAB offers experienced software experts to help you deliver functional, high-performing and innovative software across embedded, mobile and desktop platforms for projects using C++, Qt, QML/Qt Quick, OpenGL, Qt 3D and more. [ Ссылка ]
KDAB experts regularly take time out to deliver KDAB’s world class training, in-house or at open enrolment courses around the world. We are the market leaders for training in Qt, OpenGL and C++.
Contact us to find out more at training@kdab.com or visit our website: [ Ссылка ]
We are about 90 people, located all around the world. Our Head Office is in Sweden and we have other offices in Germany, France, the UK and the USA. [ Ссылка ]
Ещё видео!