News for hackers. Stuff that matters.
Re:C++20 Design Is Complete: Modules, Coroutines in C++20 by Tarean on Sunday February 24, 2019 @04:45AM (#19237924)
The actually confusing part is that && has two different meanings:

Rvalue reference, the passed value either has no memory location yet or has a memory location that won't be accessed anymore (e.g. Marked with std::move)

     void foo(int&& a)
Universal reference. `a` is inferred as an rvalue reference if it is initialized with an rvalue and a normal reference otherwise:

    template <class T>  void foo(T&& a)
So && with type deduction tries to forward rvalue-ness. It does a terrible job, though, which is why std::forward exists.

There are no comments on this comment yet.