| 1810 | template <typename T, |
| 1811 | enable_if_t<std::is_integral<T>::value && std::is_unsigned<T>::value, detail::enabler> = detail::dummy> |
| 1812 | void sum_flag_vector(const std::vector<std::string> &flags, T &output) { |
| 1813 | std::int64_t count{0}; |
| 1814 | for (auto &flag : flags) { |
| 1815 | count += detail::to_flag_value(flag); |
| 1816 | } |
| 1817 | output = (count > 0) ? static_cast<T>(count) : T{0}; |
| 1818 | } |
| 1819 | |
| 1820 | /// Sum a vector of flag representations |
| 1821 | /// The flag vector produces a series of strings in a vector, simple true is represented by a "1", simple false is |
no test coverage detected