compat.wil
#includeWindows Implementation Library: header-only RAII for Win32 handles, COM and HRESULT
#include <wil/com.h>
mcpp add compat.wil@1.0.260126.7
Usage
From this repository's own test project — built and run by CI, not written for the website.
// Behavioral test: WIL's three families, each doing real work.
//
// A header-only package can fail in two ways a "does it link" test would miss:
// the headers might not compile under this toolchain at all (WIL is dense in
// __declspec, SAL annotations and intrinsics, and this index builds Windows
// with clang rather than cl.exe), and the RAII types might not actually release
// what they own. So the assertions observe SIDE EFFECTS — a handle that really
// closed, a COM refcount that really dropped — rather than just naming symbols.
#ifdef _WIN32
#include <wil/com.h>
#include <wil/resource.h>
#include <wil/result.h>
#include <windows.h>
#include <shobjidl.h>
#include <cassert>
#include <utility>
namespace {
// …
tests/examples/wil/tests/raii.cpp · project tests/examples/wil
Build
- targets
wil (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
*/include
Sources (1)
mcpp_generated/wil_anchor.c
Generated files
mcpp_generated/wil_anchor.c