The compiler is free to ignore attributes, but not static_assert.
That will definitely change at some point. No way will attributes always be ignorable.
static_assert won't help with the following:
return some_optional.value();
in cases where the 'optional' object doesn't contain a valid. But of course it doesn't matter in an unevaluated context.