Skip to content

hal::bit_modify::insert with unhelpful error message when a signed integer is used as a parameter #3

@FluffyFTW

Description

@FluffyFTW

Right now, when trying to bit_modify insert takes the mask and a uint32_t as parameters. When an integer is being placed in the uint32_t parameter, you would get the error: 'no matching function for call to hal::bit_modify<long unsigned int>::insert(hal::bit_mask&, int). This can be confusing when trying to insert a set integer such as error: no matching function for call to

hal::bit_modify<long unsigned int>::insert(bit_mask, 0b11);

vs

hal::bit_modify<long unsigned int>::insert(bit_mask, 0b11U);

If we could get a more descriptive error message that would be very much appreciated.

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