Skip to content

Commit 6c8c12f

Browse files
committed
Remove template from BoostBigInt::make_shared_ptr
Fixes #268.
1 parent 2b3dc7d commit 6c8c12f

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)