allocator<void> 类

键入 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>&
      );
   };

备注

类显式专用化类型 allocator 模板类 *无效。*其构造函数和赋值运算符相同的行为。模板类的,但是,这仅定义以下类型:

要求

页眉:<内存>

命名空间: std

请参见

参考

C++ 标准库中的线程安全