Skip to content

Commit 473e132

Browse files
committed
Merge pull request #268 from layus/ambiguity
Fix type ambiguity issue introduced by boost 1.60.
2 parents 2b3dc7d + 6c8c12f commit 473e132

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

vm/boostenv/main/boostenvbigint-decl.hh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,15 @@ public:
9292
void printReprToStream(VM vm, std::ostream& out, int depth, int width);
9393

9494
public:
95-
template <class T>
96-
static std::shared_ptr<BigIntImplem> make_shared_ptr(const T& value) {
95+
static std::shared_ptr<BigIntImplem> make_shared_ptr(const mp_int& value) {
96+
return std::static_pointer_cast<BigIntImplem>(std::make_shared<BoostBigInt>(value));
97+
}
98+
99+
static std::shared_ptr<BigIntImplem> make_shared_ptr(const std::string& value) {
100+
return std::static_pointer_cast<BigIntImplem>(std::make_shared<BoostBigInt>(value));
101+
}
102+
103+
static std::shared_ptr<BigIntImplem> make_shared_ptr(const nativeint& value) {
97104
return std::static_pointer_cast<BigIntImplem>(std::make_shared<BoostBigInt>(value));
98105
}
99106

0 commit comments

Comments
 (0)