特に理由もなく、突然自作allocatorをSTLコンテナ、文字列で試したいです。 STLで、デフォルトのstd::allocatorがある。vectorを使う時、allocatorを指定しなかったらそれを使う。 VC2010のSTLのvectorヘーダに、こういうコードがある template<class _Ty, class _Ax = allocator<_Ty> > class vectorそしてこんな構造体があるexplicit vector(const _Alloc& _Al)じゃ、自分のallocatorを指定すると、自分でメモリ管理できる。 よくみると、xmemoryにstd::allocatorはこんなもんなんだ #define _ALLOCATOR allocator #define _PDFT ptrdiff_t template<class _Ty> class _