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>
bb10
Olivier Goffart 2016-03-16 10:16:41 +01:00 committed by Olivier Goffart (Woboq GmbH)
parent 7d9cbc6b64
commit 2425465791
1 changed files with 2 additions and 2 deletions

View File

@ -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) {}