MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / throw_if_null

Function throw_if_null

include/chaiscript/dispatchkit/boxed_cast_helper.hpp:30–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29 template<typename T>
30 T* throw_if_null(T *t)
31 {
32 if (t) { return t; }
33 throw std::runtime_error("Attempted to dereference null Boxed_Value");
34 }
35
36 template<typename T>
37 static const T *verify_type_no_throw(const Boxed_Value &ob, const std::type_info &ti, const T *ptr) {

Callers 1

verify_typeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected