Closed Titaniumtown closed 4 years ago
Change
template<typename T, typename... Args>
T* create_entity(Args... args);
to
template<typename T, typename... Args>
T* create_entity(Args... args);
and
template<typename T, typename ...Args>
inline T* Universe::create_entity(Args... args)
to
template<typename T, typename ...Args>
inline T* Universe::create_entity(Args && ... args)
and
T* n_ent = new T(args);
to
T* n_ent = new T(std::forward<Args>(args)...);
Agh why is Visual Studio so permissive... Will push the fix next commit
Visual Studio actually reports these errors, but you need to call the code that causes them somewhere.
Enabling /permissive- doesn't seem to change that behaviour, but it throws some warnings on the dependency libraries.
It's fixed now, forgot to close the issue!
I get the following error during compilation:
/home/simon/new-ospgl/src/universe/Universe.h:83:13: error: parameter packs not expanded with ‘...’: 83 | T* n_ent = new T(args); | ^~~~~~~~~~~