[all-commits] [llvm/llvm-project] f90f03: [libc] Move in_use into OptionalStorage (#73569)
michaelrj-google via All-commits
all-commits at lists.llvm.org
Mon Nov 27 13:31:25 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f90f036efbe6879ecf1c9ff8cf0fb956b5ceb877
https://github.com/llvm/llvm-project/commit/f90f036efbe6879ecf1c9ff8cf0fb956b5ceb877
Author: michaelrj-google <71531609+michaelrj-google at users.noreply.github.com>
Date: 2023-11-27 (Mon, 27 Nov 2023)
Changed paths:
M libc/src/__support/CPP/optional.h
M libc/test/src/__support/CPP/optional_test.cpp
Log Message:
-----------
[libc] Move in_use into OptionalStorage (#73569)
The previous optional class would call the destructor on a non-trivially
destructible object regardless of if it had already been reset. This
patch fixes this by moving tracking for if the object exists into the
internal storage class for optional.
More information about the All-commits
mailing list