What is “template<class T> using owner = T;”?
问题 Below is excerpted from gsl.h of Microsoft's gsl library (https://github.com/microsoft/gsl): namespace gsl { // // GSL.owner: ownership pointers // using std::unique_ptr; using std::shared_ptr; template<class T> using owner = T; ... }; I cannot understand what the following alias template means: template<class T> using owner = T; Any explanations? 回答1: It means that for every T , owner<T> is an alias for T . 回答2: It can be used as annotation to show which pointers are 'owner' ie: Example of