diff --git a/src/shogun/base/SGObject.cpp b/src/shogun/base/SGObject.cpp index c0fe308e41b..aa8572e831b 100644 --- a/src/shogun/base/SGObject.cpp +++ b/src/shogun/base/SGObject.cpp @@ -1119,4 +1119,13 @@ std::string CSGObject::string_enum_reverse_lookup( return p.second == enum_value; }); return enum_map_it->first; -} \ No newline at end of file +} + +namespace shogun +{ +template +void test() +{ + T* a; +} +} diff --git a/src/shogun/base/SGObject.h b/src/shogun/base/SGObject.h index ac35222af9c..808c8eecfe0 100644 --- a/src/shogun/base/SGObject.h +++ b/src/shogun/base/SGObject.h @@ -53,6 +53,9 @@ template class SGStringList; using stringToEnumMapType = std::unordered_map>; +template +SG_FORCED_INLINE void test(); + /******************************************************************************* * define reference counter macros ******************************************************************************/ @@ -350,6 +353,7 @@ class CSGObject template ::value>* = nullptr> void put(const Tag& _tag, const T& value) noexcept(false) { + test(); if (has_parameter(_tag)) { auto parameter_value = get_parameter(_tag).get_value();