Commit c50615ef authored by Xavier Thompson's avatar Xavier Thompson

future.hpp: Use std::addressof consistently

parent 194d30eb
......@@ -31,7 +31,7 @@ namespace typon
if (ready)
{
fdt::defer defer { [&coroutine]() { coroutine.destroy(); } };
std::construct_at(&(_result), coroutine.promise().get());
std::construct_at(std::addressof(_result), coroutine.promise().get());
}
else
{
......@@ -68,7 +68,7 @@ namespace typon
{
if (!_coroutine)
{
std::destroy_at(&(_result));
std::destroy_at(std::addressof(_result));
}
}
......@@ -151,7 +151,7 @@ namespace typon
if (ready)
{
fdt::defer defer { [&coroutine]() { coroutine.destroy(); } };
std::construct_at(&(_result), coroutine.promise().get());
std::construct_at(std::addressof(_result), coroutine.promise().get());
}
else
{
......@@ -166,7 +166,7 @@ namespace typon
{
if (!_coroutine)
{
std::destroy_at(&(_result));
std::destroy_at(std::addressof(_result));
}
}
......
Markdown is supported
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