std::string apply()

in include/poac/core/inference.hpp [181:189]


    std::string apply(S&& func, const S& cmd, VS&& arg) {
        namespace exception = core::exception;
        if (auto itr = subcmd_map.find(cmd); itr != subcmd_map.end())
            return _apply(std::move(func), itr->second, std::move(arg));
        else if (itr = option_map.find(cmd); itr != option_map.end())
            return _apply(std::move(func), itr->second, std::move(arg));
        else
            throw exception::invalid_first_arg("Invalid argument");
    }