The C++26 NB comments have arrived

The pre-Kona WG21 mailing includes N5028 “SoV and Collated Comments,” which is the collation of all 26 National Bodies’ comments on the C++26 CD. Nineteen NBs submitted comments. It is important to note that different NBs have different mechanisms for soliciting their comments. The US NB simply submits every comment it receives — no filter. My impression is that some other NBs (UK? Sweden?) have a technical discussion about every comment and submit only comments that win consensus within the NB.

C++26 is notable for the large number of relatively unimplemented and novel features it specifies; and the NB comments on C++26 are notable for the many comments of the form “We should completely remove novel feature X.” By my count:

Read More

Implicit operator bool participates in comparison

In “What breaks without implicit T*-to-bool conversion?” (2025-10-05) I wrote that in a proprietary C++17 codebase my audit turned up “one non-explicit operator bool, and zero bugs.” On closer inspection we found that that non-explicit operator bool actually was causing a real bug! Consider this hypothetical type that behaves something like unique_ptr<int> (Godbolt):

struct IntPtr {
  explicit IntPtr() = default;
  explicit IntPtr(int *p) : p_(p) {}
  int& operator*() const { return *p_; }
  int *operator->() const { return p_; }
  operator bool() const { return bool(p_); }
  friend bool operator==(IntPtr a, IntPtr b) { return a.p_ == b.p_; }

  int *get() const { return p_; }
private:
  int *p_ = nullptr;
};

std::set<IntPtr> myset;
int i, j;
myset.emplace(&i);
myset.emplace(&j);
assert(myset.size() == 2); // fails!

After emplacing two items, myset.size() is only 1!

Read More

What breaks without implicit T*-to-bool conversion?

C++20 took a small step by deciding (via P1957) that a T*-to-bool conversion should be considered narrowing, and thus forbidden in list-initialization. But could we go further and make T*-to-bool conversion non-implicit?

I patched my local copy of Clang to forbid implicit conversion from T* to bool. Here’s all the things that broke when I compiled LLVM/Clang itself with my patched compiler.

Read More

Bill and Ted’s Godot: It’s awful

Yesterday my wife and I went to see Waiting for Godot at the Hudson Theatre on Broadway, starring Alex Winter (you know, Bill) as Vladimir and Keanu Reeves (you know, Ted) as Estragon. This is of course stunt casting to the extreme. We went knowing this. Still, I feel like I have to get this off my chest: If you are not a “Godot” fan, you probably will not like this “Godot” — and if you are a “Godot” fan, you certainly will not like this “Godot.”

Read More

PSA: views::single doesn’t really view

Someone on the cpplang Slack asks: How can I view a std::pair<T, T> as if it were a range of two Ts? That is, fill in the blank in this sample program:

template<std::ranges::range R>
void increment_all(R&& rg) {
  for (auto&& elt : rg) {
    elt = elt + 1;
  }
}

template<class T>
auto F(std::pair<T, T>& kv) { ~~~~ }

int main() {
  std::pair<int, int> kv = {1, 2};
  increment_all(F(kv));
  assert(kv.first == 2 && kv.second == 3);
  std::ranges::fill(F(kv), 4);
  assert(kv.first == 4 && kv.second == 4);
}
Read More

A poem all in dactylic noun substantives, part 3

Cervantes wrote satirically of a poet who had written—

“that part of the history of King Arthur of England which Archbishop Turpin left unwritten, together with the history of the quest of the Holy Grail; and all in heroic verse, part in rhymes and part in blank verse; but entirely dactylically—I mean in dactylic noun substantives, without admitting any verb whatsoever.”

In part 2 we saw that he didn’t really mean no verbs, just no line-terminal verbs; and likewise the word “dactylic” (“todo … en esdrújulos”) referred only to the line-terminal stress pattern, not to the contents of his dictionary. But what if he had meant those constraints in the most restrictive sense possible? Discarding (read: forgetting) the “part in rhymes” constraint, he might have written something like the following — which one might in dactylic substantives christen the Turpentine Comedy:


I.  Argument.

poesy chronicle history Camelot
emperor majesty conqueror Caliburn

Read More

A poem all in dactylic noun substantives, part 2

Previously: “A poem all in dactylic noun substantives, part 1” (2025-08-28). Cervantes wrote satirically of a poet who had written—

“that part of the history of King Arthur of England which Archbishop Turpin left unwritten, together with the history of the quest of the Holy Grail; and all in heroic verse, part in rhymes and part in blank verse; but entirely dactylically—I mean in dactylic noun substantives, without admitting any verb whatsoever.”

Over on Literature StackExchange, Clara Díaz Sánchez explains that in the late 16th and early 17th century, there was in fact a fad for poetry in which many lines ended in dactyls.

Read More

A poem all in dactylic noun substantives, part 1

In Cervantes’ Coloquio de los perros (published 1613), a dog recounts all the colorful characters he’s met in his life. One is this frustrated poet:

“I have strictly observed the rule laid down by Horace in his Poetica not to bring to light any work until ten years after it has been composed. Now I have a work on which I was engaged for twenty years, and which has lain by me for twelve […] a lofty, sonorous, heroic poem, delectable and full of matter; and yet I cannot find a prince to whom I may dedicate it.”

“What is the subject of the work?” inquired the alchemist.

“It treats,” said the poet, “of that part of the history of King Arthur of England which Archbishop Turpin left unwritten, together with the history of the quest of the Holy Grail; and all in heroic verse, part in rhymes and part in blank verse; but entirely dactylically—I mean in dactylic noun substantives, without admitting any verb whatsoever.”

Read More

Whenever a library clause uses CTAD or list-initialization, it’s wrong

Over the past few years, I’ve noticed a pattern in several LWG issues: In library clauses, CTAD and list-initialization are never helpful and are sometimes harmful, in the sense that they create LWG issues to triage and fix. I’d noticed for several years “this happens a lot,” but I’d never collected all my anecdotes into one list. I’m starting that list now. As Wikipedia says, “This list is incomplete”; please let me know if you see any I’ve missed.

Read More

Varaldo’s Shahrazad and Chiti’s Centunesimo Canto

Around New Year’s, while our book club was reading Dante’s Divine Comedy, I serendipitously happened across a reference in Douglas Hofstadter’s Le ton beau de Marot (page 125) to a book of poetry by Giuseppe Varaldo titled All’alba Shahrazad andrà ammazzata (“Shahrazad Shall Hang at Dawn”). Hofstadter writes: “In his astonishing tour de force of a book, Varaldo takes roughly fifty classics of Western literature and synopsizes each one in a perfectly constructed classical Italian-style sonnet, in which just one vowel appears.”

Read More

True names matter in C++

In C++, there’s often multiple ways to refer to the same entity: aliases, inherited names, injected names, names that differ in qualification… Usually, if an entity has multiple names, which one you use won’t matter: you can use any of those synonymous names and the compiler won’t care.

But each entity always has a uniquely “truest” name, privileged above all the other ways to refer to it. In some situations, in order to do a thing with an entity, you do actually need to call it by its “true name.” Here is a (non-exhaustive) list of such situations.

Read More

D. C. Phillips’ The Promised One (1915)

My grandmother’s grandfather was David Celyddon Phillips (1848–1915), Welsh-born minister and poet, known by the bardic name “Celyddon.” Recently I learned that my second cousin David M. Phillips Jr. has in his possession a leatherbound, hand-written copy of D. C. Phillips’ long narrative poem The Promised One, or, Jesus of Nazareth — previously unpublished as far as either of us know, despite that one of Celyddon’s lengthy obituaries mentions:

Read More

Explainable Minesweeper and solvable nonograms

Via Hacker News: “Making Explainable Minesweeper” (July 2025). By “explainable Minesweeper,” the blogger means that we generate a Minesweeper level that is guaranteed solvable by perfect play — that is, for which the solution never requires “guessing” at an unknown cell (and possibly losing the game at that point). The blogger describes a procedure for creating partially explainable levels: simply generate a random level, then simulate solving it with a computer player that knows only certain heuristics. If the computer player completes the level without guessing, then it’s good; otherwise, generate a new random level and repeat.

Read More

Animating moving juggling patterns

About 15 years ago I was active with the Santa Barbara Jugglers Association (which still exists and still meets up by UCSB in Isla Vista). They’re particularly known for club-passing in moving patterns. We’re talking things like Havana and Shooting Star. (I don’t think either of those patterns came out of Isla Vista, mind you. I don’t know where either of them did come from. The Madison Area Jugglers’ Pattern Book credits Shooting Star to “Bryan Olson in 1993.”)

Read More

Array member-initializers in GCC

The other day I ran across some code like this:

template<class T>
struct Holder {
  T t_;
  explicit Holder() : t_() {}
  Holder(const Holder& rhs) : t_(rhs.t_) {}
  ~~~~
};

This was in an old codebase, which until recently had still been using GCC’s -Weffc++ to enforce C++98 idioms such as the explicitly non-defaulted copy constructor depicted above.

If you’re still using -Weffc++, please, stop using it!

Read More