diff options
author | Adam Majer <adamm@zombino.com> | 2014-09-05 15:30:49 -0500 |
---|---|---|
committer | Adam Majer <adamm@zombino.com> | 2014-09-06 04:11:29 +0200 |
commit | 357f80878d56d9b612724533fa7ad9d25c7ec100 (patch) | |
tree | ae078acb73eeca682a19019ed541136b6e31827a | |
parent | 93560de9de6ce1a8357c7ba4bd26becee4d35d99 (diff) |
Bump Q_COMPILER_INITIALIZER_LISTS to GCC 4.5
While GCC 4.4 has the required header, it is missing important
typedefs requiring use of pointers instead. This is acceptable if only
used in one or two places, but a quick search through the source code
lists quite a few usages of const_iterator typedef.
$ git grep -c initializer_list\<.\*\>::const_iterator
src/corelib/global/qflags.h:2
src/corelib/json/qjsonarray.h:1
src/corelib/json/qjsonobject.h:1
src/corelib/tools/qhash.h:2
src/corelib/tools/qmap.h:2
src/corelib/tools/qset.h:1
The lesser-evil is to bump Q_COMPILER_INITIALIZER_LISTS to version
GCC 4.5 and retain usage of required (by standard) initializer_list
typedefs.
Change-Id: I38d6fa0ef3dc7d958587b406d33e3e3a7378c026
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 3bf1cc0cbb..2c7a00133d 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -742,7 +742,6 @@ # define Q_COMPILER_DEFAULT_MEMBERS # define Q_COMPILER_DELETE_MEMBERS # define Q_COMPILER_EXTERN_TEMPLATES -# define Q_COMPILER_INITIALIZER_LISTS # define Q_COMPILER_UNIFORM_INIT # define Q_COMPILER_UNICODE_STRINGS # define Q_COMPILER_VARIADIC_TEMPLATES @@ -750,6 +749,9 @@ # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 /* C++11 features supported in GCC 4.5: */ # define Q_COMPILER_EXPLICIT_CONVERSIONS + /* GCC 4.4 implements initializer_list but does not define typedefs required + * by the standard. */ +# define Q_COMPILER_INITIALIZER_LISTS # define Q_COMPILER_LAMBDA # define Q_COMPILER_RAW_STRINGS # endif |