Skip to content

Commit 75522bc

Browse files
author
Rafał Hibner
committed
Fix list of boolean argument
1 parent ccd4da8 commit 75522bc

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

include/graphqlservice/GraphQLService.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -977,11 +977,18 @@ struct ModifiedArgument
977977
duplicate(const typename ArgumentTraits<Type, Modifier, Other...>::type& listValue)
978978
requires ListModifier<Modifier>
979979
{
980-
typename ArgumentTraits<Type, Modifier, Other...>::type result(listValue.size());
981-
982-
std::ranges::transform(listValue, result.begin(), duplicate<Other...>);
983-
984-
return result;
980+
if constexpr(std::is_same_v<Type,bool>){
981+
typename ArgumentTraits<Type, Modifier, Other...>::type result;
982+
result.reserve(listValue.size());
983+
for (auto const v: listValue)
984+
result.push_back(v);
985+
}
986+
else
987+
{
988+
typename ArgumentTraits<Type, Modifier, Other...>::type result(listValue.size());
989+
std::ranges::transform(listValue, result.begin(), duplicate<Other...>);
990+
return result;
991+
}
985992
}
986993
};
987994

0 commit comments

Comments
 (0)