summaryrefslogtreecommitdiff
path: root/include/systools
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-07-02 14:49:50 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-07-02 20:17:44 +0200
commit2467e7c874aea2099048fcfc0b5d7934d8b90f48 (patch)
tree92077e726fa0b8128cff86ed8316e9af3ba39d7e /include/systools
parent8b333575ee680664fa3d83249ccec90881754ad7 (diff)
Simplify a bit
Change-Id: I97277866d1a81854b45ddb8403f2efaa67215f76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169868 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/systools')
-rw-r--r--include/systools/win32/comtools.hxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/systools/win32/comtools.hxx b/include/systools/win32/comtools.hxx
index 1d618051d2c7..124759189c15 100644
--- a/include/systools/win32/comtools.hxx
+++ b/include/systools/win32/comtools.hxx
@@ -92,10 +92,7 @@ namespace sal::systools
};
struct COM_QUERY_TAG {} constexpr COM_QUERY;
- struct COM_QUERY_THROW_TAG {} constexpr COM_QUERY_THROW;
- template <typename TAG>
- constexpr bool is_COM_query_tag
- = std::is_same_v<TAG, COM_QUERY_TAG> || std::is_same_v<TAG, COM_QUERY_THROW_TAG>;
+ struct COM_QUERY_THROW_TAG : public COM_QUERY_TAG {} constexpr COM_QUERY_THROW;
/* A simple COM smart pointer template */
template <typename T>
@@ -157,7 +154,8 @@ namespace sal::systools
~COMReference() { release(com_ptr_); }
- template <typename T2, typename TAG, std::enable_if_t<is_COM_query_tag<TAG>, int> = 0>
+ template <typename T2, typename TAG>
+ requires std::is_base_of_v<COM_QUERY_TAG, TAG>
COMReference<T2> QueryInterface(TAG) const
{
T2* ip = nullptr;