C++: improve location of static_assert errors