[URGENT]Hi, straight to the point:
I have the following class method :
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Graph</span>
{</span>
<span class="hljs-keyword">const</span> <span class="hljs-built_in">std</span>::<span class="hljs-built_in">set</span><<span class="hljs-keyword">size_t</span>>& get_selected_nodes() <span class="hljs-keyword">const</span>;
…
}
the following binding to angelscript:
engine->RegisterObjectType(<span class="hljs-string">"Graph"</span>, <span class="hljs-number">0</span>, asOBJ_REF);
engine->RegisterObjectMethod(<span class="hljs-string">"Graph"</span>, <span class="hljs-string">"set<uint>@ get_selected_nodes()"</span>, asMETHOD(gph::Graph, get_selected_nodes), asCALL_THISCALL);
engine->RegisterGlobalProperty("Graph g", g);
and i'm including and registering all the containers that are available in the angelscript repository.
The RegisterObjectMethod succeeds (i get no error when it happens)
Then i'm trying to run the following script:
g.get_selected_nodes().size();
i get crazy numbers, and with
<span class="hljs-built_in">set</span><uint>@ selected = g.get_selected_nodes();
<span class="hljs-keyword">for</span>(<span class="hljs-keyword">auto</span> it = selected.begin(); it++;)
{
print(<span class="hljs-string">""</span> + it.current());
dfs_(it.current(), <span class="hljs-number">0</span>);
}
i get crazy content.
Any idea on the possible cause?