Jan Kokemüller 0a1274224e [libc++] Fix UB in <expected> related to "has value" flag (#68552) (#68733)
The calls to std::construct_at might overwrite the previously set
__has_value_ flag in the case where the flag is overlapping with
the actual value or error being stored (since we use [[no_unique_address]]).
To fix this issue, this patch ensures that we initialize the
__has_value_ flag after we call std::construct_at.

Fixes #68552

(cherry picked from commit 134c91595568ea1335b22e559f20c1a488ea270e)
2023-11-14 09:22:23 +01:00
..