git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
C++: address -Wweak-vtable warnings and remove runtime_error alias
commit480f30faaea9e286b2b422a654dc843b68db42ed authorAndy Arvanitis <andyarvanitis@gmail.com> dateThu 22 Dec 2016, 16:54 (10 years ago) parent17867a2
2 files changed+6−8
pcc/runtime/purescript.cc+3 pcc/runtime/purescript.hh+3−8
pcc/runtime/purescript.cc+3
@@ -17,6 +17,9 @@
1717
1818namespace PureScript {
1919
20+any::closure::~closure() {}
21+any::eff_closure::~eff_closure() {}
22+
2023#define RETURN_VALUE(TAG, ACCESSOR, INDIRECTION) \
2124 const any& variant = unthunkVariant(*this); \
2225 assert(variant.tag == TAG); \
pcc/runtime/purescript.hh+3−8
@@ -45,6 +45,7 @@ namespace PureScript {
4545
4646using cstring = const char *;
4747using std::nullptr_t;
48+using std::runtime_error;
4849
4950namespace Private {
5051 struct symbol_generator_anchor_t {};
@@ -68,12 +69,6 @@ using symbol_t = const Private::symbol_generator_anchor_t *;
6869 }
6970#define symbol(S) (&Private::symbol_generator<::PureScript::Private::Symbol::S_ ## S>::anchor)
7071
71−// Workaround for missing C++11 version in gcc
72−class runtime_error : public std::runtime_error {
73−public:
74− runtime_error(const char message[]) : std::runtime_error(std::string(message)) {}
75−};
76−
7772constexpr bool undefined = false;
7873
7974// Not a real limit, just used for simpler accessors
@@ -128,7 +123,7 @@ class any {
128123 class closure {
129124 public:
130125 virtual auto operator()(const any&) const -> any = 0;
131− virtual ~closure() {}
126+ virtual ~closure();
132127 };
133128
134129 template <typename T>
@@ -144,7 +139,7 @@ class any {
144139 class eff_closure {
145140 public:
146141 virtual auto operator()() const -> any = 0;
147− virtual ~eff_closure() {}
142+ virtual ~eff_closure();
148143 };
149144
150145 template <typename T>