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

Function make_shared

include/chaiscript/chaiscript_defines.hpp:87–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85
86 template<typename B, typename D, typename ...Arg>
87 inline std::shared_ptr<B> make_shared(Arg && ... arg)
88 {
89#ifdef CHAISCRIPT_USE_STD_MAKE_SHARED
90 return std::make_shared<D>(std::forward<Arg>(arg)...);
91#else
92 return std::shared_ptr<B>(static_cast<B*>(new D(std::forward<Arg>(arg)...)));
93#endif
94 }
95
96 template<typename B, typename D, typename ...Arg>
97 inline std::unique_ptr<B> make_unique(Arg && ... arg)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected