#pragma once #include #include #include // All fields must be default-initialized struct UpdateState { std::optional github_update_last_checked_date; bool pending_update = false; std::wstring pending_installer_filename; // To prevent concurrent modification of the file, we enforce this interface, which locks the file while // the state_modifier is active. static void store(std::function state_modifier); static UpdateState read(); };