August 2020

CppCon 2019: std::midpoint? How Hard Could it Be?--Marshall Clow

This year, CppCon 2020 is going virtual. The dates are still the same – September 14-18 – and we are aiming for the CppCon live event to have pretty much everything you’re familiar with at CppCon except moved online: multiple tracks including “back to basics” and a new “embedded” track; live speaker Q&A; live talk time zones friendly to Americas and EMEA (and we’re going to try to arrange around-the-clock recorded repeats in all time zones, where speakers who are available can be available for live Q&A in their repeated talks too, and we’ll do that if it’s possible – but we’re still working on it!); virtual tables where you can interact face-to-face online with other attendees just like at the physical event; virtual exhibitor spaces where you can meet the folks on your favorite product’s teams to ask them question face-to-face; pre- and post-conference classes; and even the CppCon house band playing live before every plenary session. All talk recordings will be freely available as usual on YouTube a month or two after the event, but everything else above will be available only live during CppCon week.

To whet your appetite for this year’s conference, here’s another of the top-rated talks from last year. Enjoy – and register today for CppCon 2020 – all the spirit and flavor of CppCon, this year all virtual and online!

std::midpoint? How Hard Could it Be?

by Marshall Clow

Summary of the talk:

The standards committee adopted "P0811: Well-behaved interpolation for numbers and pointers" for C++20.
It includes a new library call `std::midpoint`.
The paper says "The simple problem of computing a value between two other values is surprisingly subtle in general."

In this talk, I will explore this simple call, provide a history of the development in libc++, and show some of the pitfalls.
Undefined behavior will rear its ugly head, along with numeric representations, and the arcane C promotion rules.

Along the way, we'll talk about testing, and why writing extensive tests helps everyone.

C++17: Polymorphic Allocators, Debug Resources and Custom Types--Bartlomiej Filipek

Better memory management.

C++17: Polymorphic Allocators, Debug Resources and Custom Types

by Bartlomiej Filipek

From the article:

In my previous article on polymorphic allocators, we discussed some basic ideas. For example, you’ve seen a pmr::vector that holds pmr::string using a monotonic resource. How about using a custom type in such a container? How to enable it? Let’s see.

CppCon Selects Remo

For the best experience.

CppCon Selects Remo

From the article:

CppCon is announcing the platform that it has selected for the CppCon 2020 online conference and why it matters...

PVS-Studio 7.09

Therefore, most likely, now each release will be followed by a special note so that users don't miss changes that may be useful to them. What's interesting is that from now on we won't just list everything that was added or improved. Rather, now on the contrary, the purpose is to highlight the most important features in the news to avoid having just a boring list of changes.

PVS-Studio 7.09

by Andrey Karpov

From the article:

New general analysis diagnostics:

  •     V1059. Macro name overrides a keyword/reserved name. This may lead to undefined behavior.
  •     V1060. Passing 'BSTR ' to the 'SysAllocString' function may lead to incorrect object creation.
  •     V1061. Extending 'std' or 'posix' namespace may result in undefined behavior.
  •     V1062. Class defines a custom new or delete operator. The opposite operator must also be defined.
  •     V1063. The modulo by 1 operation is meaningless. The result will always be zero.

2020-08 mailing available

The 2020-08 mailing of new standards papers is now available.

 

WG21 Number Title Author Document Date Mailing Date Previous Version Subgroup
N4862 Business Plan and Convener's Report Herb Sutter 2020-07-29 2020-08   All of WG21
P0228R6 any_invocable Matt Calabrese, Ryan McDougall 2020-08-09 2020-08 P0228R3 LWG Library
P0881R6 A Proposal to add stacktrace library Antony Polukhin 2020-08-05 2020-08 P0881R5 LWG Library
P1787R5 Declarations and where to find them S. Davis Herring 2020-08-15 2020-08 P1787R4 CWG Core
P1875R1 Transactional Memory Lite Support in C++ Michael Spear 2020-07-30 2020-08 P1875R0 EWG Evolution
P1949R5 C++ Identifier Syntax using Unicode Standard Annex 31 Steve Downey 2020-08-15 2020-08 P1949R4 SG16 Unicode,EWG Evolution,CWG Core
P2013R2 Freestanding Language: Optional ::operator new Ben Craig 2020-08-14 2020-08 P2013R1 SG14 Low Latency,EWG Evolution,LEWG Library Evolution
P2053R1 Defensive Checks Versus Input Validation Rostislav Khlebnikov 2020-08-14 2020-08 P2053R0 SG21 Contracts,EWG Evolution,LEWG Library Evolution
P2079R1 Parallel Executor Ruslan Arutyunyan 2020-08-15 2020-08 P2079R0 SG1 Concurrency and Parallelism
P2096R2 Generalized wording for partial specializations James Touton 2020-08-17 2020-08 P2096R1 CWG Core
P2162R1 Inheriting from std::variant (resolving LWG3052) Barry Revzin 2020-08-13 2020-08 P2162R0 LEWG Library Evolution
P2187R4 std::swap_if, std::predictable Nathan Myers 2020-08-14 2020-08 P2187R3 LEWG Library Evolution
P2192R1 std::valstat - function return type Dusan B. Jovanovic 2020-08-10 2020-08 P2192R0 LEWGI SG18: LEWG Incubator
P2197R0 Formatting for std::complex Michael Tesch 2020-08-22 2020-08   LEWG Library Evolution
P2205R0 Executors Review - Polymorphic Executor Inbal Levi 2020-08-22 2020-08   LEWG Library Evolution
P2207R0 Executors review: concepts breakout group report Guy Davidson 2020-08-22 2020-08   LEWG Library Evolution
P2209R0 Bulk Schedule Lee Howes 2020-08-14 2020-08   SG1 Concurrency and Parallelism
P2210R0 Superior String Splitting Barry Revzin 2020-08-13 2020-08   LEWG Library Evolution
P2212R0 Relax Requirements for time_point::clock Alexey Dmitriev 2020-08-14 2020-08   LEWGI SG18: LEWG Incubator
P2213R0 Executors Naming Amir Kirsh 2020-08-16 2020-08   LEWG Library Evolution
P2215R0 "Undefined behavior" and the concurrency memory model Hans Boehm 2020-08-14 2020-08   SG1 Concurrency and Parallelism,SG12 Undefined and Unspecified Behavior

CppCon 2019: Path Tracing Three Ways: A Study of C++ Style--Matt Godbolt

This year, CppCon 2020 is going virtual. The dates are still the same – September 14-18 – and we are aiming for the CppCon live event to have pretty much everything you’re familiar with at CppCon except moved online: multiple tracks including “back to basics” and a new “embedded” track; live speaker Q&A; live talk time zones friendly to Americas and EMEA (and we’re going to try to arrange around-the-clock recorded repeats in all time zones, where speakers who are available can be available for live Q&A in their repeated talks too, and we’ll do that if it’s possible – but we’re still working on it!); virtual tables where you can interact face-to-face online with other attendees just like at the physical event; virtual exhibitor spaces where you can meet the folks on your favorite product’s teams to ask them question face-to-face; pre- and post-conference classes; and even the CppCon house band playing live before every plenary session. All talk recordings will be freely available as usual on YouTube a month or two after the event, but everything else above will be available only live during CppCon week.

To whet your appetite for this year’s conference, here’s another of the top-rated talks from last year. Enjoy – and register today for CppCon 2020 – all the spirit and flavor of CppCon, this year all virtual and online!

Path Tracing Three Ways: A Study of C++ Style

by Matt Godbolt

Summary of the talk:

C++ is a multi-paradigm language allowing us as developers to pick and choose among a variety of styles: procedural, functional, object oriented, hybrids, and more. How does the style of programming we choose affect code clarity, testability, ease of changes, compile time and run-time performance?

In this talk Matt will show a toy path tracer project (a form of ray tracer) implemented in three different styles: traditional object oriented, functional, and data-oriented design. He'll then compare and contrast his experiences developing in each case, showing how often the compiler is able to reduce each style to similar performing code. There's certain to be some surprises - and of course some Compiler Explorer usage!

CppCon 2019: Speed Is Found In The Minds of People--Andrei Alexandrescu

This year, CppCon 2020 is going virtual. The dates are still the same – September 14-18 – and we are aiming for the CppCon live event to have pretty much everything you’re familiar with at CppCon except moved online: multiple tracks including “back to basics” and a new “embedded” track; live speaker Q&A; live talk time zones friendly to Americas and EMEA (and we’re going to try to arrange around-the-clock recorded repeats in all time zones, where speakers who are available can be available for live Q&A in their repeated talks too, and we’ll do that if it’s possible – but we’re still working on it!); virtual tables where you can interact face-to-face online with other attendees just like at the physical event; virtual exhibitor spaces where you can meet the folks on your favorite product’s teams to ask them question face-to-face; pre- and post-conference classes; and even the CppCon house band playing live before every plenary session. All talk recordings will be freely available as usual on YouTube a month or two after the event, but everything else above will be available only live during CppCon week.

To whet your appetite for this year’s conference, here’s another of the top-rated talks from last year. Enjoy – and register today for CppCon 2020 – all the spirit and flavor of CppCon, this year all virtual and online!

Speed Is Found In The Minds of People

by Andrei Alexandrescu

Summary of the talk:

In all likelihood, sorting is one of the most researched classes of algorithms. It is a fundamental task in Computer Science, both on its own and as a step in other algorithms. Efficient algorithms for sorting and searching are now taught in core undergraduate classes. Are they at their best, or is there more blood to squeeze from that stone? This talk will explore a few less known – but more allegro! – variants of classic sorting algorithms. And as they say, the road matters more than the destination. Along the way, we'll encounter many wondrous surprises and we'll learn how to cope with the puzzling behavior of modern complex architectures.