ETLCPP / etl

Embedded Template Library
https://www.etlcpp.com
MIT License
2.05k stars 372 forks source link

Optional assignment operator may access uninitialized storage value #832

Closed Chiraffollo closed 5 months ago

Chiraffollo commented 5 months ago

If an empty optional is move assigned to an optional, the move assignment operator accesses the not initialized storage.value. This leads to a compile error on GCC. As an failing example is not easy to show in this description, I've created one using compiler explorer, see https://godbolt.org/z/jjTzz9bxo.