7#if !defined(ASYNC_MQTT_UTIL_SHARED_PTR_ARRAY_HPP)
8#define ASYNC_MQTT_UTIL_SHARED_PTR_ARRAY_HPP
20using shared_ptr_array = std::shared_ptr<char []>;
21using const_shared_ptr_array = std::shared_ptr<char const []>;
34inline shared_ptr_array make_shared_ptr_array(std::size_t size);
43using shared_ptr_array = std::shared_ptr<char []>;
44using const_shared_ptr_array = std::shared_ptr<char const []>;
46inline shared_ptr_array make_shared_ptr_array(std::size_t size) {
47#if __cpp_lib_shared_ptr_arrays >= 201707L
48 return std::make_shared<char[]>(size);
50 return std::shared_ptr<char[]>(
new char[size]);