Skip to content

Commit

Permalink
don't allow for pointer inside Some<> and use enable_if_t
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Feb 28, 2018
1 parent 73ed804 commit dc6df7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shogun/base/SGObject.h
Expand Up @@ -403,7 +403,7 @@ class CSGObject
* @param name name of the parameter
* @param value value of the parameter, wrapped in smart pointer
*/
template <typename T, typename T2 = typename std::enable_if<std::is_base_of<CSGObject, typename std::remove_pointer<T>::type>::value, T>::type>
template <typename T, typename std::enable_if_t<std::is_base_of<CSGObject, T>::value, T>* = nullptr>
void put(const std::string& name, Some<T> value)
{
put(name, (CSGObject*)(value.get()));
Expand Down

0 comments on commit dc6df7c

Please sign in to comment.