From 2425465791e9216b75b88671436fd6bde7f2d92d Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 16 Mar 2016 10:16:41 +0100 Subject: 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 Reviewed-by: Martin Smith --- src/corelib/global/qflags.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib') 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) {} -- cgit v1.2.3