modm-io / modm

modm: a C++23 library generator for AVR and ARM Cortex-M devices
https://modm.io
Mozilla Public License 2.0
748 stars 132 forks source link

Use isNotEmpty() instead of !isEmpty() #1023

Open strongly-typed opened 1 year ago

strongly-typed commented 1 year ago

Using only one part of #857

strongly-typed commented 1 year ago

The CI hangs. Can someone re-trigger the missing jobs?

salkinium commented 1 year ago

CI doesn't hang, it purposely doesn't execute the HAL tests until you add the ci:hal label. They take forever and block other PRs from running jobs (we only get 20 for the whole repo). I think you have the access rights to add the label yourself (try it).

chris-durand commented 1 year ago

We're going to deprecate the containers in favor of stdlibc++ (or ETL) in #1020, so don't spend too much time polishing them ;-P

Yes, the reason for the existence of most of the modm containers is that we couldn't rely on any standard library facilities at all before we had added libstdc++ for AVR. The containers are heavily dated and don't follow established practices regarding naming and semantics. That makes it hard to replace them with something else without changing all your code and interoperability with the standard library is impossible.

The plan is to get rid of everything the standard has a conceptually equivalent replacement for and deprecate the redundant containers in modm (#1020). I'd like to replace the BoundedDeque with a more modern implementation with a standard library compatible interface and also add a fixed capacity, variable size std::vector like type based on that proposal. Unfortunately the versions from ETL are not the most modern implementations either because their code base still focuses on C++03 compatibility. For instance, there is no constexpr support.