Go to the source code of this file.
◆ const_shared_ptr_array
◆ shared_ptr_array
Type alias of shared_ptr char array. You can choose the target type.
- If MQTT_STD_SHARED_PTR_ARRAY is defined,
std::shared_ptr<char []>
is used.
- std::shared_ptr<char []> is supported since C++17.
- If MQTT_STD_SHARED_PTR_ARRAY is not defined (default),
boost::shared_ptr<char []>
is used.
boost::shared_ptr<char []>
can be used on C++14.
◆ make_shared_ptr_array()
shared_ptr_array creating function. You can choose the target type.
- If MQTT_STD_SHARED_PTR_ARRAY is defined,
- and if your compiler setting is C++20 or later, then
std::make_shared<char[]>(size)
is used.
- It can allocate an array of characters and the control block in a single allocation.
- otherwise
std::shared_ptr<char[]>(new char[size])
is used.
- It requires two times allocations.
- If MQTT_STD_SHARED_PTR_ARRAY is not defined (default), then
boost::make_shared<char[]>(size)
is used.
- It can allocate an array of characters and the control block in a single allocation.