Macro std::cfg

macro cfg($s) { ... }

Returns the value of a configuration flag during compilation.

This can be used as an alternative to #[cfg] attributes. The difference is that cfg! can be used in any expression position, while #[cfg] can only be used on statements and items.

Example