Original Post
I am just wondering if there exist std::vector bindings for angelscript?
Quote:
Original post by WitchLord
Anthony's std::vector binding is part of my regression test suite. You can find the updated version in the tests/test_feature/source/ folder in the sdk.
I haven't made a standard add_on as it overloads the built-in array type.
Regards,
Andreas
// Register std::vector<int>RegisterVector("intVector", "int", engine);// Register std::vector<float>RegisterVector("floatVector", "float", engine);Quote:
Original post by WitchLord
Obviously you can't register the std::vector template as some generic type that AngelScript will derive from. Templates doesn't work that way, but what you do is that you register a vector type for each vector specialization you want.
With Anthony's implementation you register the std::vector for each element type with a call to RegisterVector, e.g:// Register std::vector<int>RegisterVector("intVector", "int", engine);// Register std::vector<float>RegisterVector("floatVector", "float", engine);
This topic has been locked by a moderator. New replies are not allowed.
GameDev.net uses cookies to ensure you have the best experience on our platform. Learn more