[][src]Macro sp_std::if_std

macro_rules! if_std {
    ( $( $code:tt )* ) => { ... };
}

Feature gate some code that should only be run when std feature is enabled.

Example

use sp_std::if_std;

if_std! {
    // This code is only being compiled and executed when the `std` feature is enabled.
    println!("Hello native world");
}