From e425c81db664af858bfbb5acee9adf5927bb90c1 Mon Sep 17 00:00:00 2001 From: Guillaume Jacquemin Date: Sun, 8 Dec 2024 20:33:13 +0100 Subject: [PATCH] Application: improve drawUnsafeWidget(). --- src/Application/Application.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Application/Application.h b/src/Application/Application.h index 9c16709..1a18a16 100644 --- a/src/Application/Application.h +++ b/src/Application/Application.h @@ -186,6 +186,7 @@ class Application: public Platform::Sdl2Application, public efsw::FileWatchListe template bool drawUnsafeWidget(Functor func, Args... args) { + static_assert(std::is_invocable_r_v); GameState game_state = _gameState; // Copying the value to reduce the risk of a data race. ImGui::BeginDisabled(game_state != GameState::NotRunning); bool result = func(std::forward(args)...);