commit | ed835a0a2c420ddc7e1992b6326f6e76b40ffddb | [log] [tgz] |
---|---|---|
author | Yunlian Jiang <[email protected]> | Tue Jan 20 14:36:13 2015 -0800 |
committer | ChromeOS Commit Bot <[email protected]> | Wed Jan 21 19:27:06 2015 +0000 |
tree | 686293ed854ac1f8d21cc259350450f85bf5ffdc | |
parent | aa7d677661213b4116adc5fac88b8c37a1490010 [diff] |
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]>