blob: 2de10d604e28104c81e355ea31db76c6cf6e17d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <cstdio>
#include <memory>
#include <unordered_map>
#ifdef _MSC_VER
# include <comdef.h>
#endif
int main()
{
std::unique_ptr<int> u(new int(0));
#ifdef _MSC_VER
// clang-cl has problems instantiating this constructor in C++17 mode
// error: indirection requires pointer operand ('const _GUID' invalid)
// return *_IID;
IUnknownPtr ptr{};
IDispatchPtr disp(ptr);
#endif
return *u;
}
|