File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,10 @@ template <>
183183template <>
184184[[nodiscard]] std::vector<double > convertFromString<std::vector<double >>(StringView str);
185185
186+ // Boolean values separated by the character ";"
187+ template <>
188+ [[nodiscard]] std::vector<bool > convertFromString<std::vector<bool >>(StringView str);
189+
186190// Strings separated by the character ";"
187191template <>
188192[[nodiscard]] std::vector<std::string>
Original file line number Diff line number Diff line change @@ -237,6 +237,19 @@ std::vector<double> convertFromString<std::vector<double>>(StringView str)
237237 return output;
238238}
239239
240+ template <>
241+ std::vector<bool > convertFromString<std::vector<bool >>(StringView str)
242+ {
243+ auto parts = splitString (str, ' ;' );
244+ std::vector<bool > output;
245+ output.reserve (parts.size ());
246+ for (const StringView& part : parts)
247+ {
248+ output.push_back (convertFromString<bool >(part));
249+ }
250+ return output;
251+ }
252+
240253template <>
241254std::vector<std::string> convertFromString<std::vector<std::string>>(StringView str)
242255{
You can’t perform that action at this time.
0 commit comments