2
0
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:
klemens-morgenstern
2016-06-07 12:14:44 +02:00
parent c82cb99ec9
commit 60cb4fe628
9 changed files with 361 additions and 133 deletions

View File

@@ -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.
//]