July 2022

Porting my first application from Qt5 to Qt6

An overview on the issues face when porting my first application to Qt6

Porting my first Application from Qt5 to Qt6

by Jens Weller

From the article:

Just this week I had the opportunity to recompile one of my Qt Applications to build it with Qt6. Here is some of the results.

The application in question manages parts of the conference, and hence is written in Qt for the UI and uses SQLite as datastorage, so Qt also used for this and as I learned for a few other things too...

CppCon 2022 Keynote: Contemporary C++ in Action -- Daniela Engert

The third CppCon 2022 keynote has been announced! Daniela Engert is the world's top guru on C++ modules who isn't one of the compiler implementers, and will speaking about modules and so much more:

Daniela Engert live in person at CppCon 2022

Daniela Engert will be in Aurora, live in person to deliver a keynote that takes us on a journey through modern C++.

Daniela has been building computers and creating software for over forty years, with thirty years in the field of applied digital signal processing. Her recent focus has been on modules and helping developers best understand them and their application in C++20.

Here is her talk description:

Contemporary C++ in Action

This talk is different from typical conference presentations. Instead of focussing on one particular topic I want to take you with me on a journey where I put various pieces from the C++ landscape together into a small application and show how they fit together beautifully. My goal is to debunk the myth that the committee is looking to please experts and library developers instead of making life easier for the many developers in the trenches. This is not slideware, at the end of our tour the code will compile and run with some entertaining result.

On this journey, I will be visiting modules (using modularized popular libraries and others that constitute the app), do some network programming with coroutines (based on ASIO executors, as there are no C++ standard executors yet), slip in one or two of the flagship C++23 features, like explicit object parameters or some of the new library stuff, and season the stew with items from recent C++ standards. It’s a tiny application using techniques that an average programmer in the embedded or industrial world (like me) might find useful. The code I’ll show also contains very tiny fragments of condensed or simplified sources in active development taken from our in-house codebase – old and trusted, but thrust into the modern age.

Registration is now open so don’t miss out on CppCon 2022 this September 11-16. Register today! Tickets are now available for both online attendees and in-person attendees.

2022-07 Mailing Available

The 2022-07 mailing of new standards papers is now available.

 

WG21 Number Title Author Document Date Mailing Date Previous Version Subgroup
P0009R18 MDSPAN Christian Trott 2022-07-13 2022-07 P0009R17 All of WG21
P1018R17 C++ Language Evolution status pandemic edition  2022/06–2022/07 JF Bastien 2022-07-09 2022-07 P1018R16 EWG Evolution,All of WG21
P1083R6 Move resource_adaptor from Library TS to the C++ WP Pablo Halpern 2022-07-08 2022-07 P1083R5 LEWG Library Evolution
P1255R8 A view of 0 or 1 elements: views::maybe Steve Downey 2022-07-11 2022-07 P1255R7 SG9 Ranges,LEWG Library Evolution
P1642R11 Freestanding Library: Easy [utilities], [ranges], and [iterators] Ben Craig 2022-07-01 2022-07 P1642R10 CWG Core
P1684R3 mdarray: An Owning Multidimensional Array Analog of mdspan Christian Trott 2022-07-14 2022-07 P1684R2 LEWG Library Evolution
P1899R3 stride_view Christopher Di Bella, Tim Song 2022-07-10 2022-07 P1899R2 SG9 Ranges,LEWG Library Evolution
P1967R8 #embed - a simple, scannable preprocessor-based resource acquisition method JeanHeyd Meneide 2022-06-28 2022-07 P1967R7 EWG Evolution
P2047R3 An allocator-aware optional type Nina Ranns 2022-07-08 2022-07 P2047R2 LEWG Library Evolution
P2079R3 System execution context Lee Howes 2022-07-15 2022-07 P2079R2 SG1 Concurrency and Parallelism,LEWG Library Evolution
P2165R4 Compatibility between tuple, pair and tuple-like objects Corentin Jabot 2022-07-15 2022-07 P2165R3 LEWG Library Evolution
P2248R5 Enabling list-initialization for algorithms Giuseppe D'Angelo 2022-06-29 2022-07 P2248R4 SG6 Numerics,SG9 Ranges,LEWG Library Evolution
P2295R6 Support for UTF-8 as a portable source file encoding Corentin Jabot 2022-07-01 2022-07 P2295R5 SG22 Compatability,EWG Evolution
P2361R5 Unevaluated strings Corentin Jabot 2022-07-09 2022-07 P2361R4 EWG Evolution
P2374R4 views::cartesian_product Sy Brand 2022-07-13 2022-07 P2374R3 LWG Library
P2404R3 Move-only types for equality_comparable_with, totally_ordered_with, and three_way_comparable_with Justin Bassett 2022-07-08 2022-07 P2404R2 SG9 Ranges,LEWG Library Evolution,LWG Library
P2417R2 A more constexpr bitset Daniil Goncharov 2022-07-16 2022-07 P2417R1 LWG Library
P2419R2 Clarify handling of encodings in localized formatting of chrono types Victor Zverovich 2022-07-15 2022-07 P2419R1 LWG Library
P2460R2 Relax requirements on wchar_t to match existing practices Corentin Jabot 2022-07-15 2022-07 P2460R1 SG22 Compatability,CWG Core
P2474R2 views::repeat Michał Dominiak 2022-07-13 2022-07 P2474R1 SG9 Ranges,LWG Library
P2481R1 Forwarding reference to specific type/template Barry Revzin 2022-07-15 2022-07 P2481R0 EWG Evolution
P2494R2 Relaxing range adaptors to allow for move only types Michał Dominiak 2022-07-13 2022-07 P2494R1 SG9 Ranges,LWG Library
P2513R4 char8_t Compatibility and Portability Fix JeanHeyd Meneide 2022-06-26 2022-07 P2513R3 EWG Evolution
P2547R1 Language support for customisable functions Lewis Baker 2022-07-16 2022-07 P2547R0 EWG Evolution
P2548R0 copyable_function Michael Florian Hava 2022-07-13 2022-07   LEWG Library Evolution
P2549R1 std::unexpected should have error() as member accessor Yihe Li 2022-07-04 2022-07 P2549R0 LWG Library
P2561R0 operator?? Barry Revzin 2022-07-10 2022-07   EWG Evolution
P2579R0 Mitigation strategies for P2036 "Changing scope for lambda trailing-return-type" Corentin Jabot 2022-07-01 2022-07   EWG Evolution,CWG Core
P2585R1 Improving default container formatting Barry Revzin 2022-07-15 2022-07 P2585R0 LEWG Library Evolution
P2587R1 to_string or not to_string Victor Zverovich 2022-06-24 2022-07 P2587R0 SG16 Unicode
P2590R2 Explicit lifetime management Timur Doumler 2022-07-15 2022-07 P2590R1 CWG Core,LWG Library
P2592R1 Hashing support for std::chrono value classes Giuseppe D'Angelo 2022-06-30 2022-07 P2592R0 LEWG Library Evolution
P2601R1 Make redundant empty angle brackets optional Justin Cooke 2022-07-16 2022-07 P2601R0 EWG Evolution,CWG Core
P2602R1 Poison Pills are Too Toxic Barry Revzin 2022-07-11 2022-07 P2602R0 LEWG Library Evolution
P2609R1 Relaxing Ranges Just A Smidge John Eivind Helset 2022-06-29 2022-07 P2609R0 SG9 Ranges,LEWG Library Evolution
P2610R0 2022-07 Library Evolution Polls Bryce Adelstein Lelbach 2022-06-29 2022-07   LEWG Library Evolution
P2613R1 Add the missing `empty` to `mdspan` Yihe Le 2022-06-29 2022-07 P2613R0 LEWG Library Evolution
P2614R0 Deprecate numeric_limits::has_denorm Matthias Kretz 2022-07-06 2022-07   SG6 Numerics,LEWG Library Evolution
P2615R0 Meaningful exports S. Davis Herring 2022-07-01 2022-07   CWG Core
P2616R0 Making std::atomic notification/wait operations usable in more situations Lewis Baker 2022-07-05 2022-07   SG1 Concurrency and Parallelism
P2617R0 Responses to NB comments on DTS 12907 "Extensions to C++ for Transactional Memory Version 2" Jens Maurer 2022-07-15 2022-07   SG5 Transactional Memory,CWG Core
P2618R0 C++ Standard Library Issues to be moved in Virtual Plenary, Jul. 2022 Jonathan Wakely 2022-07-15 2022-07   All of WG21
P2620R0 Lifting artificial restriction on universal character names Corentin Jabot 2022-07-09 2022-07   SG16 Unicode,SG22 Compatability,EWG Evolution
P2621R0 UB? In my Lexer? Corentin Jabot 2022-07-09 2022-07   SG22 Compatability,EWG Evolution
P2622R0 Core Language Working Group "ready" Issues for the July, 2022 meeting Jens Maurer 2022-07-15 2022-07   All of WG21
P2623R0 implicit constant initialization Jarrad J. Waterloo 2022-07-13 2022-07   EWG Evolution
P2624R0 Make operations on bools more portable Justin Cooke 2022-07-16 2022-07   CWG Core

CWE Top 25 2022. Review of changes

The CWE Top 25 list reflects the most serious software security weaknesses. I invite you to read the updated top list to become aware of the changes happened over the past year.

CWE Top 25 2022. Review of changes

by Mikhail Gelvih

From the article:

Below is a table of correspondence between the CWE Top 25 2022 list and the PVS-Studio diagnostic rules, divided by programming languages. You can always check the most up-to-date table with CWE Top 25 coverage on our website.

An experimental successor to C++

An experimental successor to C++
 

About Carbon:

C++ remains the dominant programming language for performance-critical software, with massive and growing codebases and investments. However, it is struggling to improve and meet developers' needs outlined above, in no small part due to accumulating decades of technical debt. Incrementally improving C++ is extremely difficult, both due to the technical debt itself and challenges with its evolution process. The best way to address these problems is to avoid inheriting the legacy of C or C++ directly, and instead start with solid language foundations like a modern generics system, modular code organization, and consistent, simple syntax.

CppCon 2022 opening keynote: Bjarne Stroustrup, live in person

bjarne-s-300x271.jpgCppCon 2022 will kick off on Monday, September 11 with Bjarne Stroustrup delivering the traditional opening keynote live in person in Aurora. Bjarne’s annual opening keynote for CppCon is one of the most anticipated and most watch talks in C++, and among the most viewed presentations on the CppCon YouTube ChannelRegistration is open attend in person to be in the room for this keynote, to watch and submit questions live online, or do both...

Opening 2022 Keynote: C++ in Constrained Environments

Bjarne Stroustrup, live in person

C++ is widely used in constrained and/or critical applications and infrastructure components. How do we manage to use a large multi-purpose language in such environments? How can we better use facilities and techniques from modern C++ (C++11, C++14, C++17, C++20, and beyond)? The best answer is not “use only facilities available in C and C++ in 1985.”

This talk focuses on a top-down approach to achieve simplicity, maintainability, performance, and various forms of safety. It touches upon the C++ Core Guidelines, compile-time computation, type-and-resource safety, type deduction, the span and chrono standard libraries, and error handling.

Every year, Bjarne Stroustrup gives an important C++ talk in his CppCon opening keynote. Be at CppCon again this year, on-site or on-line, as Bjarne Stroustrup flies us above this complex landscape of issues and shines a spotlight on the most important things to know, and to think about, in C++ in 2022. This year we aim to leave extra extended time for real-time questions and answers with the live audience. Come to the talk, bring your questions, and don’t miss out!

Registration is now open for both online and in-person attendees so don’t miss out on CppCon 2022 this September 11-16. Register today!

CppCon 2022 opening keynote: Bjarne Stroustrup, live in person

bjarne-s-300x271.jpgCppCon 2022 will kick off on Monday, September 11 with Bjarne Stroustrup delivering the traditional opening keynote live in person in Aurora. Bjarne’s annual opening keynote for CppCon is one of the most anticipated and most watch talks in C++, and among the most viewed presentations on the CppCon YouTube ChannelRegistration is open attend in person to be in the room for this keynote, to watch and submit questions live online, or do both...

Opening 2022 Keynote: C++ in Constrained Environments

Bjarne Stroustrup, live in person

C++ is widely used in constrained and/or critical applications and infrastructure components. How do we manage to use a large multi-purpose language in such environments? How can we better use facilities and techniques from modern C++ (C++11, C++14, C++17, C++20, and beyond)? The best answer is not “use only facilities available in C and C++ in 1985.”

This talk focuses on a top-down approach to achieve simplicity, maintainability, performance, and various forms of safety. It touches upon the C++ Core Guidelines, compile-time computation, type-and-resource safety, type deduction, the span and chrono standard libraries, and error handling.

Every year, Bjarne Stroustrup gives an important C++ talk in his CppCon opening keynote. Be at CppCon again this year, on-site or on-line, as Bjarne Stroustrup flies us above this complex landscape of issues and shines a spotlight on the most important things to know, and to think about, in C++ in 2022. This year we aim to leave extra extended time for real-time questions and answers with the live audience. Come to the talk, bring your questions, and don’t miss out!

Registration is now open for both online and in-person attendees so don’t miss out on CppCon 2022 this September 11-16. Register today!

Configuration, Extension, Maintainability - Titus Winters - CppCon 2021

Registration is now open for CppCon 2022, which starts on September 11 and will again be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from last year’s conference. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2022 to attend in person, online, or both!

Configuration, Extension, Maintainability

by Titus Winters

Summary of the video:

Configurability should be considered a potential design smell, especially for systems and interfaces that will be in use for a long time. As an unfortunate result, “No, please don’t add that feature” must be a viable response to design proposals - just because a change can be made doesn’t mean it should. This is particularly challenging to square with a customer-focused product mindset: it’s hard to balance between long-term needs and immediate “the customer is always right.”

Providing options and toggles to configure settings gives users more freedom, but those settings become stale and brittle almost immediately, and regularly wind up pessimizing overall efficiency results. This is particularly true of rarely-used forms of extensibility and configuration. Of course, whatever sort of optionality and customization you provide will be hard to ever undo, because of Hyrum’s Law.

At the root of it, there is a fundamental tension between customization, extensibility, configuration vs. centralization, efficiency, and evolvability, and this tension needs to be considered when you are evaluating whether to add new customization and extensibility options. This talk will address some of the basic ways that design and invariants interact with long-term maintenance and optimization, and some heuristics for deciding whether adding a knob will turn out to be a mistake.