QNX: fix compilation with C++11 enabled
QNX uses GCC, but by default not libstdc++ as the standard library, but 'libcpp', a Dinkumware-derived implementation that doesn't sport many of the C++11 features, yet. Thus, the compiler detection sets Q_COMPILER_INITIALIZER_LIST, which is true, in a way, but we're lacking stdlib support, so the next \#include <initializer_list> will fail. So, simply don't define Q_COMPILER_INITIALIZER_LIST if we're on QNX and detect a Dinkumware signature (taken from Boost.Config). This is a hot-fix. I'm also preparing a more comprehensive solution (qstdlibdetection.h). Change-Id: Ieeb147251c2935517faba61f75d1580a9e1649c4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>bb10
parent
fcef238d3c
commit
9180d9aa8b
|
|
@ -661,6 +661,18 @@
|
|||
//# define Q_COMPILER_INITIALIZER_LISTS
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_BLACKBERRY) || defined(Q_OS_QNX)
|
||||
# include <utility>
|
||||
# if defined(_YVALS) || defined(_LIBCPP_VER)
|
||||
// QNX: libcpp (Dinkumware-based) doesn't have the <initializer_list>
|
||||
// header, so the feature is useless, even if the compiler supports
|
||||
// it. Disable.
|
||||
# ifdef Q_COMPILER_INITIALIZER_LISTS
|
||||
# undef Q_COMPILER_INITIALIZER_LISTS
|
||||
# endif
|
||||
# endif
|
||||
#endif // Q_OS_BLACKBERRY || Q_OS_QNX
|
||||
|
||||
/*
|
||||
* C++11 keywords and expressions
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue