According to the D-Bus specification, there are signed and unsigned types for 16-, 32- and 64-bit integers. However, for 8-bit integers, only an unsigned type ('y') is defined.
Background: I am thinking about a C++ variadic template, which shall map C++ classes to D-Bus type signatures at compile time (e.g. int64_t
<-> 'x', std::string
<-> 's', std::tuple<int64_t, std::string>
<-> '(xs)', std::vector<std::tuple<int64_t, std::string>>
<-> 'a(xs)'.
Casting int8_t
from/to uint8_t
would not be type safe.
Is there any way to implement a type-safe transfer of signed bytes (int8_t
) in D-Bus, which is still generic and I might have overseen?