mirror of
https://github.com/Const-me/Whisper.git
synced 2026-10-17 04:30:30 +08:00
23 lines
551 B
C++
23 lines
551 B
C++
#pragma once
|
|
#include "comLightCommon.h"
|
|
#include "client/CComPtr.hpp"
|
|
#include "utils/typeTraits.hpp"
|
|
|
|
namespace ComLight
|
|
{
|
|
namespace details
|
|
{
|
|
template<typename T>
|
|
inline constexpr void** castDoublePointerToVoid( T** pp )
|
|
{
|
|
static_assert( pointersAssignable<IUnknown, T>(), "IID_PPV_ARGS macro should be used with IUnknown interfaces" );
|
|
return reinterpret_cast<void**>( pp );
|
|
}
|
|
}
|
|
}
|
|
|
|
#ifdef IID_PPV_ARGS
|
|
#undef IID_PPV_ARGS
|
|
#endif
|
|
|
|
#define IID_PPV_ARGS( pp ) decltype( **pp )::iid, ::ComLight::details::castDoublePointerToVoid( pp ) |