From 0923bca7efd56adac52b350126a8ad5a37df3a08 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Sat, 22 Jul 2023 06:40:45 +0200 Subject: [PATCH] Fix scope guard --- include/clopts.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/clopts.hh b/include/clopts.hh index 4e8683a..c514775 100644 --- a/include/clopts.hh +++ b/include/clopts.hh @@ -300,7 +300,7 @@ static file_data_type map_file( /// Read the file manually. auto f = std::fopen(path.data(), "rb"); if (not f) return err(path); - at_scope_exit _close_file = [&] { std::fclose(f); }; + at_scope_exit _close_file; /// Get the file size. std::fseek(f, 0, SEEK_END);