Initialization of the form libff::Fr<ppT>("-1") does not behave as expected. It implicitly constructs a bigint("-1") and constructs an Fp_model from this, which obviously does not yield -1 in the prime field.
This can be confusing and time-consuming to track down.
One easy temporary option (which avoids parsing the string) may be to mark all the constructors as explicit, although the implicit conversion may already be used in many places.
Initialization of the form
libff::Fr<ppT>("-1")does not behave as expected. It implicitly constructs abigint("-1")and constructs anFp_modelfrom this, which obviously does not yield-1in the prime field.This can be confusing and time-consuming to track down.
One easy temporary option (which avoids parsing the string) may be to mark all the constructors as explicit, although the implicit conversion may already be used in many places.