From f6158ea53b90a60899ee8171c04dc1f978fb8723 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Mon, 26 Feb 2024 00:30:51 -0800 Subject: [PATCH] finally.hh: include works by itself; mark as nodiscard --- src/libutil/finally.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libutil/finally.hh b/src/libutil/finally.hh index db654301f..4cae20a36 100644 --- a/src/libutil/finally.hh +++ b/src/libutil/finally.hh @@ -1,11 +1,13 @@ #pragma once ///@file +#include + /** * A trivial class to run a function at the end of a scope. */ template -class Finally +class [[nodiscard("Finally values must be used")]] Finally { private: Fn fun;