| 130 | |
| 131 | template <typename T, typename F> |
| 132 | bool HandleOption( |
| 133 | const std::map<std::string, std::string> &options, const char *name, T &variable, F handler) |
| 134 | { |
| 135 | if (options.find(name) != options.end()) |
| 136 | { |
| 137 | variable = handler(options.find(name)->second); |
| 138 | return true; |
| 139 | } |
| 140 | else |
| 141 | { |
| 142 | return false; |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | template <typename T> |
| 147 | bool HandleOption(const std::map<std::string, std::string> &options, const char *name, T &variable) |