r238786 - in /trunk/gcc: ChangeLog system.h

dmalcolm@gcc.gnu.org dmalcolm@gcc.gnu.org
Wed Jul 27 14:49:00 GMT 2016


Author: dmalcolm
Date: Wed Jul 27 14:49:06 2016
New Revision: 238786

URL: https://gcc.gnu.org/viewcvs?rev=238786&root=gcc&view=rev
Log:
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.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/system.h



More information about the Gcc-cvs mailing list