Allow static_assert inside an anonymous union; fixes PR20021 as well as implements C++ Issue 1940.