From 23067c0e3a92d452c1f8f3519c64d970a27732e3 Mon Sep 17 00:00:00 2001 From: martin dobrev Date: Fri, 7 Sep 2018 18:59:05 +0300 Subject: Add enchance common types library --- JSImpl/src/CommonTypes.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'JSImpl/src') diff --git a/JSImpl/src/CommonTypes.h b/JSImpl/src/CommonTypes.h index b3ceb0b..fb5ef2a 100644 --- a/JSImpl/src/CommonTypes.h +++ b/JSImpl/src/CommonTypes.h @@ -2,6 +2,7 @@ #include #include #include +#include template using IPLVector = std::vector; @@ -9,3 +10,14 @@ using IPLString = std::string; template using IPLUnorderedMap = std::unordered_map; + +template +using IPLSharedPtr = std::shared_ptr; + +template +inline IPLSharedPtr IPLMakeSharePtr(Args&&... args) { + return std::make_shared(args...); +}; + +template< typename T> +using IPLEnableShared = std::enable_shared_from_this; -- cgit v1.3.1-23-gd82d