【发布时间】:2018-05-10 02:54:43
【问题描述】:
希望了解以下内容:
A::template rebind::other (optional1)
注意:1 rebind 只是可选的(由
std::allocator_traits提供) 如果此分配器是SomeAllocator<T, Args>形式的模板, 其中Args是零个或多个附加模板参数。
为什么rebind 在上述情况下是可选的?
【问题讨论】:
-
在这种情况下它是“生成的”(成为
SomeAllocator<U, Args>)。