mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-09 02:32:53 +03:00
As C++ forbides returning a pointer to a temporary object, the creation of a coap_str_const_t to wrap the character-array and size done in coap_make_str_const() does not work. This change therefore creates a C++ class CoAPStrConst in namespace libcoap in a way that allows the default constructor to be used with aggregate initialization. This commit closes issue #233 [2]. [1] https://en.cppreference.com/w/cpp/language/aggregate_initialization [2] https://github.com/obgm/libcoap/issues/233