Chaining Comparisons: Seeking Information from the Audience--Barry Revzin

A nice example of committee members reaching out to the community for data/input on proposed changes that could have a breaking impact.

Chaining Comparisons: Seeking Information from the Audience

by Barry Revzin

From the article:

At the last standards committee meeting in Albuquerque, the spaceship operator was adopted into the working draft for what will eventually be C++20. I’m already pretty excited about that. But one of the initial “optional” parts of Herb Sutter’s original spaceship proposal (which was dropped early) was to support chaining comparisons...

Report from using std::cpp 2017 -- Daniel Garcia

Last November, 30th we had the 5th edition of using std::cpp (the annual C++ conference in Spain). Around 200 people gathered for a one-day event of C++ talks.

Using std::cpp 2017 Conference Report

by Daniel Garcia

From the report:

We used the evaluation forms to survey what people is using in their daily job. And we got some pleasent surprises about new standards adoption. It seems C++98/03 usage is going down!

 

Quick Q: Function not called in code gets called at runtime

Quick A: undefined behaviour can result in anything.

Recently on SO:

Function not called in code gets called at runtime

The program contains undefined behavior, as dereferencing a null pointer (i.e. calling foo() in main without assigning a valid address to it beforehand) is UB, therefore no requirements are imposed by the standard.

Executing never_called at runtime is a perfect valid situation when undefined behavior has been hit, it's as valid as just crashing (like when compiled with GCC). Okay, but why is Clang doing that? If you compile it with optimizations off, the program will no longer output "formatting hard disk drive", and will just crash...

Quick Q: Confused about vectors

Quick A: Do not confuse mathematical concepts with C++ terminology.

Recently on SO:

Confused about vectors

You are getting confused because the mathematical concept of a vector can mean a "collection of data" and that is what you were taught int v[10] was. The actual name for that in C++ (and most other languages) is an "array" not a vector.

The libraries referred to in C++ Primer have a class called "vector" which is an implementation of an array. They are similar, but not the same.

I hope that clears that up a bit. You are probably confused because you were taught that int v[10] is a vector, but it is "not really" in C++. It's an array. Use that term to refer to it. If you ever refer to it as a vector, you will confuse others and yourself.

CppCast Episode 132: Boost Application Development with Antony Polukhin

Episode 132 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Antony Palukhin to talk about some of the Boost libraries he's contributed to including Any, Conversion, DLL, LexicalCast, Stacktrace, TypeTraits and Variant; as well as his Boost Application Development book.

CppCast Episode 132: Boost Application Development with Antony Polukhin

by Rob Irving and Jason Turner

About the interviewee:

Antony Polukhin was born in Russia. Since university days he started contributing to Boost and became a maintainer of the Boost.LexicalCast library. Today, he works for Yandex, helps Russian speaking people with C++ standardization proposals, consults Russian companies in C++, continues to contribute to the open source and to the C++ language in general. You may find his code in Boost libraries such as Any, Conversion, DLL, LexicalCast, Stacktrace, TypeTraits, Variant, and others.

C++ Tips of the Week

Google's internal C++ tips are going public:

Abseil Publishing Google's C++ "Tips of the Week"

By Tom Manshreck, Abseil and C++ Tech Writer

From the article:


Background: About five years ago, within Google we started publishing a series of C++ tips, about once a week, that became known as the “C++ Tips of the Week” (TotW). They became wildly successful, and we are still publishing them to this day (indicating that a language as rich as C++ will not deplete us of topics anytime soon).

Not only do we discuss the finer points of the language, but in true “tip” fashion, offer our advice or design preferences. The collective set of C++ TotW has become a canon within Google itself, cited thousands of times per week in code reviews and internal mailing list discussions. Often they are cited by number, and some have become known simply as “totw/110” or “totw/77”.

We’ve decided to expose most of these tips to the Abseil development community, and the C++ community at large.