June 2022

Assignment for optional--Barry Revzin

Highly non trivial.

Assignment for optional<T>

by Barry Revzin

From the article:

Let’s talk about assignment for optional<T>. I realize this is a fraught topic, but I want to try to build up proper intuition about how assignment has to work, especially since the debate around this topic has been fairly underwhelming. This post will almost exclusively discuss copy assignment (i.e. the one that takes an optional<T> const&), since everything just follows from that...

Writing a sort comparison function--Raymond Chen

How do you do it?

Writing a sort comparison function part 1, part 2, part 3, part 4

by Raymond Chen

From the article:

I’ve noted in the past that a sort comparison function must follow certain rules, and if you violate those rules, very strange things happen. So what are some patterns for writing sort comparison functions that don’t break the rules?

Most of the time, sorting can be reduced to key comparison: From each element being sorted, you generate a sort key, and those sort keys are compared against each other...

Reminder: 2022 Annual C++ Developer Survey "Lite" closes tomorrow


Day-before reminder: Survey closes tomorrow. If you haven't already, please take 10 minutes to help inform the committee and community.

Original announcement last week:

The Standard C++ Foundation's annual global C++ developer survey is now open. As the name suggests, it's a one-pager:

2022 Annual C++ Developer Survey "Lite"

Please take 10 minutes or so to participate! A summary of the results, including aggregated highlights of common answers in the write-in responses, will be posted publicly here on isocpp.org and shared with the C++ standardization committee to help inform C++ evolution.

The survey closes in one week tomorrow.

Thank you for participating and helping to inform our committee and community.