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 <>
183
183
template <>
184
184
[[nodiscard]] std::vector<double > convertFromString<std::vector<double >>(StringView str);
185
185
186
+ // Boolean values separated by the character ";"
187
+ template <>
188
+ [[nodiscard]] std::vector<bool > convertFromString<std::vector<bool >>(StringView str);
189
+
186
190
// Strings separated by the character ";"
187
191
template <>
188
192
[[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)
237
237
return output;
238
238
}
239
239
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
+
240
253
template <>
241
254
std::vector<std::string> convertFromString<std::vector<std::string>>(StringView str)
242
255
{
You can’t perform that action at this time.
0 commit comments