c++ - Calling a static class method using a class type template -


i've seen questions no definite answer if possible other way/if should done differently. have this:

template <typename t> static t* selfspawn(uworld* world, aactor* ownerparam) {     if(!world)     {         return nullptr;     }      factorspawnparameters params = factorspawnparameters();     params.owner = ownerparam;     t* thisactor = world->spawnactordeferred<t>(t::staticclass(), ftransform(frotator(0.f, 90.f, -90.f)));      aactor* newactor = ugameplaystatics::finishspawningactor(thisactor, ftransform(frotator(0.f, 90.f, -90.f)));      return cast<t>(newactor); } 

t::staticclass() throw error because doesn't know sure if t class type. question is, there anyway template specialization or guarantee t class type work?


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -