X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/c02633d77cb05a5deb05440d77b12ccc5bc19b85..a91e9542b384905187890f161d4da5396996fcfd:/projects/sgconf/actions.h 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);