[...] //S_FILLER s(*vm); Crashes if it contains int or double S_FILLER s; S_convert(&s,vm); [...] template <class T> void S_convert(T * s, ValueMap * vm){ for(int i=0;i<vm->GetCount();i++){ Ref r=s->GetRef(SqlId(vm->GetKey(i))); if(r.Is<double>()) s->Set(SqlId(vm->GetKey(i)),StrDbl(AsString(vm->GetValue(i)))); if(r.Is<int>()) s->Set(SqlId(vm->GetKey(i)),StrInt(AsString(vm->GetValue(i)))); if(r.Is<String>()) s->Set(SqlId(vm->GetKey(i)),AsString(vm->GetValue(i))); } }
Report message to a moderator