summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorAndrei Golubev <andrei.golubev@qt.io>2020-10-22 10:13:27 +0200
committerAndrei Golubev <andrei.golubev@qt.io>2020-10-24 16:28:10 +0200
commitd2cf18bf03a8f1425994e33e81cdc2c04ff7ac68 (patch)
tree6af0b855f0371129f119563ce5961c0c579da6a2 /src/corelib
parent7075b6eeae0c7b4d8b21d3892125f16830ec1830 (diff)
Refine QADP::pass_parameter_by_value evaluation
Change-Id: I8327ab3eb2503228448af59098146e062d4b90d3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qarraydatapointer.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/tools/qarraydatapointer.h b/src/corelib/tools/qarraydatapointer.h
index ce5710fa07..33b6700e6f 100644
--- a/src/corelib/tools/qarraydatapointer.h
+++ b/src/corelib/tools/qarraydatapointer.h
@@ -55,7 +55,10 @@ private:
public:
typedef typename Data::iterator iterator;
typedef typename Data::const_iterator const_iterator;
- enum { pass_parameter_by_value = std::is_fundamental<T>::value || std::is_pointer<T>::value };
+ enum {
+ pass_parameter_by_value =
+ std::is_arithmetic<T>::value || std::is_pointer<T>::value || std::is_enum<T>::value
+ };
typedef typename std::conditional<pass_parameter_by_value, T, const T &>::type parameter_type;