From b108b31c17ea2c8889f5a0e3ef987b12475f4916 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Fri, 11 Oct 2019 10:24:59 +0900 Subject: [PATCH] disable hash if DONT_USE_EXCEPTION --- include/mcl/ec.hpp | 2 ++ include/mcl/fp.hpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/mcl/ec.hpp b/include/mcl/ec.hpp index b598db6..195394d 100644 --- a/include/mcl/ec.hpp +++ b/include/mcl/ec.hpp @@ -1491,6 +1491,7 @@ void initCurve(int curveType, Ec *P = 0, mcl::fp::Mode mode = fp::FP_AUTO, mcl:: } // mcl +#ifndef CYBOZU_DONT_USE_EXCEPTION #ifdef CYBOZU_USE_BOOST namespace mcl { template @@ -1517,6 +1518,7 @@ struct hash > { CYBOZU_NAMESPACE_TR1_END } // std #endif +#endif #ifdef _MSC_VER #pragma warning(pop) diff --git a/include/mcl/fp.hpp b/include/mcl/fp.hpp index 62d592f..a1f4b2c 100644 --- a/include/mcl/fp.hpp +++ b/include/mcl/fp.hpp @@ -688,6 +688,7 @@ template void (*FpT::sqr)(FpT& y, } // mcl +#ifndef CYBOZU_DONT_USE_EXCEPTION #ifdef CYBOZU_USE_BOOST namespace mcl { @@ -711,6 +712,7 @@ struct hash > { CYBOZU_NAMESPACE_TR1_END } // std::tr1 #endif +#endif #ifdef _MSC_VER #pragma warning(pop)