You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/thiago/research/lmscpp/sym.cpp:18:13: error: no match for ‘operator==’ (operand types are ‘const SymEngine::RCP<const SymEngine::Basic>’ and ‘const SymEngine::RCP<const SymEngine::Basic>’)
Is this a bug ? Or its me using RCP wrongly ? Thanks in advance.
The text was updated successfully, but these errors were encountered:
thiagotps
changed the title
no match for ‘operator==’ (operand types are ‘const SymEngine::RCP<const SymEngine::Basic>’ and ‘const SymEngine::RCP<const SymEngine::Basic>’)
no match for ‘operator==’
Jun 18, 2020
Yes, it should be marked const. Btw, == will compare pointer equality and not that the two objects are equal. i.e. i1 == integer(10) will return False as they are two different Integer objects with the same value 10. You should use eq(*i1, *i2) if you want to check that the objects are equal.
Hi everyone. The following code
results in the error:
The following code compiles fine:
I think the cause for this is the lack of a const in the end of
bool operator==(const RCP<T2> &p2)
in line 172, file symengine_rcp.h:That is, i think it should be:
Is this a bug ? Or its me using
RCP
wrongly ? Thanks in advance.The text was updated successfully, but these errors were encountered: