# C++2a Coroutines and dangling references

Today I learned yet another way to generate accidentally dangling references with C++2a Coroutines.

# Conditional explicit is not the same thing as forwarding explicit

The C++2a Working Draft adds “conditional explicit” to the core language. So rather than writing some icky constructor overload set like

# In support of P1485 “Better keywords for coroutines”

Antony Polukhin’s P1485 “Better keywords for coroutines” is an almost-slam-dunk paper in my opinion. It names a glaringly obvious problem, proposes a clean solution, and incidentally solves some other minor problems along the way. I suspect it is going to need all the help it can get, just to get discussed before C++2a is released. (And after C++2a is released, of course it will be too late to change anything.)

# My C++Now 2019 talks are captioned

The sessions I presented at C++Now 2019 are now up on YouTube, and fully captioned in English by me!

# “The STL From Scratch” is back!

Registrations for CppCon 2019 are open, and so are registrations for my two-day pre-conference class, “The STL from Scratch.”

# Dealing with Dragons

I just finished re-reading (for the first time since at least high school) Patricia C. Wrede’s “Enchanted Forest Chronicles,” a four-book series of fantasy novels that began with Dealing with Dragons (1990). (Or, if you read the author’s forewords in front of each book in the boxed set I got, it turns out that Wrede wrote the final volume first and then filled in the backstory in pieces. You wouldn’t know it from the finished product, though; Wrede is a master of her craft.)

# MapView can be faster than MapRef

Chandler Carruth gave a pretty great lightning talk at C++Now 2019 on his new ideas for a Map API; that is, the API for a data structure that stores key-value pairs. I disagreed with some of his intuitions, such as the promiscuous use of overloading — in particular I recall that some member functions took lambdas and were overloaded based on their parameter’s parameter type! Yuck! But the thing that made it great was this observation:

# A faster WG21 CWG issue browser

Several weeks ago I made a thing: cwg-issue-browser.herokuapp.com/cwg1234 is a faster way to browse WG21 Core Working Group issues by number than the official URL www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1234. Because rather than loading and re-rendering 4 megabytes of text every time you load an issue, this little Heroku app caches those 4 megabytes on the server side and just sends over the little piece you’re interested in.

# MSVC can’t handle move-only exception types

Here’s my second post from C++Now 2019!

On Friday morning, Andreas Weis gave a very good summary of how exception handling works in C++. I particularly liked that he didn’t just focus on the Itanium ABI (as I would certainly have been tempted to do), but showed in-depth knowledge of how exception handling works on MSVC and also on embedded platforms. The only thing that could have made Andreas’s talk better would have been if he’d mentioned my dynamic_cast From Scratch” (CppCon 2017). …

# On function_ref and string_view

At C++Now 2018, I wrote three blog posts during the conference. This year I was somehow so busy at C++Now that I merely wrote a list of things I ought to blog about once I got the time. So here’s the first one.

# Befunge and Flobnar

A week-ish ago I discovered Flobnar, an esoteric programming language invented by Chris Pressey circa 2011 and described either as “a functional dual of Befunge-93” or “what happens when you get Befunge-93 drunk.”

# The wit of Macaulay, who wrote of Frederick II

My people and I have come to an agreement which satisfies us both. They are to say what they please, and I am to do what I please.

—Frederick the Great of Prussia (1712–1786)