Clear warning on missing assignment operator

pull/853/head
Jeffrey Walton 2019-06-03 23:17:15 -04:00
parent c76711237a
commit f330c0eca8
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 17 additions and 11 deletions

View File

@ -26,15 +26,17 @@ CRYPTOPP_DLL_TEMPLATE_CLASS AbstractRing<Integer>;
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractEuclideanDomain<Integer>;
/// \brief Ring of congruence classes modulo n
/// \details This implementation represents each congruence class as the smallest
/// non-negative integer in that class.
/// \details <tt>const Element&</tt> returned by member functions are references
/// to internal data members. Since each object may have only
/// one such data member for holding results, the following code
/// will produce incorrect results:
/// <pre> abcd = group.Add(group.Add(a,b), group.Add(c,d));</pre>
/// But this should be fine:
/// \details This implementation represents each congruence class as
/// the smallest non-negative integer in that class.
/// \details <tt>const Element&</tt> returned by member functions are
/// references to internal data members. Since each object may have
/// only one such data member for holding results, you should use the
/// class like this:
/// <pre> abcd = group.Add(a, group.Add(b, group.Add(c,d));</pre>
/// The following code will produce incorrect results:
/// <pre> abcd = group.Add(group.Add(a,b), group.Add(c,d));</pre>
/// \sa <A HREF="https://cryptopp.com/wiki/Integer">Integer</A> on the
/// Crypto++ wiki.
class CRYPTOPP_DLL ModularArithmetic : public AbstractRing<Integer>
{
public:
@ -255,6 +257,10 @@ public:
static const RandomizationParameter DefaultRandomizationParameter;
private:
// Squash warning on missing assignment operator.
ModularArithmetic& operator=(const ModularArithmetic &ma);
protected:
Integer m_modulus;
mutable Integer m_result, m_result1;