Issue 143828
Summary [libc++] Possibly redundant auto-cast in `<async>`
Labels libc++
Assignees
Reporter frederick-vs-ja
    The uses of `_LIBCPP_AUTO_CAST` (originally introduced in ec0810e1c8e690ebbf571670820392d52fb23b75) seem introducing unnecessary move constructions.
https://github.com/llvm/llvm-project/blob/282e471018d234f78b0990100834532389877519/libcxx/include/future#L1866-L1882

If I understand correctly, auto cast (formerly decay-copy) is already happening when constructing the `tuple` in `__async_func`, so we're probably able to use perfect forwarding in `async` with `__async_func` slightly changed.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to