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.
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.