次の方法で共有


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

解説

クラスは明示的に void型のテンプレート クラス アロケーター を簡単にします。そのコンストラクターと代入演算子は、テンプレート クラスの場合と同じように動作しますが、次の型を定義する:

必要条件

ヘッダー: の<メモリ>

名前空間: std

参照

関連項目

C++ 標準ライブラリ内のスレッド セーフ