summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qarraydata.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-04-02 11:56:33 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-04-06 13:27:15 +0000
commit4628e5cded8b1b4f064b75f23436bc6fc66ce043 (patch)
tree5905116fb5345f89160e47b4c6e50d59e9fd2e8c /src/corelib/tools/qarraydata.h
parent1ef274fb947f86731d062df2128718cc8a0cf643 (diff)
Remove handling of missing very old compiler feature check
Removes handling of missing Q_COMPILER_NULLPTR, Q_COMPILER_AUTODECL, Q_COMPILER_LAMBDA, Q_COMPILER_VARIADIC_MACROS and Q_COMPILER_AUTO_FUNCTION. We haven't supported any compilers without these for a long time. Change-Id: I3df88206516a25763e2c28b083733780f35a8764 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qarraydata.h')
-rw-r--r--src/corelib/tools/qarraydata.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/corelib/tools/qarraydata.h b/src/corelib/tools/qarraydata.h
index f78b9be2db..7e3f8c9dbd 100644
--- a/src/corelib/tools/qarraydata.h
+++ b/src/corelib/tools/qarraydata.h
@@ -306,8 +306,6 @@ struct QArrayDataPointerRef
// accomplished by hiding a static const instance of QStaticArrayData, which is
// POD.
-#if defined(Q_COMPILER_VARIADIC_MACROS)
-#if defined(Q_COMPILER_LAMBDA)
// Hide array inside a lambda
#define Q_ARRAY_LITERAL(Type, ...) \
([]() -> QArrayDataPointerRef<Type> { \
@@ -324,10 +322,7 @@ struct QArrayDataPointerRef
return StaticWrapper::get(); \
}()) \
/**/
-#endif
-#endif // defined(Q_COMPILER_VARIADIC_MACROS)
-#if defined(Q_ARRAY_LITERAL)
#define Q_ARRAY_LITERAL_IMPL(Type, ...) \
union { Type type_must_be_POD; } dummy; Q_UNUSED(dummy) \
\
@@ -342,31 +337,6 @@ struct QArrayDataPointerRef
{ static_cast<QTypedArrayData<Type> *>( \
const_cast<QArrayData *>(&literal.header)) }; \
/**/
-#else
-// As a fallback, memory is allocated and data copied to the heap.
-
-// The fallback macro does NOT use variadic macros and does NOT support
-// variable number of arguments. It is suitable for char arrays.
-
-namespace QtPrivate {
- template <class T, size_t N>
- inline QArrayDataPointerRef<T> qMakeArrayLiteral(const T (&array)[N])
- {
- union { T type_must_be_POD; } dummy; Q_UNUSED(dummy)
-
- QArrayDataPointerRef<T> result = { QTypedArrayData<T>::allocate(N) };
- Q_CHECK_PTR(result.ptr);
-
- ::memcpy(result.ptr->data(), array, N * sizeof(T));
- result.ptr->size = N;
-
- return result;
- }
-}
-
-#define Q_ARRAY_LITERAL(Type, Array) \
- QT_PREPEND_NAMESPACE(QtPrivate::qMakeArrayLiteral)<Type>( Array )
-#endif // !defined(Q_ARRAY_LITERAL)
namespace QtPrivate {
struct Q_CORE_EXPORT QContainerImplHelper