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

Class check_args_helper

include/covscript/core/cni.hpp:320–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318// Dynamic argument check
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>
332 struct check_args_helper<any, index> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected