Commit bc4f2fb4 authored by Xavier Thompson's avatar Xavier Thompson

future.hpp: Use std::addressof consistently

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