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
This commit is contained in:
parent
dbcb3c7446
commit
671d5bcb26
4 changed files with 15 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
|||
2017-05-18 Martin Liska <mliska@suse.cz>
|
||||
|
||||
* vec.h (struct vnull): Use it.
|
||||
|
||||
2017-05-18 Jan Hubicka <hubicka@ucw.cz>
|
||||
|
||||
* ipa-inline-analysis.c (predicate_conditions): Move to ipa-inline.h
|
||||
|
|
|
@ -416,10 +416,7 @@ struct GTY((user)) vec
|
|||
struct vnull
|
||||
{
|
||||
template <typename T, typename A, typename L>
|
||||
#if __cpp_constexpr >= 200704
|
||||
constexpr
|
||||
#endif
|
||||
operator vec<T, A, L> () { return vec<T, A, L>(); }
|
||||
CONSTEXPR operator vec<T, A, L> () { return vec<T, A, L>(); }
|
||||
};
|
||||
extern vnull vNULL;
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue