Tippet: Use reference_wrapper to create views of data -- Indi
Explicit C++ describes how to use std::reference_wrapper to create alternative views of data.
Tippet: Use reference_wrapper to create views of data
by Indi
from the article:
When working with objects indirectly, always use references. Only use pointers to indicate optional referencing. But there’s one little hitch: because you can’t rebind references, you can’t simply have a container of references. Enter
std::reference_wrapper.

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature: