git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Revert removal of two boxed ctors to make old(er) version of gcc happy
58b3db4Andy Arvanitis
runtime/purescript.h+2−2
@@ -38,6 +38,8 @@ namespace purescript {
38 public:
38 public:
39 using std::shared_ptr<void>::shared_ptr;
39 using std::shared_ptr<void>::shared_ptr;
40
40
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 {
46 }
48 }
47#endif // !defined(NDEBUG)
49#endif // !defined(NDEBUG)
48 }
50 }
49−
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 {
54 }
55 }
55#endif // !defined(NDEBUG)
56#endif // !defined(NDEBUG)
56 }
57 }
57−
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)) {}