@@ -38,6 +38,8 @@ namespace purescript {
39 using std::shared_ptr<void>::shared_ptr;
39 using std::shared_ptr<void>::shared_ptr;
41+ boxed() noexcept : std::shared_ptr<void>() {}
42+ boxed(const std::nullptr_t) noexcept : std::shared_ptr<void>() {}
41 boxed(const int n) : std::shared_ptr<void>(std::make_shared<int>(n)) {}
43 boxed(const int n) : std::shared_ptr<void>(std::make_shared<int>(n)) {}
42 boxed(const long n) : std::shared_ptr<void>(std::make_shared<int>(static_cast<int>(n))) {
44 boxed(const long n) : std::shared_ptr<void>(std::make_shared<int>(static_cast<int>(n))) {
43#if !defined(NDEBUG) // if debug build
45#if !defined(NDEBUG) // if debug build
@@ -46,7 +48,6 @@ namespace purescript {
47#endif // !defined(NDEBUG)
49#endif // !defined(NDEBUG)
50 boxed(const unsigned long n) : std::shared_ptr<void>(std::make_shared<int>(static_cast<int>(n))) {
51 boxed(const unsigned long n) : std::shared_ptr<void>(std::make_shared<int>(static_cast<int>(n))) {
51#if !defined(NDEBUG) // if debug build
52#if !defined(NDEBUG) // if debug build
52 if (n > std::numeric_limits<int>::max()) {
53 if (n > std::numeric_limits<int>::max()) {
@@ -54,7 +55,6 @@ namespace purescript {
55#endif // !defined(NDEBUG)
56#endif // !defined(NDEBUG)
58 boxed(const double n) : std::shared_ptr<void>(std::make_shared<double>(n)) {}
58 boxed(const double n) : std::shared_ptr<void>(std::make_shared<double>(n)) {}
59 boxed(const bool b) : std::shared_ptr<void>(std::make_shared<bool>(b)) {}
59 boxed(const bool b) : std::shared_ptr<void>(std::make_shared<bool>(b)) {}
60 boxed(const char s[]) : std::shared_ptr<void>(std::make_shared<string>(s)) {}
60 boxed(const char s[]) : std::shared_ptr<void>(std::make_shared<string>(s)) {}