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
I am trying to use relic in a C++ project (MPSPDZ). In a class with members of type gt_t, I am trying to overload some operators. For example, to assign gt_t gtpoint, we need to use gt_copy. However gt_copy expects a non constant pointer but for operator overloading we will always get a const.
Two questions:
Will changing the argument type to const in gt_copy affect relic in any unwanted way?
From the macro gt_copy how to determine which function is going to be used, is there any documentation on that?
Is there any possible trick to do this without changes in relic?
GtElement& GtElement::operator =(const GtElement& other)
{
gt_copy(gtpoint, other.gtpoint); // other.gtpoint is a non constant pointer
return *this;
}
The text was updated successfully, but these errors were encountered:
If you are using the BLS12-381 preset or the default configuration, then gt_copy is defined to be fp12_copy. I had tried enforcing const correctness for the extension field types a few years ago, but failed somehow.
It should definitely fix the problem. Currently, the way around I mentioned above is working fine it seems.
There is another issue #234 which caused a major headache.
Thank you so much for your support and this awsm project!
I am trying to use relic in a C++ project (MPSPDZ). In a class with members of type
gt_t
, I am trying to overload some operators. For example, to assigngt_t gtpoint
, we need to usegt_copy
. Howevergt_copy
expects a non constant pointer but for operator overloading we will always get a const.Two questions:
gt_copy
affect relic in any unwanted way?gt_copy
how to determine which function is going to be used, is there any documentation on that?The text was updated successfully, but these errors were encountered: