herumi / mcl

a portable and fast pairing-based cryptography library
BSD 3-Clause "New" or "Revised" License
450 stars 152 forks source link

Example code for operator overloading in C++ #130

Closed guruvamsi-policharla closed 2 years ago

guruvamsi-policharla commented 2 years ago

Is there an example file for operator overloading in C++? Such as multiplication, group addition, etc. Currently, the examples don't use it and I had to dig through the code/previous issues to figure out how to use it. I'm happy to create one.

herumi commented 2 years ago

I'll make the document. Could you see https://github.com/herumi/mcl/blob/master/test/fp_test.cpp and https://github.com/herumi/mcl/blob/master/test/ec_test.cpp#L67 for some examples?

guruvamsi-policharla commented 2 years ago

Thanks!