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
parent
7d9cbc6b64
commit
2425465791
|
|
@ -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) {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue