LIVE SUBMISSIONS — 3 DAYS

Twelve Pieces to Read Before the Language Interview

Published: October 08, 2026 | Careers & Interviews C++ Language & Standards


Twelve Pieces to Read Before the Language Interview

Sandor Dargo published a quick-reference table this year, four callable wrappers with one recommendation each. The entry at the bottom reads: std::function, legacy, avoid in new code.

std::function shipped in C++11. The committee has spent fifteen years shipping the wrappers meant to replace it, std::move_only_function in C++23 and std::copyable_function in C++26, and the advice written on top of the newest arrival is not a note about when to prefer it. It is an instruction to stop using the original.

Meanwhile the question "explain std::function" is still in the warm-up round of every senior loop, and the expected answer is still type erasure, small-buffer optimization, and the allocation fallback. The survival map called this segment shallow questions that sound deep, and that is the shape of it. The language moved. The question did not.

What an interviewer is checking in this segment is whether you write C++ for a living or check a box on a job description. The way to demonstrate the first is to answer the question that was asked and then say something true that the question did not anticipate. Twelve bodies of work below, grouped by the four places that opening exists: dispatch, ownership, the abstractions that compile to nothing, and standards discipline. Member links are marked and unpublished pieces carry their date.

Dispatch

Virtual is still the right default

Read it (members).

The static-polymorphism pitch comes back every few years: virtual functions are slow, std::variant is twice as fast, CRTP removes the indirection, and anybody still writing class Strategy : public IHandler is leaving microseconds on the floor. We built a near-production ITCH-style feed handler, ran five dispatch variants through it on an isolated Ryzen 9 3900 core, read the assembly, and measured to nanosecond precision.

The revivalists are not wrong about their facts. They are wrong about which facts matter. What the top market-making firms run has stayed roughly constant across all these revivals: virtual interfaces at module boundaries, templates in the inner loops, CRTP kept for the handful of places that pay for it.

In the room: when did you last devirtualize a call site, and what did perf say before you did.

Deducing this is CRTP with the cast removed

Read it (members, 24 Sep).

Jens Weller asked on the Meeting C++ blog whether concepts improve deducing this. Following that question to its dead end is useful, because it forces the sharper one: what is deducing this for. The answer is that it is CRTP with the static_cast<Derived*>(this) deleted from the source, and the compiler will prove the two are the same program before it finishes optimizing.

That proof is the article. A zero-cost claim that arrives without machine code attached is a slogan, and this segment is full of them.

In the room: name a C++23 feature you would put in a hot path, and show me why it costs nothing.

The one honest use of C++20 concepts

Read it (members).

Somebody on the desk asks whether concepts belong on the hot path. The premise is broken, because a concept cannot touch a hot path. It constrains overload resolution, and overload resolution finishes before a single instruction is emitted. The concept picks which function gets compiled and is never inside it.

So the real question is whether concepts do one thing at compile time that enable_if and tag dispatch cannot. There is exactly one, subsumption, and almost nobody adopts concepts for it. They adopt for terse syntax and better error messages, and only one of those survives a line count.

In the room: what do concepts cost at runtime. If the candidate hesitates, the segment just answered itself.

Ownership

shared_ptr considered harmful

Read it.

Sixteen bytes for the pointer itself, a separately allocated control block that is a virtual object making virtual calls, a strong count and a weak count you never asked for, and roughly forty bytes of tax per shared object on libc++. Google's own style guide effectively bans passing ownership through it.

This is the most quotable entry on the list because the numbers are small, concrete and checkable, and because almost every candidate reaches for shared_ptr in a design question without being asked to justify it.

In the room: you drew a shared_ptr on the whiteboard. What does it cost, and who actually owns that object.

Is nullptr zero?

Read it (members, 15 Sep).

Three questions hide inside that one and they have different answers. As a value, nullptr is zero in the only sense the language cares about. As a type it is emphatically not. As a bit pattern in a register it is whatever the hardware vendor felt like the year they shipped the ABI.

Collapsing the three is where null bugs come from: the overload that resolves wrong, the memset that produces a pointer which is not null, the lock-free queue that reads a tagged sentinel as a live node. The piece walks it back to the year null was invented and apologised for.

In the room: is a null pointer all-bits-zero, and does your answer change if I say memset.

Parse, don't validate, through a FIX feed

Read it (members).

Alexis King's parse-don't-validate is one of the most quoted type-design essays of the decade and the C++ translation is usually std::expected<ParsedOrder, BadChecksum>. Run through a real FIX feed, that beautiful idea loses 156 percent, and the shape that wins is closer to C++98 than to anything the essay would recognise.

I like this entry because it cuts against the grain of the segment. Most of these pieces argue that the modern thing is better than its reputation. This one measures a modern idea and reports that it lost.

In the room: where does a type-safe wrapper stop paying for itself, and how would you know.

The abstractions that compile to nothing

Constexpr past array sizes

Read it (members).

Everybody uses constexpr for array sizes, lookup tables and trivial folding, which saves a handful of cycles and is not interesting. The article is about what happens when the whole decision, rather than a constant inside it, moves to compile time.

In the room: what is the largest thing you have moved to compile time, and what did it cost in build time.

C++26 contracts

Part 1 (members), Part 2 (members), Part 3 (members).

We built a contracts-enabled Clang, put it against HFT-shaped code, and measured. With the ignore semantic the overhead is near zero and occasionally the contract build is faster than no checks at all, which took some explaining. The larger surprise was contracts against hand-written validation, and that comparison is where the useful numbers are.

Contracts are the feature most likely to come up as a "what's coming in C++26" question. Having measured one puts you in a very small group.

In the room: what does a contract cost when it is compiled out, and why is that not obviously zero.

What Vittorio Romeo just built

Read it.

In a Citadel Securities marketing video, the ISO C++ committee chair described C++20 coroutines on camera in terms that Romeo's toolkit contradicts in working code. The piece is the receipt, with both the quote and the implementation.

Coroutines are the feature senior candidates most often have an opinion about and least often have compiled. If you are going to hold a position on whether they belong in a feed handler, hold one with an implementation behind it.

In the room: do coroutines allocate, and under what conditions does that go away.

Standards discipline

Three signals, one direction

Read it (members).

Twenty-four gold-medal submissions across ten challenges, scored on cycles per operation with rdtsc on isolated cores, read for one question: which features of modern C++ win when engineers compete on cycle counts in code shaped like real trading systems. The answer is a subset, and it is smaller than the conference circuit implies.

In the room: which modern C++ features do you use in the hot path, and which do you keep at the boundary.

Latest standards? No, thank you.

Read it (members).

An attempt to build libCat, a C++ runtime that does not depend on glibc, which required the latest CMake, the latest compiler, the latest standard and very nearly the latest bash. After upgrading to Clang 14.0.6 and CMake 3.24 and satisfying every requirement I could find, it still would not compile, and I was patching source before giving up.

The argument is that chasing the newest standard is a business liability before it is a technical one. It is also the entry most likely to disagree with your interviewer, which is fine, as long as you can say why.

In the room: what standard does your production toolchain pin to, and who decided that.

The standard library walking itself back

Read it.

The piece behind the opening. std::function is the clearest case, but it is a pattern rather than an incident, and the replacements each carry a public paper trail explaining what the original got wrong.

Knowing that trail is the difference between a candidate who learned C++ from books and one who has watched the committee correct itself. The second kind is rarer and interviews better.

In the room: name a standard library component the committee has effectively deprecated without removing.

The questions, and where each is answered

the question the piece
When did you last devirtualize, and what did perf say? Virtual is still the right default
Show me a C++23 feature that costs nothing in a hot path Deducing this is CRTP with the cast removed
What do concepts cost at runtime? The one honest use of C++20 concepts
What does that shared_ptr cost, and who owns the object? shared_ptr considered harmful
Is a null pointer all-bits-zero? Is nullptr zero?
Where does a type-safe wrapper stop paying? Parse, don't validate, through a FIX feed
What is the largest thing you moved to compile time? Constexpr past array sizes
What does a compiled-out contract cost? C++26 contracts
Do coroutines allocate? What Vittorio Romeo just built
Which modern C++ survives the hot path? Three signals, one direction
What standard does your toolchain pin to? Latest standards? No, thank you
Name a component deprecated without being removed The standard library walking itself back

Where this list is thin

It has no templates on it, in the sense of template metaprogramming as a topic, and that is a real omission for a segment where somebody will eventually ask about SFINAE or fold expressions. We have written around metaprogramming repeatedly and never at it.

It is also opinionated in a direction that will occasionally cost you. Three of the twelve argue against something currently fashionable, and an interviewer who is personally invested in CRTP or in std::expected everywhere may not enjoy the conversation. Having the measurement behind you is the only defence that works, which is why every one of those three carries numbers rather than taste.

Earlier parts of the series: concurrency, microarchitecture, and benchmarking.

Review quiz

Pass it to mark this article as read and count it toward your reading achievements.

Five questions about this article. Get four right and it counts as read. Review quizzes come with a membership.

Log in See membership

Back to Courses
529 reads 0

Comments

No comments yet. Be the first to share your thoughts.

Log in as a member to comment, or subscribe to join the discussion.