# Global comptime counter

**URL:** <https://ziggit.dev/t/global-comptime-counter/2874>\
**Category:** Help\
**Tags:** comptime\
**Created:** [January 16, 2024, 12:05am UTC](https://ziggit.dev/t/global-comptime-counter/2874 "2024-01-16T00:05:46Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![AndrewCodeDev](https://ziggit.dev/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@AndrewCodeDev](https://ziggit.dev/u/AndrewCodeDev)\
**Post date:** [January 16, 2024, 5:04pm UTC](https://ziggit.dev/t/global-comptime-counter/2874/5 "2024-01-16T17:04:11Z")

</div>

We had a whole thread about this: [C/C++ macro challenge #1: BOOST\_PP\_COUNTER](https://ziggit.dev/t/c-c-macro-challenge-1-boost-pp-counter/2235)

Edit - just saw @ianprime0509’s post on the same thing. Most of the solutions right now are kind of hacky. A builtin would be nice or doing pre-processing on the file during a build step would also be possible. Sequentially replace the text and increment a counter…

---

_[View the full topic](https://ziggit.dev/t/global-comptime-counter/2874)._
