Why 4 Bloomberg engineers wrote another C++ book -- Tech At Bloomberg

This article features an interview to the four authors of the newly released "Embracing Modern C++ Safely" book, motivating the surprising decision to analyze C++11 and C++14 in-depth in 2021, and discussing the contents and style of the publication.

Why 4 Bloomberg engineers wrote another C++ book

Tech At Bloomberg

From the article:

But why do we need yet another C++ book? After all, one of the book’s principal authors, John Lakos, has already written two. And why now? Why Bloomberg? Who is this for? But first, why modern C++? [...] The authors limited the book to features with which they have accumulated more than five years of experience. The current edition is an authoritative summary of C++11 and C++14 features, and future editions are planned to cover C++17 and C++20.

(Note that "Embracing Modern C++ Safely" is on sale (up to 55% off) until February 26.)

On finding the average of two unsigned integers without overflow--Raymond Chen

How did you solve it?

On finding the average of two unsigned integers without overflow

by Raymond Chen

From the article:

Finding the average of two unsigned integers, rounding toward zero, sounds easy:

unsigned average(unsigned a, unsigned b)
{
    return (a + b) / 2;
}

However, this gives the wrong answer in the face of integer overflow: For example, if unsigned integers are 32 bits wide, then it says that average(0x80000000U, 0x80000000U) is zero...

Technique: Compile Time Code Generation and Optimization--Jonathan Müller

Have you ever done that?

Technique: Compile Time Code Generation and Optimization

by Jonathan Müller

From the article:

C++ constexpr is really powerful. In this blog post, we’ll write a compiler that can parse a Brainfuck program given as string literal, and generate optimized assembly instructions that can then be executed at runtime. The best part: we neither have to actually generate assembly nor optimize anything ourselves! Instead we trick the compiler into doing all the hard work for us.

The same technique can be used whenever you want to specify some sort of “program” in a different way and translate it at runtime: regexes, routing tables, etc.

Improving Stability with Modern C++, Part 5 — Revisiting the Rule of Three

Rule of Three

Improving Stability with Modern C++, Part 5 — Revisiting the Rule of Three

by Ralph Kootker

From the article

If the programmer, following the Rule of Three, declares a copy constructor, copy-assignment operator, or destructor, the compiler will not generate any move operations. [...] Declare a move constructor or move-assignment operator only, and now the default copy constructor and copy-assignment operator won't be generated.

ACCU 2022 Registration is open -- ACCU

The registration for the upcoming ACCU 2022 conference has opened.

ACCU 2022 Registration is open

by ACCU

About the conference

Again we had the opportunity to assemble a great schedule by speakers from the community who want to share their experience!

Our this years keynote speakers are Guy Davidson, Hannah Dee, Patricia Aas and Titus Winters.

Embedded Programming with Raspberry Pi Pico -- Richard Thomson

Utah C++ Programmers has released a new video.

Embedded Programming with Raspberry Pi Pico

by Richard Thomson

From the video description:

This Winter, we'll be hunkered down with embedded programming with C/C++ and some popular single board computer platforms popular in the 'maker' community.

This month, Richard Thomson will continue with an introduction to the Raspberry Pi Pico. The Pico is an inexpensive yet powerful single board microcontroller, costing only $4 It features more RAM than the Arduino Uno and considerably more processing power. The RP2040 CPU is a dual core 133 MHz Arm Cortex-M0+ with a selection of integrated peripherals. The CPU was custom designed by the Raspberry Pi foundation to address the specific needs of the maker community. The Arduino IDE can be used to program the Pico as with the Uno. With integrated USB controller, the Pico can implement a USB host or device.

https://www.youtube.com/watch?v=13HnS_cvlVs

Upcoming C++ User Group meetings in February

The monthly overview on upcoming C++ User Group Meetings:

C++ User Group Meetings in February 2022

by Jens Weller

From the article:

The monthly overview on upcoming meetings of C++ User Groups. Most groups meet online due to the pandemic.

Meeting C++ online organizes 2 events in February: one book & tool fair and a talk about C++ reflections

    16.2 C++ UG Meeting C++ online - February - Design of C++ reflection API with Matúš Chochlík
    17.2 C++ UG Meeting C++ online - Meeting C++ online book & tool fair

Additionally Meeting C++ organizes two trainings in February:

    Modern C++ Design Patterns by Klaus Iglberger
    The Big Four of C++20 by Rainer Grimm

constexpr Functions--Rainer Grimm

The series continue.

constexpr Functions

by Rainer Grimm

From the article:

Today, I continue my story about programming at compile time. After template metaprogramming, the type-traits library, today's topic is constexpr functions in particular...