[z2049] Make use of C++11's static_assert if possible.

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>

(based on commit 45afa02)

Signed-off-by: Nighoo <nighoo@overninethousand.de>

(based on commit [s1662] - a1abd8e)