aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2019-07-23 18:37:39 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2019-07-23 19:07:54 +0800
commit8118e08dc27153dd3bac0264b1774e92e6173ad1 (patch)
tree5eb11f891a70badce38743931f366a454e01b38a
parentcc1396f753383d63e7c32f99d3080d4eb4fa14d4 (diff)
downloadtangerine-mcl-8118e08dc27153dd3bac0264b1774e92e6173ad1.tar.gz
tangerine-mcl-8118e08dc27153dd3bac0264b1774e92e6173ad1.tar.zst
tangerine-mcl-8118e08dc27153dd3bac0264b1774e92e6173ad1.zip
add FixedVec::value_type
-rw-r--r--include/mcl/array.hpp1
-rw-r--r--include/mcl/gmp_util.hpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/mcl/array.hpp b/include/mcl/array.hpp
index 5fa49e6..33d4aab 100644
--- a/include/mcl/array.hpp
+++ b/include/mcl/array.hpp
@@ -118,6 +118,7 @@ class FixedArray {
y = t;
}
public:
+ typedef T value_type;
FixedArray() : n_(0) {}
bool resize(size_t n)
{
diff --git a/include/mcl/gmp_util.hpp b/include/mcl/gmp_util.hpp
index 384c052..42ec6a7 100644
--- a/include/mcl/gmp_util.hpp
+++ b/include/mcl/gmp_util.hpp
@@ -642,7 +642,7 @@ void getNAFwidth(bool *pb, Vec& naf, mpz_class x, size_t w)
x++;
v -= maxW;
}
- naf.push(pb, v);
+ naf.push(pb, typename Vec::value_type(v));
if (!*pb) return;
zeroNum = w - 1;
}