Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Find what you need - explore our website and developer resources
2 February 2022
Close your eyes and imagine some of your most complex code. In that code, you likely calculate a lot of values. But for some code paths, they might not even be needed. It is, however, too difficult to untangle the code. So, the values are really only calculated when needed, and only so one time. In this video, I discuss a class I've implemented to tackle that exact problem.
Ivan Čukić's book covers lazy value on page 122: https://www.amazon.com/Functional-Programming-programs-functional-techniques/dp/1617293814
Details on class template argument deduction: https://en.cppreference.com/w/cpp/language/class_template_argument_deduction
The example code showcased in this video is available here: https://github.com/KDAB/kdabtv/tree/master/Qt-Widgets-and-more/LazyValue
All Qt Widgets and more videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Learn Modern C++
Our hands-on Modern C++ training courses are designed to quickly familiarize newcomers with the language. They also update professional C++ developers on the latest changes in the language and standard library introduced in recent C++ editions.
Learn more