allocator<void> Class

键入 void的模板选件类分配器的专用化,在此上下文有意义的类型。

template<>
   class allocator<void> {
   typedef void *pointer;
   typedef const void *const_pointer;
   typedef void value_type;
   template<class Other>
      struct rebind;
   allocator( );
   allocator(
      const allocator<void>&
   );
   template<class Other>
      allocator(
         const allocator<Other>&
      );
   template<class Other>
      allocator<void>& operator=(
         const allocator<Other>&
      );
   };

备注

选件类显式专用化类型的 分配器 类型 *无效。*其构造函数和赋值运算符相同的行为类似于模板选件类的,但是,它仅定义以下类型:

要求

Header: <memory>

命名空间: std

请参见

参考

线程安全性对标准C++库中