joerg added a comment. That's why I said "or so" :) The attribute unused is fine, but your version doesn't work in file scope, which is where I normally would place compile time asserts. http://reviews.llvm.org/D12001