Move __cpp_constexpr check inside Q_COMPILER_CONSTEXPR check
Q_COMPILER_CONSTEXPR can be undefined (or not defined at all) to
indicate that constexpr should not be used regardless of the compiler's
ability to support it. This is done for QNX because some C library
floating point functions used in the Dinkumware C++ library aren't
constexpr functions; i.e., the library doesn't have proper constexpr
support even though the compiler does.
(cherry picked from commit d87242968f)
Change-Id: If0bdeb2180710dd9ccd97d79fa91cf9ff42f7990
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
parent
50d70fd1e3
commit
d4e98a9a38
|
|
@ -1010,16 +1010,18 @@
|
|||
# define Q_COMPILER_DEFAULT_DELETE_MEMBERS
|
||||
#endif
|
||||
|
||||
#if defined(__cpp_constexpr) && __cpp_constexpr-0 >= 201304
|
||||
# define Q_DECL_CONSTEXPR constexpr
|
||||
# define Q_DECL_RELAXED_CONSTEXPR constexpr
|
||||
# define Q_CONSTEXPR constexpr
|
||||
# define Q_RELAXED_CONSTEXPR constexpr
|
||||
#elif defined Q_COMPILER_CONSTEXPR
|
||||
# define Q_DECL_CONSTEXPR constexpr
|
||||
# define Q_DECL_RELAXED_CONSTEXPR
|
||||
# define Q_CONSTEXPR constexpr
|
||||
# define Q_RELAXED_CONSTEXPR const
|
||||
#if defined Q_COMPILER_CONSTEXPR
|
||||
# if defined(__cpp_constexpr) && __cpp_constexpr-0 >= 201304
|
||||
# define Q_DECL_CONSTEXPR constexpr
|
||||
# define Q_DECL_RELAXED_CONSTEXPR constexpr
|
||||
# define Q_CONSTEXPR constexpr
|
||||
# define Q_RELAXED_CONSTEXPR constexpr
|
||||
# else
|
||||
# define Q_DECL_CONSTEXPR constexpr
|
||||
# define Q_DECL_RELAXED_CONSTEXPR
|
||||
# define Q_CONSTEXPR constexpr
|
||||
# define Q_RELAXED_CONSTEXPR const
|
||||
# endif
|
||||
#else
|
||||
# define Q_DECL_CONSTEXPR
|
||||
# define Q_DECL_RELAXED_CONSTEXPR
|
||||
|
|
|
|||
Loading…
Reference in New Issue