In standard compliant C++ we managed to hack our way to a counter usable in constant-expressions, let's take it a step further; a compile-time meta-container with modifiable state.
Browse articles tagged with #stateful-meta-programming, ordered by publication date where new
articles are at the top. Please see the article index, or
browse by tag, for an unfiltered view.
List of articles
A compile-time meta-container in C++ A constant-expression friendly counter in C++ We recently managed to hack modifiable state into constant-expressions; in this article we will implement a compile-time counter usable in the not-so-very-constant constant-expressions of C++.
Non-constant constant-expressions in C++ C++ is a complex language, and constant-expressions are not as constant as they might appear. Can one introduce writable state by abusing the ISO Standard?