From 72a3ee5dc9f771de6098a57932946d81c2249e3c Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Tue, 23 Jul 2019 19:37:39 +0900 Subject: [PATCH] add FixedVec::value_type --- include/mcl/array.hpp | 1 + include/mcl/gmp_util.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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..0eeeb9c 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, Vec::value_type(v)); if (!*pb) return; zeroNum = w - 1; }