MCPcopy Create free account
hub / github.com/ThePhD/sol2 / create

Method create

examples/source/usertype_initializers.cpp:25–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 const int data;
24
25 static std::unique_ptr<holy, deleter> create() {
26 std::cout << "creating 'holy' unique_ptr directly and "
27 "letting sol/Lua handle it"
28 << std::endl;
29 return std::unique_ptr<holy, deleter>(new holy(50));
30 }
31
32 static void initialize(holy& uninitialized_memory) {
33 std::cout << "initializing 'holy' userdata at "

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected