Skip to content

Inconsistency in BEVE array handling for some primitives (char, std::byte) #2647

Description

Thanks for making Glaze!

I've run into an odd inconsistency when trying to deserialize an std::array<T, N> with the BEVE untagged codec, when T is either char or std::byte.
The char case doesn't compile because of a match against str_t, whereupon the library tries to call resize on the array.
The std::byte case works, but consumes double the space because it's encoded as a generic array.

Full example here: https://clang.godbolt.org/z/1z7bozh76
The size inconsistency also reproduces with std::vector<std::byte>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions