mirror of
https://github.com/boostorg/dll.git
synced 2026-01-26 06:32:10 +00:00
updated doc and removed boost::shared_ptr<smart_library> stuff
This commit is contained in:
@@ -23,7 +23,7 @@ int main(int argc, char* argv[]) {
|
||||
//[smart_lib_size
|
||||
auto size_f = lib.get_function<std::size_t()>("space::my_plugin::size"); //get the size function
|
||||
|
||||
auto size = (*size_f)(); // get the size of the class
|
||||
auto size = size_f(); // get the size of the class
|
||||
std::unique_ptr<char[], size> buffer(new char[size]); //allocate a buffer for the import
|
||||
alias & inst = *reinterpret_cast<alias*>(buffer.get()); //cast it to our alias type.
|
||||
//]
|
||||
|
||||
Reference in New Issue
Block a user