7 #if !defined(MQTT_TWO_OR_FOUR_BYTE_UTIL_HPP)
8 #define MQTT_TWO_OR_FOUR_BYTE_UTIL_HPP
19 template <std::
size_t Bytes>
24 using type = std::uint16_t;
29 using type = std::uint32_t;
32 template <std::
size_t Bytes>
37 template <
typename It>
38 static constexpr std::uint16_t
apply(It b, It e) {
45 template <
typename It>
46 static constexpr std::uint32_t
apply(It b, It e) {
51 template <std::
size_t Bytes>
57 static void apply(T& buf, std::uint16_t two_or_four_byte) {
65 static void apply(T& buf, std::uint32_t two_or_four_byte) {
void add_uint32_t_to_buf(T &buf, std::uint32_t num)
Definition: four_byte_util.hpp:31
void add_uint16_t_to_buf(T &buf, std::uint16_t num)
Definition: two_byte_util.hpp:28
constexpr std::uint16_t make_uint16_t(It b, It e)
Definition: two_byte_util.hpp:34
constexpr std::uint32_t make_uint32_t(It b, It e)
Definition: four_byte_util.hpp:39
static void apply(T &buf, std::uint16_t two_or_four_byte)
Definition: two_or_four_byte_util.hpp:57
static void apply(T &buf, std::uint32_t two_or_four_byte)
Definition: two_or_four_byte_util.hpp:65
Definition: two_or_four_byte_util.hpp:52
static constexpr std::uint16_t apply(It b, It e)
Definition: two_or_four_byte_util.hpp:38
static constexpr std::uint32_t apply(It b, It e)
Definition: two_or_four_byte_util.hpp:46
Definition: two_or_four_byte_util.hpp:33
std::uint16_t type
Definition: two_or_four_byte_util.hpp:24
std::uint32_t type
Definition: two_or_four_byte_util.hpp:29
Definition: two_or_four_byte_util.hpp:20