These are chat archives for ChaiScript/ChaiScript

Apr 2018
Stefan Agartsson
Apr 16 2018 12:46
Guys I'm totally lost in ampersands, static casts, shared pointers and too much coffee! How can I add this method to Chaiscript:
template <typename T, typename... Args> std::shared_ptr<T> CreateComponent(Args... args)
It exists in Entity class
This is what I have come up with, but it doesn't work: chai->add(chaiscript::fun(static_cast<std::shared_ptr<DummyComponent1> (Entity::*) ()>(&Entity::CreateComponent<DummyComponent1>)), "CreateDummy1");
Stefan Agartsson
Apr 16 2018 13:23
Never mind I'm an idiot, we shall never speak of this again!