OpenCyphal / CETL

Cyphal Embedded Template Library
MIT License
12 stars 3 forks source link

bool VariableLengthArray constructor taking iterators is inconsistent with type T VLA #75

Closed skeetsaz closed 1 year ago

skeetsaz commented 1 year ago

T

    VariableLengthArray(InputIt first, InputIt last, size_type max_size_max, const allocator_type& alloc)
    VariableLengthArray(InputIt first, InputIt last, const allocator_type& alloc)

bool

    VariableLengthArray(InputIt               first,
                        InputIt               last,
                        const size_type       length,
                        size_type             max_size_max,
                        const allocator_type& alloc)
    VariableLengthArray(InputIt first, InputIt last, const size_type length, const allocator_type& alloc)

The bool ones should be changed to remove the length arg, similar in spirit to std::vector (5) constructor (https://en.cppreference.com/w/cpp/container/vector/vector)

skeetsaz commented 1 year ago

Fixed by https://github.com/OpenCyphal/CETL/pull/76