permissions: Work around template partial specialization GCC bug
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71954 Pick-to: 6.5 Change-Id: I029f881fc44494a94c3e0233af3f3587b63ce7c4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
c968405455
commit
cbc239b52b
@ -36,9 +36,6 @@ class QPermission
|
|||||||
template <typename T, typename Enable = void>
|
template <typename T, typename Enable = void>
|
||||||
static constexpr inline bool is_permission_v = false;
|
static constexpr inline bool is_permission_v = false;
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static constexpr inline bool is_permission_v<T, typename T::QtPermissionHelper> = true;
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
using if_permission = std::enable_if_t<is_permission_v<T>, bool>;
|
using if_permission = std::enable_if_t<is_permission_v<T>, bool>;
|
||||||
public:
|
public:
|
||||||
@ -72,6 +69,9 @@ private:
|
|||||||
friend class QCoreApplication;
|
friend class QCoreApplication;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
constexpr bool QPermission::is_permission_v<T, typename T::QtPermissionHelper> = true;
|
||||||
|
|
||||||
#define QT_PERMISSION(ClassName) \
|
#define QT_PERMISSION(ClassName) \
|
||||||
using QtPermissionHelper = void; \
|
using QtPermissionHelper = void; \
|
||||||
friend class QPermission; \
|
friend class QPermission; \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user