I have the following template class Invokable<ReturnType, Arguments...>
that serves as a base class for Call
that's meant to implement a type of Invokable<ReturnType, Arguments...>
where ReturnType
== std::string
and Arguments
== std::unordered_map<std::string, std::string>
.
template<typename ReturnType, typename... Arguments>
class Invokable
{
public:
typedef std::function<ReturnType(Arguments... arguments)> Function;
Invokable(Function& function);
Invokable();
~Invokable();
ReturnType invokeFunction(const Arguments... arguments) const;
void bindFunction(Function& functionToBind);
ReturnType operator()(const Arguments... arguments) const;
};
Is there anything wrong with this specific definition that would cause the following output?:
CMakeFiles/http://ift.tt/1AQdMI7: In function `Wintermute::Call::Call(std::string const&)':
/home/jalcine/Development/Projects/Wintermute/core/src/wintermutecore/call.cpp:(.text+0x29): undefined reference to `Wintermute::Util::Invokable<std::string const, std::string const&>::Invokable()'
/home/jalcine/Development/Projects/Wintermute/core/src/wintermutecore/call.cpp:(.text+0x121): undefined reference to `Wintermute::Util::Invokable<std::string const, std::string const&>::~Invokable()'
CMakeFiles/http://ift.tt/1AQdMI7: In function `Wintermute::Call::~Call()':
/home/jalcine/Development/Projects/Wintermute/core/src/wintermutecore/call.cpp:(.text+0x18b): undefined reference to `Wintermute::Util::Invokable<std::string const, std::string const&>::~Invokable()'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libwintermutecore.so] Error 1
make[1]: *** [src/wintermutecore/CMakeFiles/http://ift.tt/1BbbXDC] Error 2
make: *** [all] Error 2
The source code for full examining is available at http://ift.tt/1AQdKjy.
Aucun commentaire:
Enregistrer un commentaire