Skip to content
Snippets Groups Projects
Commit 446e35bb authored by Christian Engwer's avatar Christian Engwer
Browse files

[parameterizedobject] fix ambiguities of define

parent 9c830cb8
No related branches found
No related tags found
2 merge requests!212Fix link to build system doc,!3Feature/parameterizedobjectfactory
Pipeline #
......@@ -135,7 +135,10 @@ class ParameterizedObjectFactory<TypeT(Args...), KeyT>
* note, this does not work fundamental types
*/
template<class Impl,
typename std::enable_if<std::is_convertible<Impl, Type>::value, int>::type = 0>
typename std::enable_if<
std::is_convertible<Impl, Type>::value
and not std::is_convertible<Impl, Creator>::value,
int>::type = 0>
void define(Key const& key, Impl&& t)
{
registry_[key] = [=](Args...) { return t;};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment