Use static_assert.
Suggested by: cem MFC after: 2 weeks
build
Alternative solution: D25563 .
Will use D25563.