Skip to content

basic_pbf_writer::add_bool with buffer of non-char element type does not compile. #139

@mikaellindemann

Description

@mikaellindemann

I have been mostly able to support std::vector<std::byte> as buffer in basic_pbf_builder<std::vector<std::byte>> by implementing a custom buffer_customization<std::vector<std::byte>>.

However, when calling basic_pbf_builder::add_bool(tag, true) the compiler fails because std::vector<std::byte>::push_back(char value) does not exist.

Is it possible to change this line in void basic_pbf_writer<TBuffer>::add_bool(pbf_tag_type tag, bool value) from:

        m_data->push_back(static_cast<char>(value));

to

        buffer_customization<TBuffer>::push_back(m_data, static_cast<char>(value));

to allow support for other element types than char?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions