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
Simple program failed to compile with VS2019 (It should be the same with the other compilers).
voidfoo(mpreal &&);
mpreal a,b;
foo(a+b); // a+b has a type of const mpreal
Note the signature of operator+: inline const mpreal operator+(const mpreal& a, const mpreal& b). It seems quite unnormal that returning value with a const qualifier. I don't know if there is any benefit by return value with const qualifier. However, there is clearly a drawback.
The text was updated successfully, but these errors were encountered:
Thank you for reporting this. I added const qualifier in 2008, have no idea why. It didn't cause any issues back then.
Clearly we need to change this to support move semantic. Will consider doing this in future.
Thank you for reporting this. I added const qualifier in 2008, have no idea why. It didn't cause any issues back then. Clearly we need to change this to support move semantic. Will consider doing this in future.
Simple program failed to compile with VS2019 (It should be the same with the other compilers).
Note the signature of operator+:
inline const mpreal operator+(const mpreal& a, const mpreal& b)
. It seems quite unnormal that returning value with a const qualifier. I don't know if there is any benefit by return value with const qualifier. However, there is clearly a drawback.The text was updated successfully, but these errors were encountered: