* Access underlying pointer throwing an exception if the ptr is NULL */
| 144 | * Access underlying pointer throwing an exception if the ptr is NULL |
| 145 | */ |
| 146 | inline T* checked_get() const { |
| 147 | T* ptr = get(); |
| 148 | if (ptr == NULL) |
| 149 | throw ::Rcpp::exception("external pointer is not valid"); // #nocov |
| 150 | return ptr; |
| 151 | } |
| 152 | |
| 153 | /** |
| 154 | * Returns a reference to the object wrapped. This allows this |