Index: include/core/SkRefCnt.h |
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h |
index 43251d0788c2e6a992965da626729da035d9e165..e2cf4456f82b463f94812069939ae315af30124e 100644 |
--- a/include/core/SkRefCnt.h |
+++ b/include/core/SkRefCnt.h |
@@ -11,6 +11,7 @@ |
#include "../private/SkAtomics.h" |
#include "../private/SkUniquePtr.h" |
#include "SkTypes.h" |
+#include <utility> |
/** \class SkRefCntBase |
@@ -326,4 +327,9 @@ private: |
T* fPtr; |
}; |
+template <typename T, typename... Args> |
+sk_sp<T> sk_make_sp(Args&&... args) { |
+ return sk_sp<T>(new T(std::forward<Args>(args)...)); |
+} |
+ |
#endif |