MCPcopy Create free account
hub / github.com/covscript/covscript / check

Method check

include/covscript/core/cni.hpp:321–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319 template <typename T, int index>
320 struct check_args_helper {
321 static char check(const any &val)
322 {
323 if (!val.is_type_of<T>())
324 throw cs::runtime_error("Invalid Argument. At " + std::to_string(index + 1) + ". Expected " +
325 cxx_demangle(get_name_of_type<T>()) + ", provided " + val.get_type_name());
326 else
327 return 0;
328 }
329 };
330
331 template <int index>

Callers

nothing calls this directly

Calls 4

runtime_errorClass · 0.85
cxx_demangleFunction · 0.85
get_type_nameMethod · 0.80
to_stringFunction · 0.70

Tested by

no test coverage detected