Quantcast
Channel: User HolyBlackCat - Stack Overflow
Viewing all articles
Browse latest Browse all 1285

Comment by HolyBlackCat on constexpr function to generate unique error codes mapped to strings

$
0
0
This is fundamentally impossible. You can only have 2 out of 3: constexpr-ness, ability to declare those in multiple places, and the IDs being sequental and always unique. If you abandon the latter (since you say you want the first two), you can just hash the strings.

Viewing all articles
Browse latest Browse all 1285

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>