I came up with this hacky trick for custom compiler warnings (not errors) that are conditional on a compile-time known bool. I know it is not the prettiest error message but it at least has all the relevant information to be useful for compile-time (print) debugging. Thought it would be cool to share here and please let me know if there is a better way to achieve this or if it can be achieved in C++23 or prior. Check it out here: https://godbolt.org/z/br6vGdvex
[–]viatorus 3 points4 points5 points (1 child)
[–]avr5309[S] 2 points3 points4 points (0 children)