Closed rubenvb closed 4 years ago
This would expand to if constexpr where available, and plain if where it's not.
if constexpr
if
This can help write "correct" code and suppress warnings when doing plain if on compile-time constants such as trait expressions.
An example of this is found here: https://github.com/boostorg/spirit/blob/develop/include/boost/spirit/home/x3/char/detail/cast_char.hpp#L33
Having this macro prevents further (verbose) proliferation of locally disabling the warning.
Done
This would expand to
if constexpr
where available, and plainif
where it's not.This can help write "correct" code and suppress warnings when doing plain
if
on compile-time constants such as trait expressions.An example of this is found here: https://github.com/boostorg/spirit/blob/develop/include/boost/spirit/home/x3/char/detail/cast_char.hpp#L33
Having this macro prevents further (verbose) proliferation of locally disabling the warning.