Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pw_vector: Add constexpr max_size() for fixed-sized vector
This change introduces the max_size() function for the fixed-sized vector implementation. By declaring it as static constexpr we can use the max_size of a fixed-size vector to size another vector at compile time. If only the generic vector gets passed to a function, the generic max_size function gets called, that won't return the constexpr max size value. Tested: Added ConstexprMaxSize test case Change-Id: I45ea288d756641e108103c4e0ce958759876e32a Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/122891 Reviewed-by: Wyatt Hepler <[email protected]> Commit-Queue: Christoph Klee <[email protected]>
- Loading branch information