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
commit58b3db4a4fe55f23fa7abcd65ab0ead1b9007a3b authorAndy Arvanitis <andyarvanitis@gmail.com> dateSun 16 Dec 2018, 16:50 (8 years ago) parentb18eb12
1 file changed+2−2
runtime/purescript.h+2−2
runtime/purescript.h+2−2
@@ -38,6 +38,8 @@ namespace purescript {
3838 public:
3939 using std::shared_ptr<void>::shared_ptr;
4040
41+ boxed() noexcept : std::shared_ptr<void>() {}
42+ boxed(const std::nullptr_t) noexcept : std::shared_ptr<void>() {}
4143 boxed(const int n) : std::shared_ptr<void>(std::make_shared<int>(n)) {}
4244 boxed(const long n) : std::shared_ptr<void>(std::make_shared<int>(static_cast<int>(n))) {
4345#if !defined(NDEBUG) // if debug build
@@ -46,7 +48,6 @@ namespace purescript {
4648 }
4749#endif // !defined(NDEBUG)
4850 }
49−
5051 boxed(const unsigned long n) : std::shared_ptr<void>(std::make_shared<int>(static_cast<int>(n))) {
5152#if !defined(NDEBUG) // if debug build
5253 if (n > std::numeric_limits<int>::max()) {
@@ -54,7 +55,6 @@ namespace purescript {
5455 }
5556#endif // !defined(NDEBUG)
5657 }
57−
5858 boxed(const double n) : std::shared_ptr<void>(std::make_shared<double>(n)) {}
5959 boxed(const bool b) : std::shared_ptr<void>(std::make_shared<bool>(b)) {}
6060 boxed(const char s[]) : std::shared_ptr<void>(std::make_shared<string>(s)) {}