Here are some functions: What they all have in common, structurally, is that they each return one thing. Even though they may take any number of arguments, they must each have one return value. One shall be the number, and the number shall be one. This is true of all functions. (It’s not too important,… Continue reading Functions are Asymmetric
A Crossword for CppCon 2025 – Solutions
See https://www.elbeno.com/blog/?p=1795 (or https://crosshare.org/crosswords/aZ0lpCTDSztWEsvvuboa/cppcon-2025) if you want to try it. If you’re here for solutions, read on. Definitions are given in italics. My personal likes are 4D and 13D. 1A BABBAGE Supergroup among leaders to back grant endowment for computing pioneer (7) ABBA (“supergroup”) inserted into (“among”) BGE (“leaders to Back Grant Endowment”) 5A MAD… Continue reading A Crossword for CppCon 2025 – Solutions
A Crossword for CppCon 2025
Another year, another crossword. With some of the clues/answers vaguely themed. You can solve it online or offline with the PDF. Answers after the con.
Formatted Diagnostics with C++20
C++26 adds formatted diagnostics with static_assert, something like this: The benefit of course is that when such an assertion fails, the compiler outputs a diagnostic that we control. But can this be done in C++20? Well, this is C++! So the answer is a qualified yes – we can get the compiler to output our… Continue reading Formatted Diagnostics with C++20
Open Content at CppCon: One API for Types and Values
This curiosity was part of my CppCon Open Content talk in 2024, “Another Grab-bag of C++ Oddments”. The session highlighted C++ oddities, in the spirit of discovery through play. For reasons (TM), I want to be able to do this: Of note here: Some use cases I have in mind are things like logging, where… Continue reading Open Content at CppCon: One API for Types and Values
A Crossword for CppCon 2024 – Solutions
As a followup from last week, here’s an explanation of the CppCon crossword. I’m going to explain the construction process a bit, as well, so the solutions will be given in order of clue-writing, with some commentary on my thought process. Maybe a few people may find this interesting, I don’t know. Apologies for length.… Continue reading A Crossword for CppCon 2024 – Solutions
A Crossword for CppCon 2024
As well as being a C++ enthusiast, I’m a bit of a cruciverbalist. I do the Guardian cryptic every day (not in a particularly competitive time — I’d count sub-20 minutes as a good day), and sometimes others when I can. Like many Brits, I learned to do cryptic crosswords as a teenager. It’s true… Continue reading A Crossword for CppCon 2024
std::source_location is Broken
Everyone knows that the best way to get something done on the Internet is with an inflammatory title and a potentially incorrect contention, so here goes. What do you if you want to capture/log the filename of an assertion? Prior to C++20, you use good old __FILE__, which gives you a C-style array of chars.… Continue reading std::source_location is Broken
Modern C++? How about Contemporary C++?
What does “modern C++” mean? Some say it started in 2001 with Andrei Alexandrescu’s book Modern C++ Design. A lot of people describe C++11 and C++14 as modern; others say, “It’s time to stop calling C++11/14 modern C++, it’s not modern anymore.” Here’s another idea. The art world already settled this, so let’s take a… Continue reading Modern C++? How about Contemporary C++?
In Support of Implication for C++
The paper: https://wg21.link/p2971 I have a deck of cards. Each card has a number (integer) on the front, and is either red or blue on the back. (This is axiomatic, I know it a priori). My friend lays out four cards on the table in front of us at random. I see two face up,… Continue reading In Support of Implication for C++