diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2016-03-16 10:16:41 +0100 |
---|---|---|
committer | Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> | 2016-03-29 14:11:13 +0000 |
commit | 2425465791e9216b75b88671436fd6bde7f2d92d (patch) | |
tree | 0b3efe8f0f7ca972a6fdfb6712c89a9d3e72cfb6 /src | |
parent | 7d9cbc6b643b472304960842cd60ec4ba3319f37 (diff) |
QFlags documentation: The constructors are constexpr
One day we might add that information to the documentation itself.
But it is important to declare them as constexpr otherwise this causes
error while parsing code that wants it to be constexpr when generating the
documentation of other constexpr function
Change-Id: I28120fea90b29fe1e87af0d8cded0f2430e35443
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qflags.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/global/qflags.h b/src/corelib/global/qflags.h index b907caa9b6..f3082a1e39 100644 --- a/src/corelib/global/qflags.h +++ b/src/corelib/global/qflags.h @@ -111,8 +111,8 @@ public: typedef Enum enum_type; // compiler-generated copy/move ctor/assignment operators are fine! #ifdef Q_QDOC - inline QFlags(const QFlags &other); - inline QFlags &operator=(const QFlags &other); + Q_DECL_CONSTEXPR inline QFlags(const QFlags &other); + Q_DECL_CONSTEXPR inline QFlags &operator=(const QFlags &other); #endif Q_DECL_CONSTEXPR inline QFlags(Enum f) Q_DECL_NOTHROW : i(Int(f)) {} Q_DECL_CONSTEXPR inline QFlags(Zero = Q_NULLPTR) Q_DECL_NOTHROW : i(0) {} |