7#if !defined(ASYNC_MQTT_UTIL_MAKE_SHARED_HELPER_HPP)
8#define ASYNC_MQTT_UTIL_MAKE_SHARED_HELPER_HPP
15class make_shared_helper {
17 struct target :
public T {
18 template<
typename... Args>
19 target(Args&&... args)
20 :T{std::forward<Args>(args)...}
24 template <
typename... Args>
25 static std::shared_ptr<T> make_shared(Args&&... args) {
26 return std::make_shared<target>(std::forward<Args>(args)...);
29 template<
typename Alloc,
typename... Args>
30 static std::shared_ptr<T> allocate_shared(Alloc
const& alloc, Args&&... args) {
31 return std::allocate_shared<target>(alloc, std::forward<Args>(args)...);