1.0.2 • Published 11 months ago
nv-cli-if-constexpr-branch v1.0.2
nv-cli-if-constexpr-branch
install
- npm install nv-cli-if-constexpr-branch -g
usage
Usage: nv_cli_if_constexpr_branch [options]
Options:
-c, --type_container type container name, default std::tuple
-i, --input argument-type-option-array such as [ ["int","int64_t"], ["char*","const char*","std::string","std::string_view","std::vector<char>", "std::vector<uint8_t>"] ]
-o, --output output string,default stdout
-h, --help usage
example
# nv_cli_if_constexpr_branch -c std::tuple
// paste your argument-type-option-array here ,such as:
[
["uint32_t","int64_t"],
["char*", "const char*", "std::string", "std::string_view", "std::vector<char>"],
["bool","int8_t"]
]
// press ctrl +D
(auto/* 【&&】|【 & 】|【 *】 */... args) {
using args_t = std::tuple<decltype(args)...>;
//------------------------------------------------------
if constexpr(std::is_same_v< std::tuple<uint32_t , char* , bool >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<uint32_t , char* , int8_t >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<uint32_t , const char* , bool >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<uint32_t , const char* , int8_t >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<uint32_t , std::string , bool >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<uint32_t , std::string , int8_t >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<uint32_t , std::string_view , bool >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<uint32_t , std::string_view , int8_t >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<uint32_t , std::vector<char> , bool >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<uint32_t , std::vector<char> , int8_t >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<int64_t , char* , bool >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<int64_t , char* , int8_t >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<int64_t , const char* , bool >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<int64_t , const char* , int8_t >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<int64_t , std::string , bool >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<int64_t , std::string , int8_t >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<int64_t , std::string_view , bool >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<int64_t , std::string_view , int8_t >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<int64_t , std::vector<char> , bool >, args_t>) {
} else if constexpr(std::is_same_v< std::tuple<int64_t , std::vector<char> , int8_t >, args_t>) {
} else {
std::unreachable();
}
//------------------------------------------------------
}
LICENSE
- ISC
1.0.2
11 months ago