[][src]Crate sa

Simple static_assert macro for compile time assertions

Usage

use sa::static_assert;

static_assert!(1 == 1);
static_assert!(1 == 1, "Must be equal");
This example deliberately fails to compile
use sa::static_assert;

static_assert!(0 == 1, "Must be equal"); //should fail

Nightly detection

Currently the lib automatically detects compiler version in order to decide whether enable const_if_match to use compile_error! for a better read-ability.

Macros

static_assert