From 8157678eba97d7de5c53b424a9866d327392bbd9 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 31 May 2021 12:27:58 -0700 Subject: Fix standard incompetence found by MSVC - requires-expression still not working, because they aren't supported yet outside of a concept --- core/src/Model/Workflow/Workflow.hpp | 44 ++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 25 deletions(-) (limited to 'core/src/Model/Workflow/Workflow.hpp') diff --git a/core/src/Model/Workflow/Workflow.hpp b/core/src/Model/Workflow/Workflow.hpp index ded9bfb..161400e 100644 --- a/core/src/Model/Workflow/Workflow.hpp +++ b/core/src/Model/Workflow/Workflow.hpp @@ -5,6 +5,7 @@ #include "cplt_fwd.hpp" #include +#include #include #include #include @@ -240,34 +241,27 @@ public: /* Graph rebuild */ - struct GraphUpdateResult + enum GraphUpdateResult { - struct Success - { - }; - - struct NoWorkToDo - { - }; - - struct UnsatisfiedDependencies - { - std::vector UnsatisfiedNodes; - }; - - struct UnreachableNodes - { - std::vector UnreachableNodes; - }; - - using T = std::variant< - Success, - NoWorkToDo, - UnsatisfiedDependencies, - UnreachableNodes>; + /// Successfully rebuilt graph dependent data. + /// Details: nothing is written. + GUR_Success, + /// Nothing has changed since last time UpdateGraph() was called. + /// Details: nothing is written. + GUR_NoWorkToDo, + /// Details: list of nodes is written. + GUR_UnsatisfiedDependencies, + /// Details: list of nodes is written. + GUR_UnreachableNodes, }; - GraphUpdateResult::T UpdateGraph(); + using GraphUpdateDetails = std::variant< + // Case: nothing + std::monostate, + // Case: list of nodes (ids) + std::vector>; + + GraphUpdateResult UpdateGraph(GraphUpdateDetails* details = nullptr); /* Serialization */ -- cgit v1.2.3-70-g09d2