1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-12-22 04:02:04 +03:00

static_assert is available in C++11 and C11

Compliant c++ compilers define __cplusplus to a long integer depending on
the version of C++:

  * C++ pre-C++98 - `1`
  * C++98 - `19971L`
  * C++11 - `201103L`
  * C++14 - `201402L`

Any compiler that states that it is C++11 compilant should have
static_assert available

C compilers define __STDC_VERSION__ to:

  * C89 - `1` (but not always defined)
  * C94 - `199409L`
  * C99 - `199901L`
  * C11 - `201112L`

C11 has the _Static_assert keyword
This commit is contained in:
Matt Clarkson
2015-05-20 17:42:47 +01:00
committed by bel
parent ceecf6fb72
commit 82b5698e43

Diff Content Not Available