Q:

What are the pros/cons of Eigen::Ref<> vs. std::reference_wrapper<>?

It appears that Eigen::Ref<>, introduced in Eigen 3.2, and std::reference_wrapper<> introduced in C++11 accomplish very similar goals.
Obviously, the Eigen::Ref<> does not introduce a C++11 dependency, as std::reference_wrapper<> does, but what else should be considered?  (For me, C++11 dependency is not a concern.)
Here are the references: (so meta, LOL):

Eigen::Ref<>
std::reference_wrapper<>

A:

They do not cover same usage. std::reference_wrapper is typically used to store references to objects of type T into containers (instead of using pointers). Eigen::Ref can wrap any Eigen's dense object that are similar to T or allocate its own memory to evaluate expressions that cannot be referenced. It is typically used as the argument types of non template functions or to unify Map, Matrix, and sub-matrices.

