小编bta*_*tan的帖子

C++ typedef typename classname :: template

我无法解析以下代码行的含义:

typedef typename Allocator::template rebind<Mapped>::other mapped_type_allocator;
Run Code Online (Sandbox Code Playgroud)

这是分配器重新绑定的代码(https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-api-4.5/a00756_source.html的第63行 )

这与以下有什么不同?

typedef typename Allocator::rebind<Mapped>::other mapped_type_allocator;
Run Code Online (Sandbox Code Playgroud)

c++ templates

6
推荐指数
2
解决办法
3687
查看次数

标签 统计

c++ ×1

templates ×1