According to [temp]p1, a static_assert cannot be templated (we have a FIXME in the code about this as well). This patch emits a diagnostic turning this into an error instead of silently accepting the template and doing the wrong thing. Eg)
struct S {
template <typename Ty = char>
static_assert(sizeof(Ty) != 1, "Not a char");
};
This code currently compiles without diagnosing, but the static_assert
does not result in a diagnostic as you would expect. With this patch,
the code now emits a diagnostic on the template declaration.
~Aaron
StaticAssert.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
