Skip to content

Commit fd10a9e

Browse files
committed
expose MontyTag type in MontgomeryForm.h
1 parent 836358e commit fd10a9e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

montgomery_arithmetic/include/hurchalla/montgomery_arithmetic/MontgomeryForm.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class MontgomeryForm final {
4545
const detail::ImplMontgomeryForm<T, InlineAll, MontyType> impl;
4646
public:
4747
using IntegerType = T;
48+
using MontyTag = typename MontyType::MontyTag;
4849

4950
// If you need to compare MontgomeryValues for equality or inequality, call
5051
// getCanonicalValue() and compare the resulting CanonicalValues.
@@ -449,7 +450,7 @@ class MontgomeryForm final {
449450
HPBC_PRECONDITION(exponent >= 0);
450451
std::array<MontgomeryValue, 1> bases = {{ base }};
451452
std::array<MontgomeryValue, 1> result =
452-
detail::montgomery_array_pow<typename MontyType::MontyTag,
453+
detail::montgomery_array_pow<MontyTag,
453454
MontgomeryForm>::pow(*this, bases, exponent);
454455
return result[0];
455456
}
@@ -480,7 +481,7 @@ class MontgomeryForm final {
480481
pow(const std::array<MontgomeryValue, NUM_BASES>& bases, T exponent) const
481482
{
482483
HPBC_PRECONDITION(exponent >= 0);
483-
return detail::montgomery_array_pow<typename MontyType::MontyTag,
484+
return detail::montgomery_array_pow<MontyTag,
484485
MontgomeryForm>::pow(*this, bases, exponent);
485486
}
486487

0 commit comments

Comments
 (0)