Skip to content

Should support uint8_t for std::vector and std::array #243

@jpetso

Description

@jpetso

Release 1.0.0 supports adapters for std::vector<char> and std::array<char>, however binary data is often represented as uint8_t (or std::uint8_t in C++11). char is defined as implementation-specific signed or unsigned integer type - see http://en.wikipedia.org/wiki/C_data_types - so while it's a single byte pretty much everywhere, the specification doesn't actually guarantee this. uint8_t and int8_t are specified more clearly, and thus a better choice for binary data.

So while I think it's not much of a problem to keep the char-templated adapters in msgpack-c, I think the project should endorse uint8_t as a better default and ship adapters for that type as well. Since msgpack-c doesn't have to choose between types, I suggest also including one for int8_t so that all three major types are covered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions