#template error

11 messages · Page 1 of 1 (latest)

neat osprey
#

i am using std::set and i think that is why i am getting the template error. auto it = vertices.insert(command->vertices[j]); I'm not sure though

gusty shuttleBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

forest void
#

Okay but what is the error?

neat osprey
#
1>        with
1>        [
1>            _Kty=ORE::Vertex,
1>            _Pr=std::less<ORE::Vertex>,
1>            _Alloc=std::allocator<ORE::Vertex>
1>        ]```
#

which is that line

forest void
#

Does ORE::Vertex overload the < operator?

neat osprey
#

no

forest void
#

Well that is your issue

#

std::set uses < to organize the elements within a set

neat osprey
#

now it says message : see reference to function template instantiation '_OutIt std::transform<std::_Vector_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>,std::_Vector_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>,ORE::SpriteBatch::End::<lambda_1>>(const _InIt,const _InIt,_OutIt,_Fn)' being compiled 1> with 1> [ 1> _OutIt=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<uint16_t>>>, 1> _Ty=uint16_t, 1> _InIt=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<uint16_t>>>, 1> _Fn=ORE::SpriteBatch::End::<lambda_1> 1> ]

#

nvm fixed it