X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/479b8853c2ab18c98926a9369a03888021e9b986..085c36723242f7bd1e0fd9bf49b950da6cb96039:/projects/sgconf/actions.h?ds=sidebyside diff --git a/projects/sgconf/actions.h b/projects/sgconf/actions.h index f23e566d..a078e6b2 100644 --- a/projects/sgconf/actions.h +++ b/projects/sgconf/actions.h @@ -25,9 +25,9 @@ #include "parser_state.h" #include "stg/common.h" -#include "stg/optional.h" #include +#include #include @@ -67,7 +67,7 @@ template class PARAM_ACTION : public ACTION { public: - PARAM_ACTION(STG::Optional & param, + PARAM_ACTION(std::optional & param, const T & defaultValue, const std::string & paramDescription) : m_param(param), @@ -75,11 +75,11 @@ class PARAM_ACTION : public ACTION m_description(paramDescription), m_hasDefault(true) {} - explicit PARAM_ACTION(STG::Optional & param) + explicit PARAM_ACTION(std::optional & param) : m_param(param), m_hasDefault(false) {} - PARAM_ACTION(STG::Optional & param, + PARAM_ACTION(std::optional & param, const std::string & paramDescription) : m_param(param), m_description(paramDescription), @@ -93,7 +93,7 @@ class PARAM_ACTION : public ACTION void ParseValue(const std::string & value) override; private: - STG::Optional & m_param; + std::optional & m_param; T m_defaltValue; std::string m_description; bool m_hasDefault; @@ -172,7 +172,7 @@ return PARSER_STATE(false, --argc, ++argv); template inline -std::unique_ptr MakeParamAction(STG::Optional & param, +std::unique_ptr MakeParamAction(std::optional & param, const T & defaultValue, const std::string & paramDescription) { @@ -181,14 +181,14 @@ return std::make_unique>(param, defaultValue, paramDescription); template inline -std::unique_ptr MakeParamAction(STG::Optional & param) +std::unique_ptr MakeParamAction(std::optional & param) { return std::make_unique>(param); } template inline -std::unique_ptr MakeParamAction(STG::Optional & param, +std::unique_ptr MakeParamAction(std::optional & param, const std::string & paramDescription) { return std::make_unique>(param, paramDescription);