Refactor lambda to avoid hobson's choice between warnings on clang or errors on MSVC

nix
Owen Green 5 years ago
parent c557f66ac0
commit a83c316d22

@ -1354,11 +1354,11 @@ class FluidSCWrapper : public impl::FluidSCWrapperBase<C>
auto& report = std::cout; auto& report = std::cout;
report << "ERROR: " << msg->name << " type signature incorrect.\nExpect: ("; report << "ERROR: " << msg->name << " type signature incorrect.\nExpect: (";
size_t i{0}; size_t i{0};
ForEach(args, [&i,&expectedArgCount,&report](auto& x){ ForEach(args, [&i](auto& x){
report << ParamReader<sc_msg_iter*>::argTypeToString(x); std::cout << ParamReader<sc_msg_iter*>::argTypeToString(x);
if(i < ( expectedArgCount - 1 ) ) if(i < (std::tuple_size<ArgTuple>::value - 1 ) )
{ {
report << " ,"; std::cout << " ,";
} }
i++; i++;
}); });

Loading…
Cancel
Save