diff options
Diffstat (limited to 'src/ctor.h')
-rw-r--r-- | src/ctor.h | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -98,6 +98,7 @@ enum class cxx_opt optimization, // -O<arg> position_independent_code, // -fPIC position_independent_executable, // -fPIE + define, // -D<arg>[=<arg2>] custom, // entire option taken verbatim from <arg> }; @@ -115,6 +116,7 @@ enum class c_opt optimization, // -O<arg> position_independent_code, // -fPIC position_independent_executable, // -fPIE + define, // -D<arg>[=<arg2>] custom, // entire option taken verbatim from <arg> }; @@ -159,15 +161,21 @@ public: flag(std::string_view str); flag(const char* str); flag(T opt_) : opt(opt_) {} - flag(T opt_, std::string_view arg_) : opt(opt_), arg(arg_) {} - flag(T opt_, const char* arg_) : opt(opt_), arg(arg_) {} - flag(ctor::toolchain toolchain_, T opt_) : toolchain(toolchain_), opt(opt_) {} - flag(ctor::toolchain toolchain_, T opt_, const char* arg_) : toolchain(toolchain_), opt(opt_), arg(arg_) {} - flag(ctor::toolchain toolchain_, T opt_, std::string_view arg_) : toolchain(toolchain_), opt(opt_), arg(arg_) {} + flag(T opt_, std::string_view arg_, std::string_view arg2_ = "") + : opt(opt_), arg(arg_), arg2(arg2_) {} + flag(T opt_, const char* arg_, const char* arg2_ = "") + : opt(opt_), arg(arg_), arg2(arg2_) {} + flag(ctor::toolchain toolchain_, T opt_) + : toolchain(toolchain_), opt(opt_) {} + flag(ctor::toolchain toolchain_, T opt_, const char* arg_, const char* arg2_ = "") + : toolchain(toolchain_), opt(opt_), arg(arg_), arg2(arg2_) {} + flag(ctor::toolchain toolchain_, T opt_, std::string_view arg_, std::string_view arg2_ = "") + : toolchain(toolchain_), opt(opt_), arg(arg_), arg2(arg2_) {} ctor::toolchain toolchain{ctor::toolchain::any}; T opt{}; std::string arg; + std::string arg2; }; using c_flag = ctor::flag<ctor::c_opt>; |