// Copyright (c) 2017 Egor Tensin // This file is part of the "winapi-debug" project. // For details, see https://github.com/egor-tensin/winapi-debug. // Distributed under the MIT License. #pragma once #include "workarounds.hpp" #include #include #include namespace pdb { struct CloseHandle { void operator()(HANDLE raw) const { if (raw == NULL || raw == INVALID_HANDLE_VALUE) return; const auto ret = ::CloseHandle(raw); assert(ret); PDB_UNUSED_PARAMETER(ret); } }; typedef std::unique_ptr Handle; } // namespace pdb