Get the latest tech news

Cost of enum-to-string: C++26 reflection vs. the old ways


Two months ago I published “the hidden compile-time cost of C++26 reflection”, where I measured what including <meta> and doing some basic reflection actually costs per translation unit. If you haven’t read it, start there – this post builds directly on top of it.

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of cost

cost

Photo of string

string

Photo of old ways

old ways

Related news:

News photo

A stainless steel breakthrough could slash the cost of green hydrogen production

News photo

Study warns cost-cutting use of generative AI could increase cyber-attack risks

News photo

DeepSeek-V4 arrives with near state-of-the-art intelligence at 1/6th the cost of Opus 4.7, GPT-5.5