libchromeos: get rid of unused-local-typedef warning.

This uses static_assert() to issue a meaningful compile-time error.
To prevent this from happening for all references to RawCast, use sizeof(T)
to make static_assert depend on type T and therefore prevent binding it
unconditionally until the actual RawCast<T> instantiation happens.

BUG=chromium:450380
TEST=builds with new clang.

Change-Id: I6aaf3e5e69b239288400accfee50e5adfd54c200
Reviewed-on: https://chromium-review.googlesource.com/242047
Reviewed-by: Alex Vakulenko <[email protected]>
Tested-by: Yunlian Jiang <[email protected]>
Commit-Queue: Yunlian Jiang <[email protected]>
1 file changed