blob: 3174c92da254b1efd67754766bd553923d6bf6fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#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 )
|