[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

static_assert in G++

From: Reuben Thomas
Subject: static_assert in G++
Date: Thu, 10 Jan 2019 12:17:29 +0000

I noticed this in lib/verify.h:

/* The condition (99 < __GNUC__) is temporary, until we know about the
   first G++ release that supports static_assert.  */
#if (99 < __GNUC__) && defined __cplusplus

The relevant commit is:

commit ef1271787
Author: Bruno Haible <address@hidden>
Date:   Sat Apr 9 02:12:11 2011 +0200

    verify: Fix syntax error with GCC 4.6 in C++ mode.
This is odd, since the GCC web page on C++11 support: https://gcc.gnu.org/projects/cxx-status.html#cxx11

says that static assertions have been supported for C++ since GCC 4.3:

Static assertions N1720 GCC 4.3 __cpp_static_assert >= 200410

Assuming I'm failing to understand something, could the comment in verify.h be clarified as to what exactly is missing, if indeed it still is?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]