unpack static assert on unsupported types

Unsupported types might not cause compile time errors but can result
in SIGILL errors at runtime when compiler warnings are ignored.

This was found when compiling an intel-ipmi-oem handler that attempted
to unpack an enum class type. The code compiles down to an empty
function (no return statement or value), which can result in all sorts
of undefined behavior. This change forces the unsupported types to emit
a static assert and fail to compile.

Tested: Created a handler that requests an enum class as an input and
        saw that the build fails with a static assert.

Change-Id: I123da15cb001756f07761cf7a60b799469926a2a
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
2 files changed