// Copyright (c) 2017 Egor Tensin // This file is part of the "PDB repository" project. // For details, see https://github.com/egor-tensin/pdb-repo. // Distributed under the MIT License. #pragma once #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); UNREFERENCED_PARAMETER(ret); } }; typedef std::unique_ptr Handle; } // namespace pdb