February 2022

SFINAE: Substitution Failure is not an Error | Top-Up C++ [C++ #02]--WolfSound

Are you familiar with it?

SFINAE: Substitution Failure is not an Error | Top-Up C++ [C++ #02]

by WolfSound

Summary of the video:

In this video, we are presenting SFINAE: Substitution Failure is not an Error, a feature or a characteristic of C++ related to templates. “Substitution failure is not an error” means that if the compiler fails to specialize a template with a given template argument list, it does not issue an error. It does when it cannot find any suitable function/class to be called/instantiated (either due to a lack of suitably declared functions/classes or an error during instantiation).

2022-02 Mailing Available

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

 

WG21 Number Title Author Document Date Mailing Date Previous Version Subgroup
N4903 PL22.16/WG21 agenda: 7 February 2022, Virtual Meeting John Spicer 2022-01-24 2022-02   All of WG21
N4904 WG21 admin telecon meetings: 2022 summer and autumn (revision 1) Herb Sutter 2022-01-24 2022-02   All of WG21
N4905 WG21 2022-01 Admin telecon minutes Nina Ranns 2022-02-01 2022-02   All of WG21
N4906 Transactional Memory TS2 Michael Wong 2022-02-18 2022-02   All of WG21
N4907 WG21 2022-02 Virtual Meeting Minutes of Meeting Nina Ranns 2022-02-17 2022-02   All of WG21
P0009R15 MDSPAN Christian Trott 2022-02-14 2022-02 P0009R14 LWG Library
P0323R12 std::expected JF Bastien 2022-02-21 2022-02 P0323R11 LWG Library
P0447R19 Introduction of std::hive to the standard library Matt Bentley 2022-02-17 2022-02 P0447R18 SG14 Low Latency,LEWG Library Evolution,All of WG21
P0561R6 An RAII Interface for Deferred Reclamation Geoffrey Romer 2022-02-02 2022-02 P0561R5 LWG Library
P0792R7 function_ref: a non-owning reference to a Callable Vittorio Romeo 2022-02-14 2022-02 P0792R6 LEWG Library Evolution,LWG Library
P0792R8 function_ref: a non-owning reference to a Callable Vittorio Romeo 2022-02-16 2022-02 P0792R7 LEWG Library Evolution,LWG Library
P0957R5 Proxy: A Polymorphic Programming Library Mingxin Wang 2022-02-14 2022-02 P0957R4 LEWGI SG18: LEWG Incubator
P1018R15 C++ Language Evolution status  pandemic edition  2022/01–2022/02 JF Bastien 2022-02-14 2022-02 P1018R14 EWG Evolution,All of WG21
P1202R4 Asymmetric Fences David Goldblatt 2022-02-14 2022-02 P1202R3 LEWG Library Evolution,LWG Library
P1223R3 find_last Zach Laine 2022-02-14 2022-02 P1223R2 LEWG Library Evolution,LWG Library
P1478R7 Byte-wise atomic memcpy Hans Boehm 2022-02-05 2022-02 P1478R6 LWG Library
P1664R7 reconstructible_range - a concept for putting ranges back together JeanHeyd Meneide 2022-02-15 2022-02 P1664R6 SG9 Ranges,LEWG Library Evolution
P1774R6 Portable assumptions Timur Doumler 2022-02-15 2022-02 P1774R5 CWG Core
P1839R3 Accessing Object Representations Krystian Stasiowski 2022-02-18 2022-02 P1839R2 CWG Core
P1841R3 Wording for Individually Specializable Numeric Traits Walter E Brown 2022-02-14 2022-02 P1841R2 LWG Library
P1885R10 Naming Text Encodings to Demystify Them Corentin Jabot 2022-02-14 2022-02 P1885R9 LEWG Library Evolution
P2093R13 Formatted output Victor Zverovich 2022-02-09 2022-02 P2093R12 LWG Library
P2214R2 A Plan for C++23 Ranges Barry Revzin 2022-02-18 2022-02 P2214R1 LEWG Library Evolution
P2416R2 Presentation of requirements in the standard library Jens Maurer 2022-02-14 2022-02 P2416R1 LWG Library
P2438R2 std::string::substr() && Federico Kircheis 2022-02-04 2022-02 P2438R1 LWG Library
P2441R2 views::join_with Barry Revzin 2022-01-28 2022-02 P2441R1 LEWG Library Evolution
P2446R2 views::as_rvalue Barry Revzin 2022-02-14 2022-02 P2446R1 LEWG Library Evolution
P2448R2 Relaxing some constexpr restrictions Barry Revzin 2022-01-27 2022-02 P2448R1 CWG Core
P2452R0 2021 October Library Evolution and Concurrency Polls on Networking and Executors Bryce Adelstein Lelbach 2022-02-15 2022-02   LEWG Library Evolution
P2453R0 2021 October Library Evolution Poll Outcomes Bryce Adelstein Lelbach 2022-02-15 2022-02   SG4 Networking,LEWG Library Evolution
P2458R1 2022 January Library Evolution Polls Bryce Adelstein Lelbach 2022-01-26 2022-02 P2458R0 LEWG Library Evolution
P2459R0 2022 January Library Evolution Poll Outcomes Bryce Adelstein Lelbach 2022-02-15 2022-02   LEWG Library Evolution
P2465R2 Standard Library Modules std and std.compat Stephan T. Lavavej 2022-02-02 2022-02 P2465R1 CWG Core,LWG Library
P2467R1 Support exclusive mode for fstreams Jonathan Wakely 2022-02-17 2022-02 P2467R0 LWG Library
P2472R1 make function_ref more functional Jarrad J. Waterloo 2022-02-15 2022-02 P2472R0 LEWG Library Evolution
P2495R0 Interfacing stringstreams with string_view Michael Hava 2022-02-13 2022-02   LEWG Library Evolution
P2502R1 std::generator: Synchronous Coroutine Generator for Ranges Casey Carter 2022-01-25 2022-02 P2502R0 LEWG Library Evolution
P2505R1 Monadic Functions for std::expected Jeff Garland 2022-02-15 2022-02 P2505R0 LEWG Library Evolution,LWG Library
P2506R0 std::lazy: a coroutine for deferred execution Casey Carter 2022-02-02 2022-02   LEWG Library Evolution
P2513R1 char8_t Compatibility and Portability Fix JeanHeyd Meneide 2022-02-14 2022-02 P2513R0 EWG Evolution
P2521R1 Contract support -- Working Paper Andrzej Krzemieński 2022-02-15 2022-02 P2521R0 SG21 Contracts
P2528R0 C/C++ Identifier Security using Unicode Standard Annex 39 Reini Urban 2022-01-22 2022-02   SG16 Unicode,EWG Evolution,CWG Core
P2529R0 generator should have T&& reference_type Mathias Stearn 2022-01-25 2022-02   LEWG Library Evolution
P2530R0 Why Hazard Pointers should be in C++26 Maged Michael 2022-02-14 2022-02   SG1 Concurrency and Parallelism
P2531R0 C++ Standard Library Issues to be moved in Virtual Plenary, Feb. 2022 Jonathan Wakely 2022-01-31 2022-02   All of WG21
P2532R0 Removing exception_ptr from the Receiver Concepts Eric Niebler 2022-02-01 2022-02   LEWG Library Evolution
P2533R0 Core Language Working Group "ready" Issues for the February, 2022 Meeting William M. (Mike) Miller 2022-02-21 2022-02   All of WG21
P2534R0 Slides: function_ref in the wild (P0792R7 presentation) Zhihao Yuan 2022-02-16 2022-02   LEWG Library Evolution
P2535R0 Message fences Olivier Giroux 2022-02-02 2022-02   SG1 Concurrency and Parallelism
P2536R0 Distributing C++ Module Libraries with dependencies json files. Olga Arkhipova 2022-02-03 2022-02   SG15 Tooling
P2537R0 Relax va_start Requirements to Match C JeanHeyd Meneide 2022-02-14 2022-02   LEWG Library Evolution
P2538R0 ADL-proof std::projected Arthur O'Dwyer 2022-02-15 2022-02   LEWG Library Evolution,LWG Library
P2540R0 Empty Product for certain Views Steve Downey 2022-02-15 2022-02   SG9 Ranges
P2541R0 Consider renaming remove_quals Corentin Jabot 2022-02-15 2022-02   SG22 Compatability
P2542R0 views::concat Hui Xie 2022-02-18 2022-02   SG9 Ranges,LEWG Library Evolution
P2544R0 C++ exceptions are becoming more and more problematic Thomas Neumann 2022-02-12 2022-02   EWGI SG17: EWG Incubator
P2545R0 Why RCU Should be in C++26 Paul E. McKenney 2022-02-14 2022-02   SG1 Concurrency and Parallelism,LEWG Library Evolution
P2546R0 Debugging Support René Ferdinand Rivera Morell 2022-02-14 2022-02   SG15 Tooling,LEWG Library Evolution
P2547R0 Language support for customisable functions Lewis Baker 2022-02-15 2022-02   EWG Evolution
P2549R0 std::unexpected should have error() as member accessor Yihe Li 2022-02-13 2022-02   LEWGI SG18: LEWG Incubator,LEWG Library Evolution
P2550R0 ranges::copy should say output_iterator somewhere Barry Revzin 2022-02-16 2022-02   LWG Library
P2551R0 Clarify intent of P1841 numeric traits Matthias Kretz 2022-02-14 2022-02   LEWG Library Evolution
P2552R0 On the ignorability of standard attributes Timur Doumler 2022-02-16 2022-02   EWG Evolution
P2553R0 Make mdspan size_type controllable Christian Trott 2022-02-14 2022-02   LEWG Library Evolution
P2554R0 C-Array Interoperability of MDSpan Christian Trott 2022-02-14 2022-02   LEWG Library Evolution
P2555R0 Naming improvements for std::execution Jens Maurer 2022-02-15 2022-02   LEWG Library Evolution
P2557R0 WG21 2022-02 Virtual Meeting Record of Discussion Nina Ranns 2022-02-17 2022-02   All of WG21

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