From 00dce1cc0078f9633d121908172346cc22deb3c3 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 23 Jun 2014 11:47:49 -0700 Subject: [PATCH] Make the fetchAndAddRelaxed function a member template This way, no compiler can instantiate it at class instantiation time. We don't want them to do it for T that are function pointers (sizeof functions is meaningless). Change-Id: I6d5044bd5d9ffd0d347f1f38ab33c64213730788 Reviewed-by: Olivier Goffart Reviewed-by: David Faure --- src/corelib/arch/qatomic_bootstrap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/arch/qatomic_bootstrap.h b/src/corelib/arch/qatomic_bootstrap.h index 0d6843a3e5..1ab901d826 100644 --- a/src/corelib/arch/qatomic_bootstrap.h +++ b/src/corelib/arch/qatomic_bootstrap.h @@ -85,8 +85,8 @@ template struct QAtomicOps: QGenericAtomicOps > return tmp; } - static - T fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType::AdditiveT valueToAdd) Q_DECL_NOTHROW + template static + T fetchAndAddRelaxed(T &_q_value, AdditiveType valueToAdd) Q_DECL_NOTHROW { T returnValue = _q_value; _q_value += valueToAdd;