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

Method _construct

include/covscript/core/cni.hpp:595–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

593 {
594 template <typename X, typename RetT, typename... ArgsT>
595 static cni_holder_base *_construct(X &&val, RetT (*target_function)(ArgsT...))
596 {
597 using source_function_type = typename cni_decayed_conversion_cpp<RetT>::target_type (*)(
598 typename cni_decayed_conversion_cs<ArgsT>::source_type...);
599 // Return type
600 static_assert(cni_convertible<RetT, typename cni_decayed_conversion_cpp<RetT>::target_type>::value,
601 "Invalid conversion.");
602 // Argument type
603 check_conversion(target_function, source_function_type(nullptr));
604 return new cni_holder<T, source_function_type>(std::forward<X>(val));
605 }
606
607 template <typename X>
608 static cni_holder_base *construct(X &&val)

Callers

nothing calls this directly

Calls 1

check_conversionFunction · 0.85

Tested by

no test coverage detected