These are chat archives for symengine/symengine

19th
Apr 2016
Akash Trehan
@CodeMaxx
Apr 19 2016 14:39
@isuruf I’m getting this error when I try to use this->rcp_from_this()
error: cannot initialize a member subobject of type 'const SymEngine::Number *’

with an rvalue of type 'const SymEngine::Basic *'
Isuru Fernando
@isuruf
Apr 19 2016 14:42
Use rcp_from_this_cast to cast to a Number
Akash Trehan
@CodeMaxx
Apr 19 2016 14:56
Shouldn’t rcp_from_this() already be returning RCP<const Number> since this is a pointer to object of type Number(Infinit)?
Isuru Fernando
@isuruf
Apr 19 2016 14:57
rcp_from_this() returns a RCP<const Basic>
Akash Trehan
@CodeMaxx
Apr 19 2016 14:57
btw rcp_from_this_cast did work
I just checked symengine_rcp.h. It is templatised to get the current class, isn’t it?
Isuru Fernando
@isuruf
Apr 19 2016 15:00
T is given from EnableRCPFromThis<T>
Akash Trehan
@CodeMaxx
Apr 19 2016 15:10
How is this T in EnableRCPFromThis being controlled? Is it set to Basic by default?
Akash Trehan
@CodeMaxx
Apr 19 2016 15:17
I didn’t exactly understand what you meant by EnableRCPFromThis<T>
Isuru Fernando
@isuruf
Apr 19 2016 15:17
See the definition of Basic
Akash Trehan
@CodeMaxx
Apr 19 2016 15:19
got it! Thanks! :smile:
Iris Lui
@irislq
Apr 19 2016 15:51
@isuruf Is the Univariate Series branch approved to be merged? Can it be merged soon?