commit | db66e1ef97700adddd6bee304252576cb25fa963 | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Tue Jan 16 20:54:52 2024 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jan 16 20:54:52 2024 +0000 |
tree | 849cbeb57d08403aebea534af245e5cd9cb1760e | |
parent | 9ad961bb7bbd3767c4b0798f2c9553413fc962a2 [diff] |
pw_containers: Make Vector<T> destructor protected - Make the destructor protected to prevent both delete calls and direct destructor calls (as used with placement new). This prevents unusable declarations such as std::optional<Vector<T>>. - Fix a struct in pw_bluetooth with a generic-capcity vector member, which resulted in a compiler error with this change. - Add negative compilation tests for deleting generic-capacity vectors. Change-Id: I841897cd63a68654b2065dad51ee42a9631f815e Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/187801 Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com> Commit-Queue: Wyatt Hepler <hepler@google.com> Reviewed-by: Taylor Cramer <cramertj@google.com> Reviewed-by: Aaron Green <aarongreen@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.