Use static_assert for STATIC_ASSERT for C++11 onwards
commita15c974194fbe985695ff7e6525b76cea8b2f44e
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Jul 2016 14:49:06 +0000 (27 14:49 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Jul 2016 14:49:06 +0000 (27 14:49 +0000)
tree89f1e8bcacfb158e93c8b1fd41103eca189d1fef
parentceb7e9d0b2d32c02a043cc70247ad3e6fa04e1be
Use static_assert for STATIC_ASSERT for C++11 onwards

C++11 has a
  static_assert (COND, MESSAGE)
which gives more readable error messages for STATIC_ASSERT than our
current implementation.

This patch makes us use it if __cplusplus >= 201103L

There's also a provisional static_assert (COND) in C++1z, but presumably
we should wait until that one is fully standardized before using it.

gcc/ChangeLog:
* system.h (STATIC_ASSERT): Use static_assert if building
with C++11 onwards.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238786 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/system.h