aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-05-01 15:42:52 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-05-01 15:42:52 +0800
commit71c0ed9928d7f1851877e586dfd81bc0a768aef4 (patch)
tree6071a36ab706565c832e007074854829ffb1216d /include
parent4ce42c26b456fbe521854817c120969a022fb194 (diff)
downloadtangerine-mcl-71c0ed9928d7f1851877e586dfd81bc0a768aef4.tar.gz
tangerine-mcl-71c0ed9928d7f1851877e586dfd81bc0a768aef4.tar.zst
tangerine-mcl-71c0ed9928d7f1851877e586dfd81bc0a768aef4.zip
[change] throw exception if prefix conflicts with base
Diffstat (limited to 'include')
-rw-r--r--include/mcl/fp.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/mcl/fp.hpp b/include/mcl/fp.hpp
index d15176f..4b4db6d 100644
--- a/include/mcl/fp.hpp
+++ b/include/mcl/fp.hpp
@@ -70,7 +70,7 @@ private:
Unit v_[maxSize];
static fp::Op op_;
static FpT<tag, maxBitSize> inv2_;
- static IoMode ioMode_;
+ static int ioMode_;
template<class Fp> friend class FpDblT;
template<class Fp> friend class Fp2T;
template<class Fp> friend struct Fp6T;
@@ -407,12 +407,12 @@ public:
/*
set IoMode for operator<<(), or operator>>()
*/
- static inline void setIoMode(IoMode ioMode)
+ static inline void setIoMode(int ioMode)
{
if (ioMode_ & ~0xff) throw cybozu::Exception("FpT:setIoMode:bad mode") << ioMode;
ioMode_ = ioMode;
}
- static inline IoMode getIoMode() { return ioMode_; }
+ static inline int getIoMode() { return ioMode_; }
// backward compatibility
static inline void setModulo(const std::string& mstr, fp::Mode mode = fp::FP_AUTO)
{
@@ -423,7 +423,7 @@ public:
template<class tag, size_t maxBitSize> fp::Op FpT<tag, maxBitSize>::op_;
template<class tag, size_t maxBitSize> FpT<tag, maxBitSize> FpT<tag, maxBitSize>::inv2_;
-template<class tag, size_t maxBitSize> IoMode FpT<tag, maxBitSize>::ioMode_ = IoAuto;
+template<class tag, size_t maxBitSize> int FpT<tag, maxBitSize>::ioMode_ = IoAuto;
} // mcl