32 template <
typename T,
typename Tag,
typename F>
35 return static_cast<T*
>(create_<T, Tag>(creator));
39 template <
typename A,
typename B>
42 using Key = std::type_info;
48 return static_cast<void*
>((*
static_cast<F*
>(
f))());
52 template <
typename T,
typename Tag,
typename F>
59 template <
typename T,
typename Tag,
typename F>
69 template <
typename T,
typename Tag,
typename F>
71 return StaticSingletonManager::create<T, Tag>(
static_cast<F&&
>(creator));
74 template <
typename T,
typename Tag>
76 return StaticSingletonManager::create<T, Tag>([]() {
return new T(); });
#define FOLLY_ALWAYS_INLINE
static void * create(void *f)
—— Concurrent Priority Queue Implementation ——
FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN T * createGlobal(F &&creator)
FOLLY_ALWAYS_INLINE static FOLLY_ATTR_VISIBILITY_HIDDEN void * create_(F const &creator)
FOLLY_ALWAYS_INLINE static FOLLY_ATTR_VISIBILITY_HIDDEN void * create_(F &creator)
#define FOLLY_ATTR_VISIBILITY_HIDDEN
FOLLY_ALWAYS_INLINE static FOLLY_ATTR_VISIBILITY_HIDDEN T * create(F &&creator)