News for hackers. Stuff that matters.
Re:Deprecating Raw Pointers in C++20 by andrepd on Sunday April 01, 2018 @07:44AM (#16727790)
cppreference explains it pretty well:

>std::reference_wrapper is a class template that wraps a reference in a copyable, assignable object. It is frequently used as a mechanism to store references inside standard containers (like std::vector) which cannot normally hold references.

>Specifically, std::reference_wrapper is a CopyConstructible and CopyAssignable wrapper around a reference [...] of type T. Instances of std::reference_wrapper are objects (they can be copied or stored in containers) but they are implicitly convertible to T&, so that they can be used as arguments with the functions that take the underlying type by reference.

Sounds pretty reasonable and useful to me. No need for over-the-top head banging :)

Re:Deprecating Raw Pointers in C++20 by mannykannot on Sunday April 01, 2018 @09:15AM (#16728110)
It is also an example of a sort of 'combinatorial pump' that inflates the language's complexity, as each new feature needs to work with every existing one. It is my guess that it is C++'s multi-paradigm flexibility that makes this both possible and necessary.