aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog4
-rw-r--r--include/ansidecl.h6
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