diff --git a/alib2common/src/object/ObjectFactory.h b/alib2common/src/object/ObjectFactory.h index 08447e4b11c7f6ccdfcdd80c6887afbd8401b5c9..124ee8c0e362931ee943e6ef5b089f47672ab925 100644 --- a/alib2common/src/object/ObjectFactory.h +++ b/alib2common/src/object/ObjectFactory.h @@ -150,9 +150,9 @@ public: * \brief * Specialisation of the make method for objects that are not from the object hierarchy of Algorithms library */ - template < class Type, typename std::enable_if < ! std::is_convertible < Type *, object::ObjectBase * >::value, Type >::type * = nullptr > + template < class Type, typename std::enable_if < ! std::is_convertible < const Type &, const object::ObjectBase & >::value, typename std::decay < Type >::type >::type * = nullptr > static Object make ( Type && data ) { - return Object ( object::AnyObject < Type > ( std::forward < Type > ( data ) ) ); + return Object ( object::AnyObject < typename std::decay < Type >::type > ( std::forward < Type && > ( data ) ) ); } /**