标签: ms-gsl

什么是"模板<class T>使用owner = T;"?

以下摘自gsl.hMicrosoft的gsl库(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;
    ...
};
Run Code Online (Sandbox Code Playgroud)

我无法理解以下别名模板的含义:

template<class T>
using owner = T;
Run Code Online (Sandbox Code Playgroud)

有什么解释吗?

c++ alias templates c++11 ms-gsl

5
推荐指数
1
解决办法
2124
查看次数

标签 统计

alias ×1

c++ ×1

c++11 ×1

ms-gsl ×1

templates ×1