Macro std::const_assert_eq
Aborts the compilation if lhs
and rhs
are not equal during compilation.
lhs
and rhs
must be constant expressions.
Examples
use std::const_assert_eq;
const_assert_eq!(1 + 1, 2);
Run this example
use std::const_assert_eq;
const_assert_eq!(std::math::PI, 3.14); // fails to compile
Run this example