summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qvector.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-04-04 18:13:32 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-02 23:10:55 +0000
commitd775b1fcb3fc7bd41af37f5d0a4d999320b62364 (patch)
treeb4fe9a26c57520c87d2082abe0883d0ff21938da /src/corelib/tools/qvector.h
parent78a7e54f8f5c4ca6ce1ee6b0ac82c42b21738ac5 (diff)
Remove handling of missing Q_COMPILER_INITIALIZER_LISTS
Change-Id: Id65b39c787235a051262544932e6717d076f1ea0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qvector.h')
-rw-r--r--src/corelib/tools/qvector.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 7e14a0c9b2..d6baa76a30 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -48,12 +48,10 @@
#include <QtCore/qcontainertools_impl.h>
#include <iterator>
+#include <initializer_list>
#include <vector>
#include <stdlib.h>
#include <string.h>
-#ifdef Q_COMPILER_INITIALIZER_LISTS
-#include <initializer_list>
-#endif
#include <algorithm>
@@ -76,10 +74,8 @@ public:
QVector<T> &operator=(QVector<T> &&other) noexcept
{ QVector moved(std::move(other)); swap(moved); return *this; }
void swap(QVector<T> &other) noexcept { qSwap(d, other.d); }
-#ifdef Q_COMPILER_INITIALIZER_LISTS
inline QVector(std::initializer_list<T> args);
QVector<T> &operator=(std::initializer_list<T> args);
-#endif
template <typename InputIterator, QtPrivate::IfIsInputIterator<InputIterator> = true>
inline QVector(InputIterator first, InputIterator last);
@@ -521,11 +517,10 @@ QVector<T>::QVector(int asize, const T &t)
}
}
-#ifdef Q_COMPILER_INITIALIZER_LISTS
-# if defined(Q_CC_MSVC)
+#if defined(Q_CC_MSVC)
QT_WARNING_PUSH
QT_WARNING_DISABLE_MSVC(4127) // conditional expression is constant
-# endif // Q_CC_MSVC
+#endif // Q_CC_MSVC
template <typename T>
QVector<T>::QVector(std::initializer_list<T> args)
@@ -550,10 +545,9 @@ QVector<T> &QVector<T>::operator=(std::initializer_list<T> args)
return *this;
}
-# if defined(Q_CC_MSVC)
+#if defined(Q_CC_MSVC)
QT_WARNING_POP
-# endif // Q_CC_MSVC
-#endif // Q_COMPILER_INITIALIZER_LISTS
+#endif // Q_CC_MSVC
template <typename T>
template <typename InputIterator, QtPrivate::IfIsInputIterator<InputIterator>>