QAtomic: make ctors constexpr, if possible
authorMarc Mutz <marc.mutz@kdab.com>
Sun, 1 Jul 2012 21:22:38 +0000 (23:22 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 20 Aug 2012 14:58:36 +0000 (16:58 +0200)
commit31788fc9818c9914d50c1a6a842d3dda16a26172
treebd5c883b25c779e17ce8dc72298bf9b3b3c67eaa
parent21072c85b64f301f42b6fe0694dcdb0a571a7893
QAtomic: make ctors constexpr, if possible

This requires using the same chain of conditions that QBasicAtomic*
uses in order to provide constructors, so we're using the newly-added
macro QT_BASIC_ATOMIC_HAS_CONSTRUCTORS to check.

Even though QAtomic<> is a template, we can't just use Q_DECL_CONSTEXPR
since the body of the constructors needs to change, too.

Change-Id: I462a80ed175040f7709c30d07d34036c6c5507d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/corelib/thread/qatomic.h