There was an error while loading. Please reload this page.
1 parent 5d1bc2b commit 3799781Copy full SHA for 3799781
include/tiny_plugin/SharedLibrary.h
@@ -22,6 +22,18 @@
22
class SharedLibrary
23
{
24
public:
25
+ using sptr = std::shared_ptr<SharedLibrary>; ///< Shared pointer to a SharedLibrary object.
26
+ sptr make_shared(const std::string &library_name, const std::string &dir_path = "")
27
+ {
28
+ return std::make_shared<SharedLibrary>(library_name, dir_path);
29
+ }
30
+#if __cplusplus >= 201300 // c++ 14 and above
31
+ using uptr = std::unique_ptr<SharedLibrary>; ///< Unique pointer to a SharedLibrary object.
32
+ uptr make_unique(const std::string &library_name, const std::string &dir_path = "")
33
34
+ return std::make_unique<SharedLibrary>(library_name, dir_path);
35
36
+#endif
37
/**
38
* @brief Constructs a SharedLibrary object.
39
*
0 commit comments