until cpp11 has a similar class
| 102 | |
| 103 | // until cpp11 has a similar class |
| 104 | class complexs { |
| 105 | public: |
| 106 | using value_type = Rcomplex; |
| 107 | |
| 108 | explicit complexs(SEXP x) : data_(x) {} |
| 109 | |
| 110 | inline R_xlen_t size() const { return XLENGTH(data_); } |
| 111 | |
| 112 | inline operator SEXP() const { return data_; } |
| 113 | |
| 114 | private: |
| 115 | cpp11::sexp data_; |
| 116 | }; |
| 117 | |
| 118 | // functions that need to be called from an unwind_protect() |
| 119 | namespace unsafe { |
no outgoing calls
no test coverage detected