@@ -168,9 +168,16 @@ struct ModifiedVariable
168168 response::Value result { response::Type::List };
169169
170170 result.reserve (listValue.size ());
171- std::ranges::for_each (listValue, [&result](auto & value) {
172- result.emplace_back (serialize<Other...>(std::move (value)));
173- });
171+ if constexpr (std::is_same_v<Type,bool >){
172+ for (auto const v: listValue)
173+ result.emplace_back (Variable<bool >::serialize (bool {v}));
174+ }
175+ else {
176+ std::ranges::for_each (listValue, [&result](auto & value) {
177+ result.emplace_back (serialize<Other...>(std::move (value)));
178+ });
179+ }
180+
174181 listValue.clear ();
175182
176183 return result;
@@ -217,11 +224,19 @@ struct ModifiedVariable
217224 duplicate (const typename VariableTraits<Type, Modifier, Other...>::type& listValue)
218225 requires ListModifier<Modifier>
219226 {
220- typename VariableTraits<Type, Modifier, Other...>::type result (listValue.size ());
221-
222- std::ranges::transform (listValue, result.begin (), duplicate<Other...>);
223-
224- return result;
227+ if constexpr (std::is_same_v<Type,bool >){
228+ typename VariableTraits<Type, Modifier, Other...>::type result;
229+ result.reserve (listValue.size ());
230+ for (auto const v: listValue)
231+ result.push_back (v);
232+ return result;
233+ }
234+ else
235+ {
236+ typename VariableTraits<Type, Modifier, Other...>::type result (listValue.size ());
237+ std::ranges::transform (listValue, result.begin (), duplicate<Other...>);
238+ return result;
239+ }
225240 }
226241};
227242
0 commit comments