add static_assert suggested by neobrain