emulate static_assert if not available
use constexpr if available