diff options
author | Martin Liska <mliska@suse.cz> | 2017-05-18 16:22:01 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2017-05-18 14:22:01 +0000 |
commit | 671d5bcb262855ea7193f8349f38a15c388fcb6f (patch) | |
tree | 975c6f4fd6b0c9e00f69dda2bee8e4e93d6ad71b /include | |
parent | dbcb3c7446c4c9f8f491db6a71bbab318918c874 (diff) | |
download | gcc-671d5bcb262855ea7193f8349f38a15c388fcb6f.zip gcc-671d5bcb262855ea7193f8349f38a15c388fcb6f.tar.gz gcc-671d5bcb262855ea7193f8349f38a15c388fcb6f.tar.bz2 |
Define CONSTEXPR macro and use it in vec.h.
2017-05-18 Martin Liska <mliska@suse.cz>
* ansidecl.h: Define CONSTEXPR macro.
2017-05-18 Martin Liska <mliska@suse.cz>
* vec.h (struct vnull): Use it.
From-SVN: r248205
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 4 | ||||
-rw-r--r-- | include/ansidecl.h | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 9571a46..9b7a139 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2017-05-18 Martin Liska <mliska@suse.cz> + + * ansidecl.h: Define CONSTEXPR macro. + 2017-04-04 Jonathan Wakely <jwakely@redhat.com> * ansidecl.h (ATTRIBUTE_PACKED): Fix typo in comment. diff --git a/include/ansidecl.h b/include/ansidecl.h index 25f33da..f6e1761 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -313,6 +313,12 @@ So instead we use the macro below and test it against specific values. */ #define ENUM_BITFIELD(TYPE) unsigned int #endif +#if __cpp_constexpr >= 200704 +#define CONSTEXPR constexpr +#else +#define CONSTEXPR +#endif + /* C++11 adds the ability to add "override" after an implementation of a virtual function in a subclass, to: (A) document that this is an override of a virtual function |