The story’s score and claims

Comments on No. 126 of 139 · Sandor Dargo’s Blog · edition of Thursday 5 November 2026

C++26: Std:Constant_wrapper

Summary

C++26's std::constant_wrapper (with the std::cw<V> shorthand), proposed in P2781R9 by Dusíková, Kretz, and Laine and refined in P3978R3, wraps any structural value as a non-type template parameter so it stays a compile-time constant across function calls.

Comments

Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules