Correct comment about const removal for shared_ptr

This commit is contained in:
William S Fulton 2017-04-20 07:49:03 +01:00
commit 660147043d

View file

@ -114,9 +114,8 @@ namespace swig {
}; };
/* /*
we have to remove the const qualifier to work around a BUG The descriptors in the shared_ptr typemaps remove the const qualifier for the SWIG type system.
SWIG_TypeQuery("std::shared_ptr<const Type>") == NULL, Remove const likewise here, otherwise SWIG_TypeQuery("std::shared_ptr<const Type>") will return NULL.
which is caused by %template treating const qualifiers not properly.
*/ */
template<class Type> template<class Type>
struct traits_from<std::shared_ptr<const Type> > { struct traits_from<std::shared_ptr<const Type> > {
@ -128,5 +127,4 @@ namespace swig {
} }
} }
//force the fragment.
%fragment("StdSharedPtrTraits"); %fragment("StdSharedPtrTraits");