Я пытаюсь скомпилировать библиотеку EnTT (версия 2.7.3 для cpp14), используя MinGW GCC-6.3.0 в Eclipse Oxygen.При компиляции я получаю следующие ошибки:
Info: Internal Builder is used for build
g++ -std=c++1y -D__GXX_EXPERIMENTAL_CXX0X__ -O0 -g3 -Wall -c -fmessage-length=0 -std=c++14 -o "source\\main.o" "..\\source\\main.cpp"
In file included from c:\mingw\include\entt\entt.hpp:10:0,
from ..\source\includes.hpp:23,
from ..\source\main.cpp:1:
c:\mingw\include\entt\entity/helper.hpp: In function 'void entt::connect(entt::Sink<void(entt::Registry<Entity>&, Entity)>)':
c:\mingw\include\entt\entity/helper.hpp:56:19: error: parse error in template argument list
sink.template connect<dependency<Entity, Dependency...>>();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\mingw\include\entt\entity/helper.hpp:56:19: error: expected identifier
c:\mingw\include\entt\entity/helper.hpp: In function 'void entt::disconnect(entt::Sink<void(entt::Registry<Entity>&, Entity)>)':
c:\mingw\include\entt\entity/helper.hpp:79:19: error: parse error in template argument list
sink.template disconnect<dependency<Entity, Dependency...>>();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\mingw\include\entt\entity/helper.hpp:79:19: error: expected identifier
Вот такие грубые функции:
template<typename Entity, typename... Component>
void dependency(Registry<Entity> ®istry, const Entity entity) {
using accumulator_type = int[];
accumulator_type accumulator = { ((registry.template has<Component>(entity) ? void() : (registry.template assign<Component>(entity), void())), 0)... };
(void)accumulator;
}
template<typename... Dependency, typename Entity>
inline void connect(Sink<void(Registry<Entity> &, const Entity)> sink) {
sink.template connect<dependency<Entity, Dependency...>>();
}
template<typename... Dependency, typename Entity>
inline void disconnect(Sink<void(Registry<Entity> &, const Entity)> sink) {
sink.template disconnect<dependency<Entity, Dependency...>>();
}