Unverified Commit 134c9159 authored by Jan Kokemüller's avatar Jan Kokemüller Committed by GitHub
Browse files

[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
parent 849f963e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment