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

Function make_unique

include/chaiscript/chaiscript_defines.hpp:97–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95
96 template<typename B, typename D, typename ...Arg>
97 inline std::unique_ptr<B> make_unique(Arg && ... arg)
98 {
99#ifdef CHAISCRIPT_USE_STD_MAKE_SHARED
100 return std::make_unique<D>(std::forward<Arg>(arg)...);
101#else
102 return std::unique_ptr<B>(static_cast<B*>(new D(std::forward<Arg>(arg)...)));
103#endif
104 }
105
106 struct Build_Info {
107 static int version_major()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected